Packets documentation updates
[senf.git] / Makefile
1 #----------------------------------------------------------------------
2 # Some SCONS shortcuts
3 #----------------------------------------------------------------------
4
5 CONCURRENCY_LEVEL ?= 2
6
7 ifdef final
8   FINAL = "final=1"
9 endif
10
11 SCONS=scons -j $(CONCURRENCY_LEVEL) $(FINAL)
12
13 default: build
14
15 build:
16         $(SCONS)
17
18 clean:
19         $(SCONS) --clean all
20
21 all_docs all_tests all:
22         $(SCONS) $@
23         
24 %/test %/doc:
25         $(SCONS) $@
26
27 %/build:
28         $(SCONS) $*
29
30 #----------------------------------------------------------------------
31 # Subversion stuff
32 #----------------------------------------------------------------------
33
34 svn_version:
35         @svnversion
36
37 #----------------------------------------------------------------------
38 # Building SENF requires some debian packages
39 #----------------------------------------------------------------------
40 DEB_BASE   = build-essential
41
42 # This line parses the 'Build-Depends' entry from debian/control
43 DEB_SENF   = $(shell perl -an -F'[:,]' -e '                                     \
44                          BEGIN{ $$,=" " }                                       \
45                          $$P=0 if /^\S/;                                        \
46                          map {s/\(.*\)//} @F;                                   \
47                          print @F if $$P;                                       \
48                          if (/^Build-Depends:/) { print @F[1..$$\#F]; $$P=1 }'  \
49                      debian/control | xargs echo)
50
51 prerequisites:
52         aptitude install $(DEB_BASE) $(DEB_SENF)
53
54 package:
55         $(SCONS) deb