2 # see comments in ghc/lib/Jmakefile
4 open(MKF, "< Makefile") || die "Can't open Makefile\n";
6 # read down to start of dependencies
8 last if /# DO NOT DELETE: Beginning of Haskell dependencies/;
11 # slurp through dependencies, duplicating them
13 last if /# DO NOT DELETE: End of Haskell dependencies/;
16 foreach $k ( '_p', '_t',
17 '_mc', '_mr', '_mt', '_mp', '_mg',
19 '_a', '_b', '_c', '_d', '_e', '_f', '_g', '_h',
20 '_i', '_j', '_k', '_o', '_m', '_n', '_o', '_A', '_B' ) {
23 # change all .hc and .hi
24 $copy =~ s/\.hc\b/$k.hc/;
25 $copy =~ s/\.hi\b/$k.hi/;
27 print STDOUT "IfGhcBuild$k(", $copy, ")\n";
31 close(MKF) || die "Failed in closing Makefile\n";