tools: misc doc and binary generation fixes
This commit is contained in:
		
							parent
							
								
									be610734a3
								
							
						
					
					
						commit
						13e5758667
					
				
							
								
								
									
										33
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										33
									
								
								Makefile
									
									
									
									
									
								
							| @ -65,6 +65,7 @@ VERSIONSENSITIVEFILES=\ | |||||||
| 	hledger.cabal \
 | 	hledger.cabal \
 | ||||||
| 	Hledger/Cli/Version.hs \
 | 	Hledger/Cli/Version.hs \
 | ||||||
| 	hledger-lib/hledger-lib.cabal \
 | 	hledger-lib/hledger-lib.cabal \
 | ||||||
|  | 	MANUAL.markdown \
 | ||||||
| 
 | 
 | ||||||
| default: tag hledger | default: tag hledger | ||||||
| 
 | 
 | ||||||
| @ -98,20 +99,16 @@ hledgeropt: setversion | |||||||
| 	ghc --make hledger.hs -o bin/hledgeropt $(BUILDFLAGS) -O2 # -fvia-C # -fexcess-precision -optc-O3 -optc-ffast-math | 	ghc --make hledger.hs -o bin/hledgeropt $(BUILDFLAGS) -O2 # -fvia-C # -fexcess-precision -optc-O3 -optc-ffast-math | ||||||
| 
 | 
 | ||||||
| # build a deployable binary for mac, one which uses only standard osx libs
 | # build a deployable binary for mac, one which uses only standard osx libs
 | ||||||
| # use some trickery to link without gmp lib
 |  | ||||||
| hledgermac: setversion | hledgermac: setversion | ||||||
| 	ghc -c --make hledger.hs -o bin/$(BINARYFILENAME) $(BUILDFLAGS) -O2 -optl-L/usr/lib | 	ghc --make hledger.hs -o bin/$(BINARYFILENAME) $(BUILDFLAGS) -O2 # -optl-L/usr/lib | ||||||
| 	sudo port deactivate gmp |  | ||||||
| 	-PATH=tools:$(PATH) ghc --make hledger.hs -o bin/$(BINARYFILENAME) $(BUILDFLAGS) -O2 -optl-L/usr/lib |  | ||||||
| 	sudo port activate gmp |  | ||||||
| 	@echo Please check the build looks portable: | 	@echo Please check the build looks portable: | ||||||
| 	otool -L $(BINARYFILENAME) | 	otool -L bin/$(BINARYFILENAME) | ||||||
| 
 | 
 | ||||||
| # build a deployable binary for gnu/linux, statically linked
 | # build a deployable binary for gnu/linux, statically linked
 | ||||||
| hledgerlinux: setversion | hledgerlinux: setversion | ||||||
| 	ghc --make hledger.hs -o bin/$(BINARYFILENAME) $(BUILDFLAGS) -O2 -static -optl-static -optl-pthread | 	ghc --make hledger.hs -o bin/$(BINARYFILENAME) $(BUILDFLAGS) -O2 -static -optl-static -optl-pthread | ||||||
| 	@echo Please check the build looks portable: | 	@echo Please check the build looks portable (static): | ||||||
| 	-ldd $(BINARYFILENAME) | 	-file bin/$(BINARYFILENAME) | ||||||
| 
 | 
 | ||||||
| # build a deployable binary for windows, using cygwin presumably
 | # build a deployable binary for windows, using cygwin presumably
 | ||||||
| # hledgerwin: setversion
 | # hledgerwin: setversion
 | ||||||
| @ -188,6 +185,7 @@ unittesths: | |||||||
| 		&& echo $@ PASSED) || echo $@ FAILED | 		&& echo $@ PASSED) || echo $@ FAILED | ||||||
| 
 | 
 | ||||||
| # run functional tests, requires shelltestrunner from hackage
 | # run functional tests, requires shelltestrunner from hackage
 | ||||||
|  | # 16 threads sometimes gives "commitAndReleaseBuffer: resource vanished (Broken pipe)" here but seems harmless
 | ||||||
| functest: hledger | functest: hledger | ||||||
| 	(shelltest tests --implicit=none --plain --threads=16 \
 | 	(shelltest tests --implicit=none --plain --threads=16 \
 | ||||||
| 		&& echo $@ PASSED) || echo $@ FAILED | 		&& echo $@ PASSED) || echo $@ FAILED | ||||||
| @ -351,6 +349,9 @@ previewsite: site/hakyll | |||||||
| site/hakyll: site/hakyll.hs | site/hakyll: site/hakyll.hs | ||||||
| 	cd site; ghc --make hakyll.hs $(PREFERMACUSRLIBFLAGS) | 	cd site; ghc --make hakyll.hs $(PREFERMACUSRLIBFLAGS) | ||||||
| 
 | 
 | ||||||
|  | siteci: | ||||||
|  | 	cd site; sp --no-exts --no-default-map -o hakyll ghc --make hakyll.hs $(PREFERMACUSRLIBFLAGS) --run preview | ||||||
|  | 
 | ||||||
| viewsite: site | viewsite: site | ||||||
| 	$(VIEWHTML) site/_site/index.html | 	$(VIEWHTML) site/_site/index.html | ||||||
| 
 | 
 | ||||||
| @ -517,13 +518,14 @@ releaseandupload: release upload | |||||||
| # update the version number in local files, and prompt to record changes
 | # update the version number in local files, and prompt to record changes
 | ||||||
| # in these files. Triggered by "make release".
 | # in these files. Triggered by "make release".
 | ||||||
| setandrecordversion: setversion | setandrecordversion: setversion | ||||||
| 	darcs record -m "update version" $(VERSIONFILE) $(VERSIONSENSITIVEFILES) | 	darcs record -m "bump version" $(VERSIONFILE) $(VERSIONSENSITIVEFILES) | ||||||
| 
 | 
 | ||||||
| # update the version string in local files. Triggered by "make".
 | # update the version string in local files. Triggered by "make".
 | ||||||
| setversion: $(VERSIONSENSITIVEFILES) | setversion: $(VERSIONSENSITIVEFILES) | ||||||
| 
 | 
 | ||||||
| Hledger/Cli/Version.hs: $(VERSIONFILE) | Hledger/Cli/Version.hs: $(VERSIONFILE) | ||||||
| 	perl -p -e "s/(^version *= *)\".*?\"/\1\"$(VERSION3)\"/" -i $@ | 	perl -p -e "s/(^version *= *)\".*?\"/\1\"$(VERSION3)\"/" -i $@ | ||||||
|  | # XXX also touch manually when switching between cabal install -fweb and -fweb610
 | ||||||
| 
 | 
 | ||||||
| hledger.cabal: $(VERSIONFILE) | hledger.cabal: $(VERSIONFILE) | ||||||
| 	perl -p -e "s/(^ *version:) *.*/\1 $(VERSION)/" -i $@ | 	perl -p -e "s/(^ *version:) *.*/\1 $(VERSION)/" -i $@ | ||||||
| @ -532,6 +534,9 @@ hledger.cabal: $(VERSIONFILE) | |||||||
| hledger-lib/hledger-lib.cabal: $(VERSIONFILE) | hledger-lib/hledger-lib.cabal: $(VERSIONFILE) | ||||||
| 	perl -p -e "s/(^ *version:) *.*/\1 $(VERSION)/" -i $@ | 	perl -p -e "s/(^ *version:) *.*/\1 $(VERSION)/" -i $@ | ||||||
| 
 | 
 | ||||||
|  | MANUAL.markdown: $(VERSIONFILE) | ||||||
|  | 	perl -p -e "s/(^This is the official.*?version) +[0-9.]+/\1 $(VERSION3)./" -i $@ | ||||||
|  | 
 | ||||||
| tagrelease: | tagrelease: | ||||||
| 	darcs tag $(VERSION3) | 	darcs tag $(VERSION3) | ||||||
| 
 | 
 | ||||||
| @ -568,8 +573,8 @@ pullprofs: | |||||||
| # push a deployable binary for this platform to the public site
 | # push a deployable binary for this platform to the public site
 | ||||||
| # make hledgerPLATFORM first
 | # make hledgerPLATFORM first
 | ||||||
| pushbinary: | pushbinary: | ||||||
| 	-gzip -9 $(BINARYFILENAME) | 	-gzip -9 bin/$(BINARYFILENAME) | ||||||
| 	-rsync -aP $(BINARYFILENAME).gz joyful.com:/repos/hledger/site/binaries/ | 	-rsync -aP bin/$(BINARYFILENAME).gz joyful.com:/repos/hledger/site/binaries/ | ||||||
| 
 | 
 | ||||||
| # show project stats useful for release notes
 | # show project stats useful for release notes
 | ||||||
| stats: showlastreleasedate showreleaseauthors showloc showcov showlocalchanges showreleasechanges #simplebench #showerrors
 | stats: showlastreleasedate showreleaseauthors showloc showcov showlocalchanges showreleasechanges #simplebench #showerrors
 | ||||||
| @ -584,7 +589,7 @@ showloc: | |||||||
| 	@sloccount `ls $(SOURCEFILES)` | grep haskell: | 	@sloccount `ls $(SOURCEFILES)` | grep haskell: | ||||||
| 	@echo | 	@echo | ||||||
| 
 | 
 | ||||||
| showcov: | showcov: hledgercov | ||||||
| 	@echo Test coverage: | 	@echo Test coverage: | ||||||
| 	@tools/coverage report test | 	@tools/coverage report test | ||||||
| 
 | 
 | ||||||
| @ -609,8 +614,8 @@ showcodechanges: | |||||||
| 	@echo | 	@echo | ||||||
| 
 | 
 | ||||||
| showreleasechanges: | showreleasechanges: | ||||||
| 	@echo "Code changes since last release: ("`darcs changes --from-tag . --count`")" | 	@echo "Feature/bugfix changes since last release: ("`darcs changes --from-tag . --count`")" | ||||||
| 	@darcs changes --from-tag . --matches "not (name docs: or name site: or name tools:)" | grep '*' | 	@darcs changes --from-tag . --matches "not (name docs: or name doc: or name site: or name tools:)" | grep '*' | ||||||
| 	@echo | 	@echo | ||||||
| 
 | 
 | ||||||
| ######################################################################
 | ######################################################################
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user