X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Makefile;h=e628a475da735e64dcd0fa21914575d0d04be6e2;hb=456ee576285b76aa46240f8001f426757810dcc1;hp=ae3cae08a6ce6acd15c34a17d41500427e4c935c;hpb=e898f807e2bdd260a0967051829fe307e2e4a0bd;p=senf.git diff --git a/Makefile b/Makefile index ae3cae0..e628a47 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,10 @@ #---------------------------------------------------------------------- # Some SCONS shortcuts #---------------------------------------------------------------------- -SCONS=scons + +CONCURRENCY_LEVEL ?= 2 + +SCONS=scons -j $(CONCURRENCY_LEVEL) default: build @@ -11,27 +14,35 @@ build: clean: $(SCONS) --clean all -all_docs all_tests: +all_docs all_tests all: + $(SCONS) $@ + +%/test %/doc: $(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