mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-21 09:02:50 -06:00
Cleaned up Makefile, build for unix be default, create nofud-links in the right places.
This commit is contained in:
78
src/Makefile
78
src/Makefile
@@ -1,10 +1,9 @@
|
|||||||
include config.mk
|
include config.mk
|
||||||
|
|
||||||
|
|
||||||
GHMAKE=ghc
|
GHMAKE=$(GHC) --make
|
||||||
GHCI=ghci
|
|
||||||
GHCFLAGS=-package lang -package util -fglasgow-exts
|
GHCFLAGS=-package lang -package util -fglasgow-exts
|
||||||
GHCOPTFLAGS=-O -package lang -package util -fglasgow-exts
|
GHCOPTFLAGS=-O $(GHCFLAGS)
|
||||||
GHCFUDFLAG=-package Fudgets
|
GHCFUDFLAG=-package Fudgets
|
||||||
|
|
||||||
HUGSINCLUDE =.:for-hugs:api:source:canonical:cf:grammar:infra:shell:useGrammar:compile:newparsing:trace:
|
HUGSINCLUDE =.:for-hugs:api:source:canonical:cf:grammar:infra:shell:useGrammar:compile:newparsing:trace:
|
||||||
@@ -14,38 +13,58 @@ GHCINCLUDENOFUD=-ifor-ghc-nofud $(BASICINCLUDE)
|
|||||||
GHCINCLUDEGFT =-ifor-gft $(BASICINCLUDE)
|
GHCINCLUDEGFT =-ifor-gft $(BASICINCLUDE)
|
||||||
WINDOWSINCLUDE =-ifor-windows $(BASICINCLUDE)
|
WINDOWSINCLUDE =-ifor-windows $(BASICINCLUDE)
|
||||||
|
|
||||||
all:
|
all: unix
|
||||||
make today ; make ghc
|
|
||||||
unix:
|
unix: today nofud-links opt
|
||||||
make nofud-links ; make opt
|
|
||||||
windows:
|
windows: today nofud-links justwindows
|
||||||
make nofud-links ; make justwindows
|
|
||||||
install-java:
|
install-java: javac
|
||||||
make javac ; cd ../bin ; ln -s ../src/java ; echo "PLEASE edit GFHOME in bin/jgf2"
|
-rm -f ../bin/java
|
||||||
opt:
|
ln -s ../src/java ../bin
|
||||||
$(GHMAKE) $(GHCOPTFLAGS) $(GHCINCLUDENOFUD) --make GF.hs -o gf2 ; strip gf2 ; mv gf2 ../bin/
|
@echo "PLEASE edit GFHOME in bin/jgf2"
|
||||||
|
opt:
|
||||||
|
$(GHMAKE) $(GHCOPTFLAGS) $(GHCINCLUDENOFUD) GF.hs -o gf2
|
||||||
|
strip gf2
|
||||||
|
mv gf2 ../bin/
|
||||||
|
|
||||||
|
ghc: nofud
|
||||||
|
|
||||||
|
ghci: nofud-links ghci-nofud
|
||||||
|
|
||||||
ghc:
|
|
||||||
make nofud
|
|
||||||
ghci:
|
|
||||||
make nofud-links ; make ghci-nofud
|
|
||||||
fud:
|
fud:
|
||||||
$(GHMAKE) $(GHCFLAGS) $(GHCINCLUDE) $(GHCFUDFLAG) --make GF.hs -o gf2+ ; strip gf2+ ; mv gf2+ ../bin/
|
$(GHMAKE) $(GHCFLAGS) $(GHCINCLUDE) $(GHCFUDFLAG) GF.hs -o gf2+
|
||||||
|
strip gf2+
|
||||||
|
mv gf2+ ../bin/
|
||||||
|
|
||||||
gft:
|
gft:
|
||||||
$(GHMAKE) $(GHCFLAGS) $(GHCINCLUDENOFUD) -itranslate --make translate/GFT.hs -o gft ; strip gft ; mv gft ../bin/
|
$(GHMAKE) $(GHCFLAGS) $(GHCINCLUDENOFUD) -itranslate translate/GFT.hs -o gft
|
||||||
nofud:
|
strip gft
|
||||||
$(GHMAKE) $(GHCFLAGS) $(GHCINCLUDENOFUD) --make GF.hs -o gf2 ; strip gf2 ; mv gf2 ../bin/
|
mv gft ../bin/
|
||||||
|
|
||||||
|
nofud: nofud-links
|
||||||
|
$(GHMAKE) $(GHCFLAGS) $(GHCINCLUDENOFUD) GF.hs -o gf2
|
||||||
|
strip gf2
|
||||||
|
mv gf2 ../bin/
|
||||||
|
|
||||||
justwindows:
|
justwindows:
|
||||||
$(GHMAKE) $(GHCOPTFLAGS) $(WINDOWSINCLUDE) --make GF.hs -o gf2.exe ; strip gf2.exe ; mv gf2.exe ../bin/
|
$(GHMAKE) $(GHCOPTFLAGS) $(WINDOWSINCLUDE) GF.hs -o gf2.exe
|
||||||
|
strip gf2.exe
|
||||||
|
mv gf2.exe ../bin/
|
||||||
|
|
||||||
nofud-links:
|
nofud-links:
|
||||||
cd for-ghc-nofud ; rm -f *.hs ; ln -s ../for-ghc/Arch.hs ; ln -s ../for-hugs/ArchEdit.hs ; cd ..
|
rm -f for-ghc-nofud/*.hs
|
||||||
|
ln -s ../for-ghc/Arch.hs for-ghc-nofud
|
||||||
|
ln -s ../for-hugs/ArchEdit.hs for-ghc-nofud
|
||||||
|
|
||||||
batch:
|
batch:
|
||||||
$(GHMAKE) $(GHCFLAGS) $(GHCINCLUDE) --make GF2.hs -o gf2 ; strip gf2
|
$(GHMAKE) $(GHCFLAGS) $(GHCINCLUDE) GF2.hs -o gf2
|
||||||
|
strip gf2
|
||||||
|
|
||||||
api:
|
api:
|
||||||
$(GHMAKE) $(GHCFLAGS) $(GHCINCLUDE) --make API.hs
|
$(GHMAKE) $(GHCFLAGS) $(GHCINCLUDE) API.hs
|
||||||
shell:
|
shell:
|
||||||
$(GHMAKE) $(GHCFLAGS) $(GHCINCLUDE) --make Shell.hs
|
$(GHMAKE) $(GHCFLAGS) $(GHCINCLUDE) Shell.hs
|
||||||
clean:
|
clean:
|
||||||
-rm -rf */*.o */*.hi *.o *.hi */*.ghi *.ghi *~ */*~
|
-rm -rf */*.o */*.hi *.o *.hi */*.ghi *.ghi *~ */*~
|
||||||
hugs:
|
hugs:
|
||||||
@@ -55,15 +74,18 @@ ghci-nofud:
|
|||||||
today:
|
today:
|
||||||
util/mktoday.sh
|
util/mktoday.sh
|
||||||
javac:
|
javac:
|
||||||
cd java ; javac *.java ; cd ..
|
javac java/*.java
|
||||||
help:
|
help:
|
||||||
cd util ; runhugs MkHelpFile ; mv HelpFile.hs .. ; cd ..
|
cd util ; runhugs MkHelpFile ; mv HelpFile.hs .. ; cd ..
|
||||||
|
|
||||||
# added by peb:
|
# added by peb:
|
||||||
tracing:
|
tracing:
|
||||||
$(GHMAKE) $(GHCFLAGS) -itrace $(GHCINCLUDENOFUD) --make GF.hs -o gf2 ; strip gf2 ; mv gf2 ../bin/
|
$(GHMAKE) $(GHCFLAGS) -itrace $(GHCINCLUDENOFUD) GF.hs -o gf2
|
||||||
|
strip gf2
|
||||||
|
mv gf2 ../bin/
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
|
-rm -f for-ghc-nofud/*.hs
|
||||||
-rm -f config.status config.mk config.log
|
-rm -f config.status config.mk config.log
|
||||||
|
|
||||||
install:
|
install:
|
||||||
|
|||||||
Reference in New Issue
Block a user