]> hydra-www.ietfng.org Git - dyna2/commitdiff
Tweak version target in Makefile
authorNathaniel Wesley Filardo <nwf@cs.jhu.edu>
Tue, 13 Aug 2013 23:48:18 +0000 (19:48 -0400)
committerNathaniel Wesley Filardo <nwf@cs.jhu.edu>
Tue, 13 Aug 2013 23:48:18 +0000 (19:48 -0400)
.gitignore
Makefile
src/Dyna/Backend/Python/main.py

index dd0a6862770c33fa27b40464a9f959de4218d6fe..36dd3bcb60e7092189188643a45febf6d440d66e 100644 (file)
@@ -28,4 +28,3 @@ libpeerconnection.log
 
 tags
 TAGS
-VERSION
index faadf8a39cbd77a88aaa77590daab967260d35c1..a07392502f72ef4e253a8587e7557a8a74f43ee6 100644 (file)
--- 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:
index 5c32e874e1f2b7e04b2bddd6e53f68b05d42e622..be5608cab73c3a482252d27bf4641956537fc970 100644 (file)
@@ -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)