2 # a simple wrapper to test a .s-file mangler
3 # reads stdin, writes stdout
5 push(@INC,"/net/dazdak/BUILDS/gransim-4.04/i386-unknown-linux/ghc/driver");
7 $TargetPlatform = $ARGV[0]; shift; # nice error checking, Will
9 require("ghc-asm.prl") || die "require mangler failed!\n";
14 open(INP, "> /tmp/mangle1.$$") || die "Can't open tmp file 1\n";
18 close(INP) || die "Can't close tmp file 1";
20 &mangle_asm("/tmp/mangle1.$$", "/tmp/mangle2.$$");
22 open(INP, "< /tmp/mangle2.$$") || die "Can't open tmp file 2\n";
26 close(INP) || die "Can't close tmp file 2";
28 unlink("/tmp/mangle1.$$", "/tmp/mangle2.$$");