7c95850c04452768b3420bee842477db5ab36e13
[ghc-hetmet.git] / ghc / mk / suffix.mk
1 #################################################################################
2 #
3 #        $Id: suffix.mk,v 1.5 1998/12/03 15:24:08 simonm Exp $
4 #
5 #               GHC-specific suffix rules
6 #
7 #################################################################################
8
9 #-----------------------------------------------------------------------------
10 # Ugen suffix rules. 
11 #
12 # Hack, the implicit rule assumes the ugen files
13 # resides in a directory parser/
14 #
15
16 parser/U_%.hs : parser/%.c
17         @:
18
19 parser/%.h parser/%.c : parser/%.ugn
20         @$(RM) $@ parser/$*.c parser/$*.hs parser/U_$*.hs parser/$*.h
21         $(UGEN) $< || $(RM) parser/$*.h parser/$*.c parser/$*.hs
22         @$(MV) -f parser/$*.hs parser/U_$*.hs
23         @chmod 444 parser/$*.h parser/$*.c parser/U_$*.hs
24