mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-28 12:54:07 +03:00
tools: update web building rules
This commit is contained in:
parent
1c1058be4e
commit
92ea44dcb8
33
Makefile
33
Makefile
@ -49,8 +49,7 @@ SOURCEFILES:= \
|
|||||||
hledger/Hledger/*/*hs \
|
hledger/Hledger/*/*hs \
|
||||||
hledger-*/*hs \
|
hledger-*/*hs \
|
||||||
hledger-*/Hledger/*hs \
|
hledger-*/Hledger/*hs \
|
||||||
hledger-*/Hledger/*/*hs \
|
hledger-*/Hledger/*/*hs
|
||||||
hledger-web/Hledger/Web/Settings/*hs
|
|
||||||
|
|
||||||
# a more careful list suitable for for haddock
|
# a more careful list suitable for for haddock
|
||||||
HADDOCKSOURCEFILES:= \
|
HADDOCKSOURCEFILES:= \
|
||||||
@ -60,8 +59,7 @@ HADDOCKSOURCEFILES:= \
|
|||||||
hledger/Hledger/*hs \
|
hledger/Hledger/*hs \
|
||||||
hledger/Hledger/*/*hs \
|
hledger/Hledger/*/*hs \
|
||||||
hledger-web/Hledger/*hs \
|
hledger-web/Hledger/*hs \
|
||||||
hledger-web/Hledger/*/*hs \
|
hledger-web/Hledger/*/*hs
|
||||||
hledger-web/Hledger/Web/Settings/*hs
|
|
||||||
|
|
||||||
CABALFILES:= \
|
CABALFILES:= \
|
||||||
hledger/hledger.cabal \
|
hledger/hledger.cabal \
|
||||||
@ -93,10 +91,23 @@ VERSION:=$(shell cat $(VERSIONFILE))
|
|||||||
PATCHLEVEL:=$(shell expr `darcs changes --count --from-tag=\\\\\.` - 1)
|
PATCHLEVEL:=$(shell expr `darcs changes --count --from-tag=\\\\\.` - 1)
|
||||||
|
|
||||||
# build flags
|
# build flags
|
||||||
WARNINGS:=-W -fwarn-tabs -fno-warn-name-shadowing #-fwarn-orphans -fwarn-simple-patterns -fwarn-monomorphism-restriction
|
WARNINGS:=-W -fwarn-tabs -fno-warn-unused-do-bind -fno-warn-name-shadowing #-fwarn-orphans -fwarn-simple-patterns -fwarn-monomorphism-restriction
|
||||||
|
WEBLANGEXTS:=\
|
||||||
|
-XTemplateHaskell \
|
||||||
|
-XQuasiQuotes \
|
||||||
|
-XCPP \
|
||||||
|
-XMultiParamTypeClasses \
|
||||||
|
-XTypeFamilies \
|
||||||
|
-XGADTs \
|
||||||
|
-XGeneralizedNewtypeDeriving \
|
||||||
|
-XFlexibleContexts \
|
||||||
|
-XEmptyDataDecls \
|
||||||
|
-XOverloadedStrings
|
||||||
|
# -XNoMonomorphismRestriction
|
||||||
|
# -XNoImplicitPrelude
|
||||||
PREFERMACUSRLIBFLAGS=-L/usr/lib
|
PREFERMACUSRLIBFLAGS=-L/usr/lib
|
||||||
GHCMEMFLAGS= #+RTS -M200m -RTS
|
GHCMEMFLAGS= #+RTS -M200m -RTS
|
||||||
BUILDFLAGS1:=-rtsopts $(WARNINGS) $(INCLUDEPATHS) $(PREFERMACUSRLIBFLAGS) $(GHCMEMFLAGS) -DPATCHLEVEL=$(PATCHLEVEL)
|
BUILDFLAGS1:=-rtsopts $(WARNINGS) $(INCLUDEPATHS) $(PREFERMACUSRLIBFLAGS) $(GHCMEMFLAGS) -DPATCHLEVEL=$(PATCHLEVEL) -DBLAZE_HTML_0_5 -DDEVELOPMENT
|
||||||
BUILDFLAGS:=$(BUILDFLAGS1) -DVERSION='"$(VERSION)"'
|
BUILDFLAGS:=$(BUILDFLAGS1) -DVERSION='"$(VERSION)"'
|
||||||
AUTOBUILDFLAGS:=$(BUILDFLAGS1) -DVERSION='\"$(VERSION)\"' # different quoting for sp
|
AUTOBUILDFLAGS:=$(BUILDFLAGS1) -DVERSION='\"$(VERSION)\"' # different quoting for sp
|
||||||
PROFBUILDFLAGS:=-prof -fprof-auto -osuf hs_p
|
PROFBUILDFLAGS:=-prof -fprof-auto -osuf hs_p
|
||||||
@ -146,8 +157,12 @@ autotest: sp
|
|||||||
autotest-%: sp
|
autotest-%: sp
|
||||||
$(AUTOBUILD) $(MAIN) -o bin/hledgerdev $(AUTOBUILDFLAGS) --run test $*
|
$(AUTOBUILD) $(MAIN) -o bin/hledgerdev $(AUTOBUILDFLAGS) --run test $*
|
||||||
|
|
||||||
autoweb: sp
|
autoweb: sp web-build-links
|
||||||
$(AUTOBUILD) hledger-web/hledger-web.hs -o bin/hledger-webdev $(AUTOBUILDFLAGS) -DDEVELOPMENT --run -B --port 5001 --base-url http://localhost:5001 -f test.journal
|
$(AUTOBUILD) hledger-web/app/main.hs -o bin/hledger-webdev $(AUTOBUILDFLAGS) $(WEBLANGEXTS) --run -B --port 5001 --base-url http://localhost:5001 -f test.journal
|
||||||
|
|
||||||
|
web-build-links:
|
||||||
|
ln -sf hledger-web/config
|
||||||
|
ln -sf hledger-web/messages
|
||||||
|
|
||||||
# check for sp and explain how to get it if not found.
|
# check for sp and explain how to get it if not found.
|
||||||
sp:
|
sp:
|
||||||
@ -443,7 +458,7 @@ quickheap: samplejournals bin/hledgerprof
|
|||||||
$(VIEWPS) hledger.ps
|
$(VIEWPS) hledger.ps
|
||||||
|
|
||||||
# display a code coverage text report from running hledger COVCMD
|
# display a code coverage text report from running hledger COVCMD
|
||||||
quickcoverage:
|
quickcoverage: hledgerhpc
|
||||||
@echo "Generating code coverage text report for hledger command: $(COVCMD)"
|
@echo "Generating code coverage text report for hledger command: $(COVCMD)"
|
||||||
tools/runhledgerhpc "report" $(COVCMD)
|
tools/runhledgerhpc "report" $(COVCMD)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user