commit 4fd406fec00811632d58913d125d8826b1a451b9
parent 998c4dc3a8296067fe2cca906a9ecb67b8f26712
Author: Kyle Milz <kyle@0x30.net>
Date: Mon, 2 Jan 2017 18:32:23 -0700
Jam: adjust build infrastructure
Diffstat:
4 files changed, 37 insertions(+), 6 deletions(-)
diff --git a/Jamfile b/Jamfile
@@ -1,4 +1,35 @@
-SubDir TOP src ;
+SubDir TOP ;
+
+#
+# Different build modifiers. Put them here because it only makes sense to run
+# them from the root directory.
+#
+actions StaticAnalysis
+{
+ scan-build ./configure
+ scan-build -o html --use-c++=eg++ jam -j4
+}
+
+actions TestCoverage
+{
+ set -e
+ CFLAGS="-coverage" LDFLAGS="-coverage" ./configure
+ jam -j4
+
+ # Roll libgcov.a into libcitrun.a.
+ ar -M < t/libcitrun_gcov.mri
+
+ prove
+ # prove tt
+
+ gcov -o src src/lib.c
+ egcov -r src/*.cc
+}
+
+StaticAnalysis static-analysis ;
+TestCoverage test-coverage ;
+
+#SubDir TOP src ;
#
# libcitrun
@@ -9,7 +40,6 @@ Library libcitrun : lib.c ;
#
# citrun_check
#
-MakeLocate citrun_check : $(LOCATE_SOURCE) ;
Shell citrun_check : check.sh ;
#
@@ -114,4 +144,5 @@ InstallShell $(PREFIX)/bin : citrun_check ;
InstallBin $(PREFIX)/bin : citrun_wrap citrun_gl citrun_inst ;
InstallSyms $(PREFIX)/share/citrun : cc gcc clang clang++ g++ c++ egcc eg++ ;
-SubInclude TOP src glyphy ;
+SubInclude TOP glyphy ;
+SubInclude TOP man ;
diff --git a/Jamrules.tail b/Jamrules.tail
@@ -14,5 +14,5 @@ rule Stringize
actions Stringize
{
- perl src/stringize.pl $(1:B) < $(>) > $(<)
+ perl stringize.pl $(1:B) < $(>) > $(<)
}
diff --git a/configure b/configure
@@ -63,7 +63,7 @@ echo
# citrun_inst needs to know the absolute installation path.
#
if [ -z ${PREFIX-} ]; then
- CITRUN_SHARE="`pwd`/src"
+ CITRUN_SHARE="`pwd`"
else
CITRUN_SHARE="${PREFIX}/share/citrun"
fi
diff --git a/glyphy/Jamfile b/glyphy/Jamfile
@@ -1,4 +1,4 @@
-SubDir TOP src glyphy ;
+SubDir TOP glyphy ;
SubDirHdrs . ;
SubDirC++Flags -DPKGDATADIR="" ;