2009-01-25 12:00:57 +03:00
|
|
|
# hledger project makefile
|
2008-12-10 21:43:14 +03:00
|
|
|
|
2009-06-02 22:29:01 +04:00
|
|
|
SOURCEFILES:=*hs Commands/*hs Ledger/*hs
|
|
|
|
DOCFILES=HOME README NEWS CONTRIBUTORS SCREENSHOTS
|
2009-05-29 23:26:09 +04:00
|
|
|
TIME:=`date +"%Y%m%d%H%M"`
|
2009-02-27 05:55:54 +03:00
|
|
|
|
|
|
|
# patches since last release tag (as a haskell string literal)
|
2009-03-05 21:20:19 +03:00
|
|
|
PATCHES:=$(shell expr `darcs changes --count --from-tag=\\\\\.` - 1)
|
2009-02-27 05:55:54 +03:00
|
|
|
|
2009-05-29 12:29:04 +04:00
|
|
|
# optional flags described in README, turn em on if you've got the libs
|
|
|
|
OPTFLAGS=-DHAPPS -DVTY
|
|
|
|
|
|
|
|
BUILDFLAGS=-DPATCHES=$(PATCHES) $(OPTFLAGS)
|
|
|
|
|
2009-05-29 23:26:09 +04:00
|
|
|
# command to run during "make ci"
|
|
|
|
#CICMD=web --debug -BE
|
|
|
|
CICMD=test
|
|
|
|
|
2009-06-02 22:29:01 +04:00
|
|
|
# executables to benchtest, prepend ./ if not in $PATH.
|
|
|
|
BENCHEXES=hledger-0.4 hledger-0.5 ledger
|
|
|
|
|
2009-05-29 23:26:09 +04:00
|
|
|
# command to run during profiling
|
|
|
|
PROFCMD=-f 1000x1000x10.ledger balance
|
|
|
|
|
2009-06-02 23:54:45 +04:00
|
|
|
# document viewing commands
|
|
|
|
VIEWHTMLCMD=open
|
2009-05-29 23:49:11 +04:00
|
|
|
VIEWPSCMD=open
|
|
|
|
|
2009-05-29 12:29:04 +04:00
|
|
|
default: tag hledger
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
# BUILDING, DEBUGGING
|
|
|
|
|
|
|
|
# build the standard developer's binary, quickly
|
|
|
|
hledger: setversion
|
|
|
|
ghc --make hledger.hs -o hledger $(BUILDFLAGS) # -O
|
|
|
|
|
|
|
|
# build the profiling-enabled binary. You may need to cabal install
|
|
|
|
# --reinstall -p some libs.
|
|
|
|
hledgerp: setversion
|
|
|
|
ghc --make hledger.hs -prof -auto-all -o hledgerp #$(BUILDFLAGS)
|
|
|
|
|
2009-05-29 23:49:11 +04:00
|
|
|
# build the coverage-enabled binary (untested)
|
|
|
|
hledgercov: setversion
|
|
|
|
ghc --make hledger.hs -hpc -o hledgercov $(BUILDFLAGS)
|
|
|
|
|
2009-05-29 12:29:04 +04:00
|
|
|
# build the fastest binary we can
|
|
|
|
hledgeropt: setversion
|
|
|
|
ghc --make hledger.hs -o hledgeropt -O2 -fvia-C $(BUILDFLAGS)
|
|
|
|
|
|
|
|
# "continuous integration" testing - auto-recompile and run hledger test
|
|
|
|
# (or some other command) whenever a module changes. sp is from
|
|
|
|
# searchpath.org , you might need the patched version from
|
|
|
|
# http://joyful.com/repos/searchpath .
|
2009-02-27 05:55:54 +03:00
|
|
|
continuous ci: setversion
|
2009-01-20 06:48:05 +03:00
|
|
|
sp --no-exts --no-default-map -o hledger ghc --make hledger.hs $(BUILDFLAGS) --run $(CICMD)
|
2008-10-17 20:59:05 +04:00
|
|
|
|
2009-05-29 12:29:04 +04:00
|
|
|
# build the benchmark runner. Requires tabular from hackage.
|
|
|
|
bench:
|
|
|
|
ghc --make tools/bench.hs
|
2009-01-26 23:27:41 +03:00
|
|
|
|
2009-05-29 12:29:04 +04:00
|
|
|
# build the doctest runner
|
|
|
|
tools/doctest: tools/doctest.hs
|
|
|
|
ghc --make tools/doctest.hs
|
|
|
|
|
|
|
|
# build the generateledger tool
|
|
|
|
generateledger: tools/generateledger.hs
|
|
|
|
ghc --make tools/generateledger.hs
|
|
|
|
|
|
|
|
# get a debug prompt
|
2009-03-15 08:15:59 +03:00
|
|
|
ghci:
|
|
|
|
ghci hledger.hs
|
|
|
|
|
2009-05-29 23:49:11 +04:00
|
|
|
# generate, save and display a standard profile
|
2009-05-29 12:29:04 +04:00
|
|
|
prof: sampleledgers hledgerp
|
|
|
|
@echo "Profiling $(PROFCMD)"
|
|
|
|
./hledgerp +RTS -p -RTS $(PROFCMD) >/dev/null
|
2009-05-29 23:26:09 +04:00
|
|
|
mv hledgerp.prof profs/$(TIME)-orig.prof
|
|
|
|
tools/simplifyprof.hs profs/$(TIME)-orig.prof >profs/$(TIME).prof
|
|
|
|
(cd profs; rm -f latest*.prof; ln -s $(TIME)-orig.prof latest-orig.prof; ln -s $(TIME).prof latest.prof)
|
|
|
|
echo; cat profs/latest.prof
|
|
|
|
|
2009-05-29 23:49:11 +04:00
|
|
|
# generate, save and display a graphical heap profile
|
|
|
|
heap: sampleledgers hledgerp
|
|
|
|
@echo "Profiling heap with $(PROFCMD)"
|
|
|
|
./hledgerp +RTS -hc -RTS $(PROFCMD) >/dev/null
|
|
|
|
mv hledgerp.hp profs/$(TIME).hp
|
|
|
|
(cd profs; rm -f latest.hp; ln -s $(TIME).hp latest.hp; \
|
|
|
|
hp2ps $(TIME).hp; rm -f latest.ps; ln -s $(TIME).ps latest.ps)
|
|
|
|
$(VIEWPSCMD) profs/latest.ps
|
|
|
|
|
|
|
|
# generate, save and display a code coverage report (untested)
|
|
|
|
coverage: sampleledgers hledgercov
|
|
|
|
@echo "Generating coverage report with $(PROFCMD)"
|
|
|
|
./hledgercov $(PROFCMD) >/dev/null
|
|
|
|
hpc report hledgercov
|
|
|
|
#hpc markup hledgercov
|
2009-05-29 12:29:04 +04:00
|
|
|
|
|
|
|
######################################################################
|
|
|
|
# TESTING
|
|
|
|
|
2009-03-15 08:15:59 +03:00
|
|
|
# run all tests
|
2009-04-16 10:34:12 +04:00
|
|
|
test: unittest doctest haddocktest
|
2009-03-15 08:15:59 +03:00
|
|
|
|
|
|
|
# run unit tests, without waiting for compilation
|
|
|
|
unittest:
|
2009-02-27 06:09:01 +03:00
|
|
|
runghc hledger.hs test
|
2008-12-05 12:28:24 +03:00
|
|
|
|
2009-03-15 08:15:59 +03:00
|
|
|
# run doc tests
|
2009-03-15 11:47:23 +03:00
|
|
|
doctest: tools/doctest
|
2009-04-16 10:34:12 +04:00
|
|
|
@tools/doctest AddCommand.hs
|
|
|
|
@tools/doctest Tests.hs
|
2009-03-15 11:47:23 +03:00
|
|
|
|
2009-05-29 12:29:04 +04:00
|
|
|
# make sure we have no haddock errors
|
|
|
|
haddocktest:
|
|
|
|
@make --quiet haddock
|
2009-03-15 08:15:59 +03:00
|
|
|
|
2009-05-29 12:29:04 +04:00
|
|
|
# run performance tests and save results in profs/.
|
2009-06-02 22:29:01 +04:00
|
|
|
# Requires some tests defined in bench.tests and some executables defined above.
|
2009-05-29 12:29:04 +04:00
|
|
|
benchtest: sampleledgers bench.tests bench
|
2009-05-29 23:26:09 +04:00
|
|
|
tools/bench -fbench.tests $(BENCHEXES) | tee profs/$(TIME).bench
|
|
|
|
@(cd profs; rm -f latest.bench; ln -s $(TIME).bench latest.bench)
|
2008-12-10 23:46:18 +03:00
|
|
|
|
2009-05-29 12:29:04 +04:00
|
|
|
# generate standard sample ledgers
|
|
|
|
sampleledgers: sample.ledger 100x100x10.ledger 1000x1000x10.ledger 10000x1000x10.ledger \
|
|
|
|
100000x1000x10.ledger 1000.ledger 10000.ledger 100000.ledger 1000x1000x10.ledger
|
|
|
|
|
|
|
|
sample.ledger:
|
|
|
|
true # XXX should probably regenerate this
|
|
|
|
|
|
|
|
100x100x10.ledger: generateledger
|
|
|
|
tools/generateledger 1000 1000 10 >$@
|
|
|
|
|
|
|
|
1000x1000x10.ledger: generateledger
|
|
|
|
tools/generateledger 1000 1000 10 >$@
|
2008-11-26 22:00:55 +03:00
|
|
|
|
2009-05-29 12:29:04 +04:00
|
|
|
10000x1000x10.ledger: generateledger
|
|
|
|
tools/generateledger 10000 1000 10 >$@
|
2009-05-17 18:13:06 +04:00
|
|
|
|
2009-05-29 12:29:04 +04:00
|
|
|
100000x1000x10.ledger: generateledger
|
|
|
|
tools/generateledger 100000 1000 10 >$@
|
|
|
|
|
|
|
|
# keep for next benchmark report..
|
|
|
|
1000include.ledger:
|
2009-04-04 00:49:33 +04:00
|
|
|
ghc -e 'putStr $$ unlines $$ replicate 1000 "!include sample.ledger"' >1000.ledger
|
2009-05-17 18:13:06 +04:00
|
|
|
|
2009-05-29 12:29:04 +04:00
|
|
|
10000include.ledger:
|
2009-04-04 00:49:33 +04:00
|
|
|
ghc -e 'putStr $$ unlines $$ replicate 10000 "!include sample.ledger"' >10000.ledger
|
2009-05-17 18:13:06 +04:00
|
|
|
|
2009-05-29 12:29:04 +04:00
|
|
|
100000include.ledger:
|
2009-04-04 00:49:33 +04:00
|
|
|
ghc -e 'putStr $$ unlines $$ replicate 100000 "!include sample.ledger"' >100000.ledger
|
2009-01-17 21:40:27 +03:00
|
|
|
|
2009-05-29 12:29:04 +04:00
|
|
|
######################################################################
|
2009-06-02 23:54:45 +04:00
|
|
|
# DOCUMENTATION
|
2009-01-25 10:48:41 +03:00
|
|
|
|
2009-06-02 23:54:45 +04:00
|
|
|
# website/ and website/api-doc/ always exist. website contains both
|
|
|
|
# generated files (UPPERCASE.html) and revision-controlled resource files
|
|
|
|
# (everything else). website/api-doc contains only generated files.
|
|
|
|
cleandocs:
|
|
|
|
rm -rf website/[A-Z]*.html website/api-doc/*
|
2009-06-02 10:20:19 +04:00
|
|
|
|
2009-06-02 23:54:45 +04:00
|
|
|
# rebuild all docs
|
|
|
|
docs: web pdf api-docs
|
2009-05-29 12:29:04 +04:00
|
|
|
|
2009-06-02 23:54:45 +04:00
|
|
|
# build the main hledger.org website
|
|
|
|
web:
|
|
|
|
for d in $(DOCFILES); do pandoc -s -H website/header.html -A website/footer.html -r rst $$d >website/$$d.html; done
|
|
|
|
cd website; rm -f index.html; ln -s HOME.html index.html
|
2009-06-02 10:58:43 +04:00
|
|
|
|
2009-06-02 23:54:45 +04:00
|
|
|
# generate pdf versions of main docs
|
|
|
|
pdf:
|
|
|
|
-for d in $(DOCFILES); do rst2pdf $$d -o website/$$d.pdf; done
|
2009-05-29 12:29:04 +04:00
|
|
|
|
2009-06-02 23:54:45 +04:00
|
|
|
# generate api docs
|
2009-05-29 12:29:04 +04:00
|
|
|
# We munge haddock and hoogle into a rough but useful framed layout.
|
|
|
|
# For this to work the hoogle cgi must be built with base target "main".
|
2009-06-02 23:54:45 +04:00
|
|
|
api-docs: haddock hoogle
|
2009-05-29 12:29:04 +04:00
|
|
|
echo "Converting api docs to frames" ; \
|
2009-06-02 23:54:45 +04:00
|
|
|
sed -i -e 's%^></HEAD%><base target="main"></HEAD%' website/api-doc/modules-index.html ; \
|
|
|
|
cp website/api-doc-frames.html website/api-doc/index.html ; \
|
|
|
|
cp website/hoogle-small.html website/api-doc
|
2009-05-29 12:29:04 +04:00
|
|
|
|
2009-06-02 23:54:45 +04:00
|
|
|
# generate and view the api docs
|
2009-05-29 12:29:04 +04:00
|
|
|
view-api-docs: api-docs
|
2009-06-02 23:54:45 +04:00
|
|
|
$(VIEWHTMLCMD) website/api-doc/index.html
|
2009-05-29 12:29:04 +04:00
|
|
|
|
|
|
|
MAIN=hledger.hs
|
|
|
|
|
2009-06-02 23:54:45 +04:00
|
|
|
# --ignore-all-exports means we are documenting internal implementation, not library api
|
2009-05-29 12:29:04 +04:00
|
|
|
HADDOCK=haddock -B `ghc --print-libdir` --no-warnings --ignore-all-exports $(subst -D,--optghc=-D,$(BUILDFLAGS))
|
2009-06-02 23:54:45 +04:00
|
|
|
haddock: hscolour $(MAIN)
|
2009-05-29 12:29:04 +04:00
|
|
|
echo "Generating haddock api docs with source" ; \
|
2009-06-02 23:54:45 +04:00
|
|
|
$(HADDOCK) -o website/api-doc -h --source-module=src-%{MODULE/./-}.html --source-entity=src-%{MODULE/./-}.html#%N $(filter-out %api-doc-dir hscolour,$^) && \
|
|
|
|
cp website/api-doc/index.html website/api-doc/modules-index.html
|
2009-05-29 12:29:04 +04:00
|
|
|
|
|
|
|
HSCOLOUR=HsColour -css
|
2009-06-02 23:54:45 +04:00
|
|
|
hscolour:
|
2009-05-29 12:29:04 +04:00
|
|
|
echo "Generating colourised source" ; \
|
2009-06-02 22:29:01 +04:00
|
|
|
for f in $(SOURCEFILES); do \
|
2009-06-02 23:54:45 +04:00
|
|
|
$(HSCOLOUR) -anchor $$f -owebsite/api-doc/`echo "src/"$$f | sed -e's%/%-%g' | sed -e's%\.hs$$%.html%'` ; \
|
2009-05-29 12:29:04 +04:00
|
|
|
done ; \
|
2009-06-02 23:54:45 +04:00
|
|
|
cp website/api-doc/src-hledger.html website/api-doc/src-Main.html ; \
|
|
|
|
HsColour -print-css >website/api-doc/hscolour.css
|
2009-05-29 12:29:04 +04:00
|
|
|
|
|
|
|
#set up the hoogle web interface
|
|
|
|
#uses a hoogle source tree configured with --datadir=., patched to fix haddock urls/target frame
|
|
|
|
HOOGLESRC=/usr/local/src/hoogle
|
|
|
|
HOOGLE=$(HOOGLESRC)/dist/build/hoogle/hoogle
|
|
|
|
HOOGLEVER=`$(HOOGLE) --version |tail -n 1 | sed -e 's/Version /hoogle-/'`
|
2009-06-02 23:54:45 +04:00
|
|
|
hoogle: hoogleindex
|
2009-05-29 12:29:04 +04:00
|
|
|
echo "Configuring hoogle web interface" ; \
|
|
|
|
if test -f $(HOOGLE) ; then \
|
2009-06-02 23:54:45 +04:00
|
|
|
cd website/api-doc && \
|
2009-05-29 12:29:04 +04:00
|
|
|
rm -f $(HOOGLEVER) && \
|
|
|
|
ln -s . $(HOOGLEVER) && \
|
|
|
|
cp -r $(HOOGLESRC)/src/res/ . && \
|
|
|
|
cp -p $(HOOGLE) index.cgi && \
|
|
|
|
touch log.txt && chmod 666 log.txt ; \
|
|
|
|
else \
|
|
|
|
echo "Could not find $(HOOGLE) in the hoogle source tree" ; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
#generate a hoogle index
|
|
|
|
hoogleindex: $(MAIN)
|
|
|
|
echo "Generating hoogle index" ; \
|
2009-06-02 23:54:45 +04:00
|
|
|
$(HADDOCK) -o website/api-doc --hoogle $^ && \
|
|
|
|
cd website/api-doc && \
|
2009-05-29 12:29:04 +04:00
|
|
|
hoogle --convert=main.txt --output=default.hoo
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
# RELEASING
|
2009-01-25 11:09:09 +03:00
|
|
|
|
2009-02-26 20:37:46 +03:00
|
|
|
# Places where hledger's version number makes an appearance:
|
|
|
|
# hledger --version
|
2009-02-27 05:55:54 +03:00
|
|
|
# hledger's cabal file
|
|
|
|
# darcs tags
|
|
|
|
# hackage tarball filenames
|
|
|
|
# hackage pages
|
2009-02-26 20:37:46 +03:00
|
|
|
#
|
2009-02-27 05:55:54 +03:00
|
|
|
# Goals and constraints for our version number system:
|
2009-02-26 20:37:46 +03:00
|
|
|
# 1 automation, robustness, simplicity, platform independence
|
|
|
|
# 2 cabal versions must be all-numeric
|
2009-02-27 05:55:54 +03:00
|
|
|
# 3 release versions can be concise (without extra .0's)
|
2009-02-26 20:37:46 +03:00
|
|
|
# 4 releases should have a corresponding darcs tag
|
|
|
|
# 5 development builds should have a precise version appearing in --version
|
|
|
|
# 6 development builds should generate cabal packages with non-confusing versions
|
2009-02-27 05:55:54 +03:00
|
|
|
# 7 there should be a way to mark builds/releases as alpha or beta
|
|
|
|
# 8 it should be easy to darcs get the .0 release even after bugfix releases
|
|
|
|
# 9 avoid unnecessary compiling and linking
|
|
|
|
# 10 minimise rcs noise and syncing issues (commits, unrecorded changes)
|
2009-02-26 20:37:46 +03:00
|
|
|
#
|
|
|
|
# Current plan:
|
|
|
|
# - The release version looks like major.minor[.bugfix]. bugfix is 0 (and
|
2009-02-27 05:55:54 +03:00
|
|
|
# may be elided) for a normal release, or 1..n for a bugfix release, or
|
|
|
|
# 98 meaning an alpha for the forthcoming release, or 99 meaning a beta.
|
|
|
|
# - The build version looks like major.minor.bugfix.patches, where patches
|
|
|
|
# is the number of patches applied since the last release tag.
|
|
|
|
# - Set the release version in VERSION before "make" or "make release".
|
|
|
|
# - "make" updates version strings where needed, and defines PATCHES.
|
|
|
|
# "make release" also records the version number changes and tags the
|
|
|
|
# repo. (Todo: make cabal build set the version and PATCHES, also)
|
|
|
|
# - hledger --version shows the build version
|
|
|
|
# - The cabal package uses the release version
|
2009-02-26 20:37:46 +03:00
|
|
|
# - The release tag is the non-elided release version.
|
|
|
|
|
2009-02-27 05:55:54 +03:00
|
|
|
# run pre-release checks: cabal is happy, the code builds, tests pass..
|
2009-04-03 01:03:32 +04:00
|
|
|
check: setversion test
|
2009-02-27 05:55:54 +03:00
|
|
|
cabal clean
|
|
|
|
cabal check
|
2009-05-24 03:49:11 +04:00
|
|
|
cabal configure -fvty -fhapps
|
2009-02-27 05:55:54 +03:00
|
|
|
cabal build
|
2009-04-03 01:03:32 +04:00
|
|
|
dist/build/hledger/hledger test 2>&1 | tail -1 | grep -q 'Errors: 0 Failures: 0'
|
2009-02-27 05:55:54 +03:00
|
|
|
|
|
|
|
# Build a cabal release, tag the repo and maybe upload to hackage.
|
|
|
|
# Don't forget to update VERSION if needed. Examples:
|
|
|
|
# releasing 0.5: set VERSION to 0.5, make release hackageupload
|
|
|
|
# doing a bugfix release: set VERSION to 0.5.1, make release hackageupload
|
|
|
|
# building 0.6 alpha: set VERSION to 0.5.98, make
|
|
|
|
# releasing 0.6 beta: set VERSION to 0.5.99, make release
|
|
|
|
release: check setandrecordversion tagrelease sdist
|
|
|
|
|
|
|
|
# file where the current release version is defined
|
|
|
|
VERSIONFILE=VERSION
|
|
|
|
|
|
|
|
# two or three-part version string
|
|
|
|
VERSION:=`grep -v '^--' $(VERSIONFILE)`
|
2009-02-26 20:37:46 +03:00
|
|
|
|
2009-02-27 05:55:54 +03:00
|
|
|
# three-part version string
|
|
|
|
ifeq ($(shell ghc -e "length (filter (=='.') \"$(VERSION)\")"), 1)
|
|
|
|
VERSION3:=$(VERSION).0
|
2009-02-26 20:37:46 +03:00
|
|
|
else
|
2009-02-27 05:55:54 +03:00
|
|
|
VERSION3:=$(VERSION)
|
2009-02-26 20:37:46 +03:00
|
|
|
endif
|
|
|
|
|
2009-02-27 05:55:54 +03:00
|
|
|
# other files containing the version string
|
|
|
|
VERSIONFILES=hledger.cabal Version.hs
|
|
|
|
|
|
|
|
hledger.cabal: $(VERSIONFILE)
|
2009-06-14 01:24:31 +04:00
|
|
|
perl -p -e "s/(^version: *) .*/\1 $(VERSION)/" -i $@
|
2009-02-27 05:55:54 +03:00
|
|
|
|
|
|
|
Version.hs: $(VERSIONFILE)
|
|
|
|
perl -p -e "s/(^version *= *)\".*?\"/\1\"$(VERSION3)\"/" -i $@
|
|
|
|
|
|
|
|
# update the version string in local files. Triggered by "make".
|
|
|
|
setversion: $(VERSIONFILES)
|
|
|
|
|
|
|
|
# update the version string in local files, and record them (and
|
|
|
|
# $VERSIONFILE) if changed. Be careful, will record all changes in those
|
|
|
|
# files (so prompts interactively). Triggered by "make release".
|
|
|
|
setandrecordversion: setversion
|
|
|
|
darcs record -m "bump version" $(VERSIONFILE) $(VERSIONFILES)
|
2009-02-26 20:37:46 +03:00
|
|
|
|
|
|
|
tagrelease:
|
2009-02-27 05:55:54 +03:00
|
|
|
darcs tag $(VERSION3)
|
2009-02-26 20:37:46 +03:00
|
|
|
|
|
|
|
sdist:
|
|
|
|
cabal sdist
|
|
|
|
|
2009-05-29 12:29:04 +04:00
|
|
|
# display a hackage upload command reminder
|
2009-02-27 05:55:54 +03:00
|
|
|
hackageupload:
|
2009-06-14 01:24:50 +04:00
|
|
|
@echo please do: cabal upload dist/hledger-$(VERSION).tar.gz -v3
|
2009-02-26 20:37:46 +03:00
|
|
|
|
2009-05-29 12:29:04 +04:00
|
|
|
# send unpushed patches to the mail list
|
|
|
|
send:
|
|
|
|
darcs send http://joyful.com/repos/hledger --to=hledger@googlegroups.com --edit-description
|
2008-11-24 01:15:51 +03:00
|
|
|
|
2009-05-29 12:29:04 +04:00
|
|
|
# push patches to the main repo with ssh
|
|
|
|
push:
|
|
|
|
darcs push joyful.com:/repos/hledger
|
2008-10-18 08:34:41 +04:00
|
|
|
|
2009-05-29 23:26:09 +04:00
|
|
|
# sync latest profiles and benchtest results to the public site
|
|
|
|
pushprofs:
|
|
|
|
rsync -azP profs/ joyful.com:/repos/hledger/profs/ #--delete
|
|
|
|
|
2009-05-29 12:29:04 +04:00
|
|
|
# show project stats useful for release notes
|
2009-05-17 18:13:06 +04:00
|
|
|
stats: showlastreleasedate showreleaseauthors showloc showerrors showlocalchanges showreleasechanges bench
|
2009-01-21 01:27:32 +03:00
|
|
|
|
2009-05-17 18:13:06 +04:00
|
|
|
showreleaseauthors:
|
2008-11-24 00:50:38 +03:00
|
|
|
@echo Patch authors since last release:
|
|
|
|
@darcs changes --from-tag . |grep '^\w' |cut -c 31- |sort |uniq
|
2009-05-29 12:29:04 +04:00
|
|
|
@echo
|
2008-11-24 00:50:38 +03:00
|
|
|
|
2009-05-17 18:13:06 +04:00
|
|
|
showloc:
|
|
|
|
@echo Lines of non-test code:
|
2008-10-18 08:34:41 +04:00
|
|
|
@sloccount `ls {,Ledger/}*.hs |grep -v Tests.hs` | grep haskell:
|
2009-05-17 18:13:06 +04:00
|
|
|
@echo Lines of test code:
|
|
|
|
@sloccount Tests.hs | grep haskell:
|
2009-05-29 12:29:04 +04:00
|
|
|
@echo
|
2009-05-17 18:13:06 +04:00
|
|
|
|
|
|
|
showlastreleasedate:
|
|
|
|
@echo Last release date:
|
|
|
|
@darcs changes --from-tag . | tail -2
|
2009-05-29 12:29:04 +04:00
|
|
|
@echo
|
2009-05-17 18:13:06 +04:00
|
|
|
|
|
|
|
showerrors:
|
|
|
|
@echo Known errors:
|
|
|
|
@awk '/^** errors/, /^** / && !/^** errors/' NOTES | grep '^\*\*\* ' | tail +1
|
2009-05-29 12:29:04 +04:00
|
|
|
@echo
|
2009-05-17 18:13:06 +04:00
|
|
|
|
|
|
|
showlocalchanges:
|
2009-05-29 12:29:04 +04:00
|
|
|
@echo Local changes:
|
2009-05-17 18:13:06 +04:00
|
|
|
@-darcs push joyful.com:/repos/hledger --dry-run | grep '*' | tac
|
2009-05-29 12:29:04 +04:00
|
|
|
@echo
|
2009-05-17 18:13:06 +04:00
|
|
|
|
|
|
|
showreleasechanges:
|
|
|
|
@echo "Changes since last release: ("`darcs changes --from-tag . --count`")"
|
|
|
|
@darcs changes --from-tag . | grep '*'
|
2009-05-29 12:29:04 +04:00
|
|
|
@echo
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
# MISCELLANEOUS
|
|
|
|
|
|
|
|
tag: emacstags
|
|
|
|
|
|
|
|
emacstags:
|
2009-06-02 22:29:01 +04:00
|
|
|
@rm -f TAGS; hasktags -e $(SOURCEFILES) hledger.cabal
|
2009-05-29 12:29:04 +04:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f `find . -name "*.o" -o -name "*.hi" -o -name "*~" -o -name "darcs-amend-record*"`
|
|
|
|
|
2009-06-02 23:54:45 +04:00
|
|
|
Clean: clean cleandocs
|
2009-05-29 12:29:04 +04:00
|
|
|
rm -f hledger TAGS tags
|
2008-10-03 11:40:28 +04:00
|
|
|
|