add CABAL_FLAGS

This commit is contained in:
Rhiannon Morris 2021-04-30 13:48:23 +02:00
parent ebd16b5d6b
commit 2b80abe763
1 changed files with 4 additions and 2 deletions

View File

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