tools: misc building updates
This commit is contained in:
parent
fe4152b8cb
commit
f24decf73a
75
Makefile
75
Makefile
@ -106,7 +106,7 @@ cabaltest: allcabaltest
|
|||||||
|
|
||||||
# run a cabal command in all hledger package dirs
|
# run a cabal command in all hledger package dirs
|
||||||
allcabal%:
|
allcabal%:
|
||||||
for p in $(PACKAGES); do (echo doing cabal $* in $$p; cd $$p; cabal $*); done
|
for p in $(PACKAGES); do (echo doing cabal $* in $$p; cd $$p; cabal $*; echo); done
|
||||||
|
|
||||||
# run a command in all hledger package dirs
|
# run a command in all hledger package dirs
|
||||||
all%:
|
all%:
|
||||||
@ -186,9 +186,10 @@ tools/generatejournal: tools/generatejournal.hs
|
|||||||
######################################################################
|
######################################################################
|
||||||
# BUILDING
|
# BUILDING
|
||||||
|
|
||||||
hledgerall: hledger hledger-web hledger-vty hledger-chart
|
hledgerall: bin/hledger hledger-web hledger-vty hledger-chart
|
||||||
|
|
||||||
# build developer binaries, as quickly as possible
|
# build developer binaries, as quickly as possible
|
||||||
|
# this one is named bin/ to avoid case clash on mac
|
||||||
bin/hledger:
|
bin/hledger:
|
||||||
ghc --make $(MAIN) -o bin/hledger $(BUILDFLAGS)
|
ghc --make $(MAIN) -o bin/hledger $(BUILDFLAGS)
|
||||||
|
|
||||||
@ -269,7 +270,7 @@ hlinttest hlint:
|
|||||||
# run unit tests
|
# run unit tests
|
||||||
unittest: unittest-builtin
|
unittest: unittest-builtin
|
||||||
|
|
||||||
unittest-builtin: hledger
|
unittest-builtin: bin/hledger
|
||||||
@(bin/hledger test \
|
@(bin/hledger test \
|
||||||
&& echo $@ PASSED) || echo $@ FAILED
|
&& echo $@ PASSED) || echo $@ FAILED
|
||||||
|
|
||||||
@ -301,42 +302,45 @@ haddocktest:
|
|||||||
@(make --quiet codehaddock \
|
@(make --quiet codehaddock \
|
||||||
&& echo $@ PASSED) || echo $@ FAILED
|
&& echo $@ PASSED) || echo $@ FAILED
|
||||||
|
|
||||||
|
# needs updating
|
||||||
# make sure the normal build has no warnings
|
# make sure the normal build has no warnings
|
||||||
warningstest:
|
warningstest:
|
||||||
@(make -s clean \
|
@(make -s clean \
|
||||||
&& make --no-print-directory -s hledgernowarnings \
|
&& make --no-print-directory -s hledgernowarnings \
|
||||||
&& echo $@ PASSED) || echo $@ FAILED
|
&& echo $@ PASSED) || echo $@ FAILED
|
||||||
|
|
||||||
# make sure cabal is reasonably happy
|
# needs updating
|
||||||
quickcabaltest:
|
# # make sure cabal is reasonably happy
|
||||||
(cd hledger-lib \
|
# quickcabaltest:
|
||||||
&& cabal clean \
|
# (cd hledger-lib \
|
||||||
&& cabal check \
|
# && cabal clean \
|
||||||
&& cabal configure \
|
# && cabal check \
|
||||||
&& cd .. \
|
# && cabal configure \
|
||||||
&& cabal clean \
|
# && cd .. \
|
||||||
&& cabal check \
|
# && cabal clean \
|
||||||
&& cabal configure \
|
# && cabal check \
|
||||||
&& echo $@ PASSED) || echo $@ FAILED
|
# && cabal configure \
|
||||||
|
# && echo $@ PASSED) || echo $@ FAILED
|
||||||
|
|
||||||
|
# needs updating
|
||||||
# make sure cabal is happy in all possible ways
|
# make sure cabal is happy in all possible ways
|
||||||
fullcabaltest:
|
# # fullcabaltest:
|
||||||
(cd hledger-lib \
|
# (cd hledger-lib \
|
||||||
&& cabal clean \
|
# && cabal clean \
|
||||||
&& cabal check \
|
# && cabal check \
|
||||||
&& cabal install \
|
# && cabal install \
|
||||||
&& cabal sdist \
|
# && cabal sdist \
|
||||||
&& cabal upload dist/hledger-lib-$(VERSION).tar.gz --check -v3 \
|
# && cabal upload dist/hledger-lib-$(VERSION).tar.gz --check -v3 \
|
||||||
&& cd .. \
|
# && cd .. \
|
||||||
&& cabal clean \
|
# && cabal clean \
|
||||||
&& cabal check \
|
# && cabal check \
|
||||||
&& cabal configure \
|
# && cabal configure \
|
||||||
&& cabal build \
|
# && cabal build \
|
||||||
&& dist/build/hledger/hledger test 2>&1 | tail -1 | grep -q 'Errors: 0 Failures: 0' \
|
# && dist/build/hledger/hledger test 2>&1 | tail -1 | grep -q 'Errors: 0 Failures: 0' \
|
||||||
&& cabal sdist \
|
# && cabal sdist \
|
||||||
&& cabal upload dist/hledger-$(VERSION).tar.gz --check -v3 \
|
# && cabal upload dist/hledger-$(VERSION).tar.gz --check -v3 \
|
||||||
&& echo $@ PASSED \
|
# && echo $@ PASSED \
|
||||||
) || echo $@ FAILED
|
# ) || echo $@ FAILED
|
||||||
|
|
||||||
# run simple performance benchmarks without saving results
|
# run simple performance benchmarks without saving results
|
||||||
# Requires some commands defined in bench.tests and some BENCHEXES defined above.
|
# Requires some commands defined in bench.tests and some BENCHEXES defined above.
|
||||||
@ -653,7 +657,7 @@ sourcegraph:
|
|||||||
release: releasetest setandrecordversion tagrelease
|
release: releasetest setandrecordversion tagrelease
|
||||||
|
|
||||||
# Upload the latest cabal package and update hledger.org
|
# Upload the latest cabal package and update hledger.org
|
||||||
upload: sdist hackageupload pushdocs
|
upload: allcabalsdist hackageupload pushdocs
|
||||||
|
|
||||||
releaseandupload: release upload
|
releaseandupload: release upload
|
||||||
|
|
||||||
@ -708,14 +712,9 @@ DOWNLOAD.markdown: $(VERSIONFILE)
|
|||||||
tagrelease:
|
tagrelease:
|
||||||
darcs tag $(VERSION3)
|
darcs tag $(VERSION3)
|
||||||
|
|
||||||
sdist:
|
|
||||||
cd hledger-lib; cabal sdist
|
|
||||||
cabal sdist
|
|
||||||
|
|
||||||
# display a hackage upload command reminder
|
# display a hackage upload command reminder
|
||||||
hackageupload:
|
hackageupload:
|
||||||
cabal upload hledger-lib/dist/hledger-lib-$(VERSION).tar.gz -v3
|
for p in $(PACKAGES); do cabal upload $$p/dist/$$p-$(VERSION).tar.gz -v3; done
|
||||||
cabal upload dist/hledger-$(VERSION).tar.gz -v3
|
|
||||||
|
|
||||||
# send unpushed patches to the mail list
|
# send unpushed patches to the mail list
|
||||||
send:
|
send:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user