tools: update linux binary building

This commit is contained in:
Simon Michael 2010-12-10 22:00:42 +00:00
parent 5c403180dd
commit 5fe830d703

View File

@ -55,7 +55,6 @@ CABALFILES:= \
hledger/hledger.cabal \
hledger-*/*.cabal
# DOCFILES:=README DOWNLOAD MANUAL DEVELOPMENT NEWS SCREENSHOTS CONTRIBUTORS
BINARYFILENAME=$(shell touch $(VERSIONHS); runhaskell -ihledger $(MAIN) --binary-filename)
PATCHLEVEL:=$(shell expr `darcs changes --count --from-tag=\\\\\.` - 1)
WARNINGS:=-W -fwarn-tabs #-fwarn-orphans -fwarn-simple-patterns -fwarn-monomorphism-restriction -fwarn-name-shadowing
DEFINEFLAGS:=
@ -84,6 +83,9 @@ VERSIONSENSITIVEFILES=\
$(CABALFILES) \
hledger-web/.hledger/web/.version \
#BINARYFILENAME=$(shell touch $(VERSIONHS); runhaskell -ihledger $(MAIN) --binary-filename)
RELEASEBINARYSUFFIX:=$(shell echo "-$(VERSION)-`uname`-`arch`" | tr '[:upper:]' '[:lower:]')
default: tag hledger
######################################################################
@ -225,6 +227,13 @@ hledgerlinux: setversion
@echo 'Please check the build looks portable (statically linked):'
-file bin/$(BINARYFILENAME)
linuxbinary-%:
ghc --make $*/$*.hs -o bin/$*$(RELEASEBINARYSUFFIX) $(LINUXRELEASEBUILDFLAGS)
# XXX link errors
linuxbinary-hledger-chart:
ghc --make hledger-chart/hledger-chart.hs -o bin/hledger-chart$(RELEASEBINARYSUFFIX) $(LINUXRELEASEBUILDFLAGS) -lpixman-1 -v
# build a deployable binary for mac, using only standard osx libs
hledgermac: setversion
ghc --make $(MAIN) -o bin/$(BINARYFILENAME) $(BUILDFLAGS) -O2 # -optl-L/usr/lib