X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Makefile;h=b09752e66931c11dfbf18b8ed01f471716773533;hb=3312f76b1836cad486d5f38690ee9c0f84cbc12c;hp=ae3cae08a6ce6acd15c34a17d41500427e4c935c;hpb=e898f807e2bdd260a0967051829fe307e2e4a0bd;p=senf.git diff --git a/Makefile b/Makefile index ae3cae0..b09752e 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,14 @@ #---------------------------------------------------------------------- # Some SCONS shortcuts #---------------------------------------------------------------------- -SCONS=scons + +CONCURRENCY_LEVEL ?= 2 + +ifdef final + FINAL = "final=1" +endif + +SCONS=scons -j $(CONCURRENCY_LEVEL) $(FINAL) default: build @@ -11,27 +18,38 @@ build: clean: $(SCONS) --clean all -all_docs all_tests: +all_docs all_tests all: $(SCONS) $@ + +%/test %/doc: + $(SCONS) $@ + +%/build: + $(SCONS) $* #---------------------------------------------------------------------- # Subversion stuff #---------------------------------------------------------------------- -SVN_REVISION = $(shell svnversion) svn_version: - @echo $(SVN_REVISION) + @svnversion #---------------------------------------------------------------------- # Building SENF requires some debian packages #---------------------------------------------------------------------- -DEB_BASE = scons build-essential binutils-dev -DEB_BOOST = libboost-dev libboost-test-dev -DEB_BOOST += libboost-date-time-dev libboost-regex-dev libboost-thread-dev -DEB_DOC = doxygen dia tidy xsltproc graphviz +DEB_BASE = build-essential + +# This line parses the 'Build-Depends' entry from debian/control +DEB_SENF = $(shell perl -an -F'[:,]' -e ' \ + BEGIN{ $$,=" " } \ + $$P=0 if /^\S/; \ + map {s/\(.*\)//} @F; \ + print @F if $$P; \ + if (/^Build-Depends:/) { print @F[1..$$\#F]; $$P=1 }' \ + debian/control | xargs echo) prerequisites: - aptitude install $(DEB_BASE) $(DEB_BOOST) $(DEB_DOC) + aptitude install $(DEB_BASE) $(DEB_SENF) package: $(SCONS) deb