[project @ 1997-03-14 05:31:07 by sof]
[ghc-hetmet.git] / ghc / mk / suffixes-ghc.mk
1 # -----------------------------------------------------------------------------
2 # suffxies-ghc.mk
3
4 # suffix rules needed for compiling bits of ghc.
5
6 # -----------------------------------------------------------------------------
7
8 ifdef UnlitSuffixRules
9
10 define UnlitSuffixCmds
11         $(RM) $@
12         $(GHC_UNLIT) $<  $@ || ( $(RM) $@ && exit 1 )
13         @chmod 444 $@
14 endef
15
16 .lprl.prl:
17         $(UnlitSuffixCmds)
18
19 .lh.h:
20         $(UnlitSuffixCmds)
21
22 .lc.c:
23         $(UnlitSuffixCmds)
24
25 .lhc.hc:
26         $(UnlitSuffixCmds)
27
28 endif
29
30 # -----------------------------------------------------------------------------
31
32 ifdef UgenSuffixRules
33
34 %.h %.c %.U.hs : %.ugn
35         @$(RM) $@ $*.hs $*.U.hs $*.h
36         $(UGEN) $< || $(RM) $*.h $@ $*.hs
37         @$(MV) -f $*.hs $*.U.hs
38         @chmod 444 $*.h $@ $*.U.hs
39
40 endif