X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fmkworld%2Fmacros-ghc.jm;h=18d33290a23b0361a40d22b81bb4ff5d8e8cf2cf;hb=5eb1c77c795f92ed0f4c8023847e9d4be1a4fd0d;hp=3c9d84b3b844182750c60142a1154fe75a4fbee2;hpb=d39a85d3211f112307dd6c781f08d43b26efe883;p=ghc-hetmet.git diff --git a/ghc/mkworld/macros-ghc.jm b/ghc/mkworld/macros-ghc.jm index 3c9d84b..18d3329 100644 --- a/ghc/mkworld/macros-ghc.jm +++ b/ghc/mkworld/macros-ghc.jm @@ -1,23 +1,20 @@ -# line 9 "macros-ghc.ljm" /* ToDo: cmp -> $(CMP) */ #ifndef UgenTarget -#define UgenTarget(fileroot) @@\ -ExtraStuffToBeVeryClean(fileroot.c fileroot.h fileroot.hs) @@\ -fileroot.c : fileroot.ugn @@\ - d=`dirname fileroot.ugn` ; f=`basename fileroot.ugn .ugn` ; \ @@\ - $(RM) fileroot.c fileroot.hs "$$d/U_$$f.hs" fileroot.h-SAVE @@\ - if [ -f fileroot.h ] ; then $(MV) -f fileroot.h fileroot.h-SAVE ; else exit 0 ; fi @@\ - $(UGEN) fileroot.ugn || ( $(RM) fileroot.h fileroot.c fileroot.hs; $(MV) -f fileroot.h-SAVE fileroot.h ) @@\ - if cmp -s fileroot.h-SAVE fileroot.h ; then \ @@\ - $(MV) -f fileroot.h-SAVE fileroot.h ; \ @@\ - else \ @@\ - chmod 444 fileroot.h fileroot.c fileroot.hs ; \ @@\ - fi @@\ - @$(RM) fileroot.h-SAVE @@\ - @d=`dirname fileroot.ugn` ; f=`basename fileroot.ugn .ugn` ; \ @@\ - $(MV) -f fileroot.hs "$$d/U_$$f.hs" @@\ - @@\ -fileroot.h : fileroot.c @@\ +#define UgenTarget(dir,fileroot) @@\ +ExtraStuffToBeVeryClean(dir/fileroot.c dir/fileroot.h dir/fileroot.hs) @@\ +dir/fileroot.c dir/CAT3(U_,fileroot,.hs): dir/fileroot.ugn @@\ + $(RM) dir/fileroot.c dir/fileroot.hs dir/CAT3(U_,fileroot,.hs) dir/fileroot.h-SAVE @@\ + if [ -f dir/fileroot.h ] ; then $(MV) -f dir/fileroot.h dir/fileroot.h-SAVE ; else exit 0 ; fi @@\ + $(UGEN) dir/fileroot.ugn || ( $(RM) dir/fileroot.h dir/fileroot.c dir/CAT3(U_,fileroot,.hs); $(MV) -f dir/fileroot.h-SAVE dir/fileroot.h ) @@\ + if cmp -s dir/fileroot.h-SAVE dir/fileroot.h ; then \ @@\ + $(MV) -f dir/fileroot.h-SAVE dir/fileroot.h ; \ @@\ + else \ @@\ + chmod 444 dir/fileroot.h dir/fileroot.c dir/fileroot.hs ; \ @@\ + fi @@\ + @$(RM) dir/fileroot.h-SAVE @@\ + $(MV) -f dir/fileroot.hs dir/CAT3(U_,fileroot,.hs) @@\ + @@\ +dir/fileroot.h : dir/fileroot.c @@\ @: /* no-op */ #endif /* UgenTarget */