add CABAL_FLAGS

This commit is contained in:
Rhiannon Morris 2021-04-30 13:48:23 +02:00
parent ebd16b5d6b
commit 2b80abe763

View file

@ -26,6 +26,8 @@ LANGFILTER = $(TMPDIR)/langfilter
LAANTAS_SCRIPT = $(TMPDIR)/laantas-script LAANTAS_SCRIPT = $(TMPDIR)/laantas-script
EXECS = $(LANGFILTER) EXECS = $(LANGFILTER)
CABAL_FLAGS ?= -O
.PHONY: all .PHONY: all
all: build all: build
@ -48,13 +50,13 @@ $(BUILDDIR)/%: %
cp $< $@ cp $< $@
$(LANGFILTER): langfilter/*.hs langfilter/langfilter.cabal $(LANGFILTER): langfilter/*.hs langfilter/langfilter.cabal
cabal build langfilter cabal build langfilter $(CABAL_FLAGS)
mkdir -p $(dir $@) mkdir -p $(dir $@)
find dist-newstyle -name $(notdir $@) \ find dist-newstyle -name $(notdir $@) \
-print -type f -exec cp {} $(TMPDIR) \; -print -type f -exec cp {} $(TMPDIR) \;
$(LAANTAS_SCRIPT): laantas-script/*.hs laantas-script/laantas-script.cabal $(LAANTAS_SCRIPT): laantas-script/*.hs laantas-script/laantas-script.cabal
cabal build laantas-script cabal build laantas-script $(CABAL_FLAGS)
mkdir -p $(dir $@) mkdir -p $(dir $@)
find dist-newstyle -name $(notdir $@) \ find dist-newstyle -name $(notdir $@) \
-type f -exec cp {} $(TMPDIR) \; -type f -exec cp {} $(TMPDIR) \;