summaryrefslogtreecommitdiff
path: root/ghc/mk/suffix.mk
diff options
context:
space:
mode:
Diffstat (limited to 'ghc/mk/suffix.mk')
-rw-r--r--ghc/mk/suffix.mk21
1 files changed, 21 insertions, 0 deletions
diff --git a/ghc/mk/suffix.mk b/ghc/mk/suffix.mk
new file mode 100644
index 0000000000..5cec340b11
--- /dev/null
+++ b/ghc/mk/suffix.mk
@@ -0,0 +1,21 @@
+#################################################################################
+#
+# $Id: suffix.mk,v 1.1 1997/03/14 08:00:37 simonpj Exp $
+#
+# GHC-specific suffix rules
+#
+#################################################################################
+
+#-----------------------------------------------------------------------------
+# Ugen suffix rules.
+#
+# Hack, the implicit rule assumes the ugen files
+# resides in a directory parser/
+#
+
+parser/%.h parser/%.c parser/U_%.hs : parser/%.ugn
+ @$(RM) $@ parser/$*.hs parser/U_$*.hs parser/$*.h
+ $(UGEN) $< || $(RM) parser/$*.h parser/$*.hs
+ @$(MV) -f parser/$*.hs parser/U_$*.hs
+ @chmod 444 parser/$*.h parser/U_$*.hs
+