Subversion

2lt

?curdirlinks? - Rev 1

?prevdifflink? - Blame


###############################################################################
#
# Generic rules to create an haskell data type module and its pretty-printer
# from a SDF grammar file.
#
# This makefile requires three global variables:
#   SDF2HASKELL    - Program configuration of "Sdf2Haskell"
#                    (in makerules.configuration)
#   SDFGRAMMAR     - file name with full path of the sdf grammar file
#                    (defined in the makefile that imports this)
#   HASKELL_MODULE - name to be used in the module hierarchy (eg. Data.XYZ.)
#                    (defined in the makefile that imports this)
#

Syntax.hs: $(SDFGRAMMAR)
        ${SDF2HASKELL} -i $< -o $@ -h -m $(HASKELL_MODULE)Syntax

SyntaxPP.hs: $(SDFGRAMMAR)
        ${SDF2HASKELL} -i $< -o $@.tmp -p -m $(HASKELL_MODULE)Syntax
        sed 's/SyntaxTermInstances/TermInstances/1' < $@.tmp > $@.tmp1
        sed 's/HughesPJ/HughesPJ hiding (Mode)/1' < $@.tmp1 > $@
        rm -f $@.tmp $@.tmp1


Theme by Vikram Singh | Powered by WebSVN v2.3.3