From 29f9dd2b7a2183ceb4940dcd3bcd9b19910cbe2c Mon Sep 17 00:00:00 2001 From: Nathaniel Wesley Filardo Date: Tue, 13 Aug 2013 19:48:18 -0400 Subject: [PATCH] Tweak version target in Makefile --- .gitignore | 1 - Makefile | 38 ++++++++++++++++++++------------- src/Dyna/Backend/Python/main.py | 2 +- 3 files changed, 24 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index dd0a686..36dd3bc 100644 --- a/.gitignore +++ b/.gitignore @@ -28,4 +28,3 @@ libpeerconnection.log tags TAGS -VERSION diff --git a/Makefile b/Makefile index faadf8a..a073925 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,14 @@ # -*- indent-tabs-mode:t; -*- -all: deps build sphinxbuild version +VERFILE=dist/VERSION # XREF:VERSION -version: - echo "Version: Dyna 0.4 pre-release" `git describe --all` > VERSION - echo "Build date:" `date` >> VERSION - echo "Commit: https://github.com/nwf/dyna/commit/"`git rev-parse HEAD` >> VERSION +all: deps build sphinxbuild + +.PHONY: $(VERFILE) +$(VERFILE): + echo "Version: Dyna 0.4 pre-release" `git describe --all` > $@ + echo "Build date:" `date` >> $@ + echo "Commit: https://github.com/nwf/dyna/commit/"`git rev-parse HEAD` >> $@ upstream: git submodule init @@ -19,12 +22,13 @@ deps: happy --version 2>/dev/null >/dev/null || cabal install happy cabal install --user --enable-tests --only-dependencies . -build: version +build: $(VERFILE) cabal configure --user --enable-tests cabal build test tests: build - ( dist/build/dyna-selftests/dyna-selftests ; ./run-doctests.py ) + dist/build/dyna-selftests/dyna-selftests + ./run-doctests.py # cabal test # Compilation takes a while; for faster iteration while developing, @@ -98,14 +102,18 @@ ghcbuild: .PHONY: profbuild profbuild: mkdir -p dist/pb - ghc --make -isrc \ - -o dist/pb/a.out \ - -outputdir dist/pb \ - -main-is $(MAINMOD) $(MAINFILE) - ghc --make -isrc -osuf p.o -prof -fprof-auto \ - -o dist/pb/a.out \ - -outputdir dist/pb \ - -main-is $(MAINMOD) $(MAINFILE) + ghc --make -O0 -rtsopts \ + -idist/build/autogen -isrc \ + -o dist/pb/a-noprof.out \ + -outputdir dist/pb \ + -main-is $(MAINMOD) $(MAINFILE) + ghc --make -O0 -rtsopts \ + -idist/build/autogen -isrc \ + -osuf p.o -hisuf p.hi \ + -prof -fprof-auto -caf-all -auto-all \ + -o dist/pb/a.out \ + -outputdir dist/pb \ + -main-is $(MAINMOD) $(MAINFILE) .PHONY: test-hpc test-hpc: diff --git a/src/Dyna/Backend/Python/main.py b/src/Dyna/Backend/Python/main.py index 5c32e87..be5608c 100644 --- a/src/Dyna/Backend/Python/main.py +++ b/src/Dyna/Backend/Python/main.py @@ -30,7 +30,7 @@ def main(): if args.version: try: - print (dynahome / 'VERSION').text() + print (dynahome / 'dist/VERSION').text() # XREF:VERSION except IOError: print 'failed to obtain version info.' exit(0) -- 2.50.1