Skip to content

Commit

Permalink
enabling generation with either MetaEnv or Stratego
Browse files Browse the repository at this point in the history
git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@112 ab42f6e0-554d-0410-b580-99e487e6eeb2
  • Loading branch information
grammarware committed Aug 1, 2008
1 parent 02976f6 commit 30f35e4
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions topics/fl/asfsdf/Makefile
@@ -1,9 +1,13 @@
metaenv = `which sdf2table | xargs dirname`/../share
sdfl = ${metaenv}/sdf-library/library/basic
asfl = ${metaenv}/asf-library/library/basic
metaenv = `which asfe | xargs dirname`/..
sdfl = ${metaenv}/share/sdf-library/library
asfl = ${metaenv}/share/asf-library/library

all:
make build
if [ -r /usr/local/bin/pack-sdf ]; then \
make strategobuild ; \
else \
make build ; \
fi
make test

test:
Expand All @@ -13,12 +17,18 @@ test:
build:
echo definition > FL.def
cat *.sdf syntax/*.sdf optimise/*.sdf >> FL.def
cat ${sdfl}/Whitespace.sdf ${sdfl}/Comments.sdf >> FL.def
cat ${sdfl}/NatCon.sdf ${sdfl}/IntCon.sdf ${sdfl}/BoolCon.sdf >> FL.def
cat ${asfl}/Integers.sdf ${asfl}/Booleans.sdf >>FL.def
cat ${sdfl}/basic/Whitespace.sdf ${sdfl}/basic/Comments.sdf >> FL.def
cat ${sdfl}/basic/NatCon.sdf ${sdfl}/basic/IntCon.sdf ${sdfl}/basic/BoolCon.sdf >> FL.def
cat ${asfl}/basic/Integers.sdf ${asfl}/basic/Booleans.sdf >>FL.def
sdf2table -m FL FL.def

strategobuild:
@cp ${sdfl}/basic/*.sdf basic
@cp ${asfl}/basic/*.sdf basic
pack-sdf -i FL.sdf -o FL.def
sdf2table -m FL FL.def

clean:
rm -f reduct.out
rm -f FL.def

rm -rf basic/*

0 comments on commit 30f35e4

Please sign in to comment.