mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-28 01:18:57 -06:00
Makefile now works with: global runghc, stack-only runghc, and falls back to shell script.
This commit is contained in:
30
Makefile
30
Makefile
@@ -1,16 +1,32 @@
|
||||
# A simple wrapper over the Haskell-based RGL build script
|
||||
# A wrapper over the Haskell and Bash build scripts
|
||||
# Will try and fallback in order:
|
||||
# - runghc Setup.hs
|
||||
# - stack runghc Setup.hs
|
||||
# - ./Setup.sh
|
||||
|
||||
RUNMAKE=runghc Setup.hs
|
||||
ifneq (, $(shell which runghc))
|
||||
RUNGHC=runghc Setup.hs
|
||||
else ifneq (, $(shell which stack))
|
||||
RUNGHC=stack runghc Setup.hs
|
||||
else
|
||||
RUNGHC=
|
||||
endif
|
||||
|
||||
.PHONY: build copy install doc clean
|
||||
|
||||
default: build copy
|
||||
|
||||
build: src/*/*.gf
|
||||
$(RUNMAKE) build
|
||||
ifneq (, $(RUNGHC))
|
||||
$(RUNGHC) build
|
||||
else
|
||||
./Setup.sh
|
||||
endif
|
||||
|
||||
copy:
|
||||
$(RUNMAKE) copy
|
||||
ifneq (, $(RUNGHC))
|
||||
$(RUNGHC) copy
|
||||
endif
|
||||
|
||||
install: build copy
|
||||
|
||||
@@ -18,4 +34,8 @@ doc: build
|
||||
make -C doc GF_LIB_PATH=../dist
|
||||
|
||||
clean:
|
||||
$(RUNMAKE) clean
|
||||
ifneq (, $(RUNGHC))
|
||||
$(RUNGHC) clean
|
||||
else
|
||||
rm -r dist
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user