X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Makefile;h=9431cfe0c450d6b5b0c434fe720ce028acfdf795;hb=41fe0d795abca302db24e7a955df6ef15ffed722;hp=89b925491cced1e7f46245cfaf8ed2d33ee503ad;hpb=c3e26baef92c53af9826c2af3bfe4f3570c634bd;p=senf.git diff --git a/Makefile b/Makefile index 89b9254..9431cfe 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,10 @@ #---------------------------------------------------------------------- # Some SCONS shortcuts #---------------------------------------------------------------------- -SCONS=scons + +CONCURRENCY_LEVEL ?= 1 + +SCONS=scons -j $(CONCURRENCY_LEVEL) default: build @@ -11,44 +14,32 @@ build: clean: $(SCONS) --clean all -all_docs all_tests: +all_docs all_tests all: $(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 -prerequisites: - aptitude install $(DEB_BASE) $(DEB_BOOST) $(DEB_DOC) +# 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) -#---------------------------------------------------------------------- -# Debian package info -#---------------------------------------------------------------------- -PKG_NAME=senf-dev -PKG_ARCH=i386 -PKG_VERS=0.0.$(SVN_REVISION)-1 -PKG_FILE = $(PKG_NAME)-$(PKG_VERS)_$(PKG_ARCH).deb - -#---------------------------------------------------------------------- -# Debian package structure -#---------------------------------------------------------------------- -DEB_TOP = ./debian -DEB_CTL = $(DEB_TOP)/DEBIAN -DEB_LIB = $(DEB_TOP)/usr/lib/senf -DEB_INC = $(DEB_TOP)/usr/include/senf -DEB_DOC = $(DEB_TOP)/usr/share/doc/senf +prerequisites: + aptitude install $(DEB_BASE) $(DEB_SENF) package: $(SCONS) deb