File: rules

package info (click to toggle)
aspectc%2B%2B 1.0pre4~svn.20080711-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 104,504 kB
  • ctags: 363,975
  • sloc: cpp: 1,645,814; ansic: 16,601; sh: 2,175; makefile: 1,043
file content (115 lines) | stat: -rwxr-xr-x 3,111 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

PACKAGE = aspectc++
VERSION = 20080711

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS := -Wall -O0 -g
else
	CFLAGS := -Wall -O2 -g
endif
export CFLAGS
PUMA_CONFIG=$(CURDIR)/puma.config

test-builds: build-stamp
	Ag++/bin/linux-release/ag++ --gen_config
	$(MAKE) -C AspectC++/ SHARED=1 PUMA_CONFIG=$(PUMA_CONFIG) test
	PATH=$(CURDIR)/AspectC++/bin/linux-release:$(PATH) \
	$(MAKE) -C Ag++/      SHARED=1 PUMA_CONFIG=$(PUMA_CONFIG) test

build: build-stamp test-builds
build-stamp:
	dh_testdir
	# save a copy of Puma that will be woven later
	cp -r Puma Puma.copy
	$(MAKE) -C Puma/      compile
	$(MAKE) -C AspectC++/ SHARED=1 all
	$(MAKE) -C Ag++/      SHARED=1 all
	# ok, now we have both an ac++ binary and ag++ binary
	# now let's weave Puma again in the copy
	$(MAKE) -C Puma.copy clean
	$(MAKE) -C Puma.copy all AC=$(CURDIR)/AspectC++/bin/linux-release/ac++
	# let's clean and compile ac++ and ag++ again with new Puma
	$(MAKE) -C AspectC++ clean
	$(MAKE) -C Ag++      clean
	$(MAKE) -C AspectC++ SHARED=1 Puma=$(CURDIR)/Puma.copy all
	$(MAKE) -C Ag++      SHARED=1 Puma=$(CURDIR)/Puma.copy all

	# build manpages:
	docbook-to-man debian/ac++.1.sgml > ac++.1
	docbook-to-man debian/ag++.1.sgml > ag++.1
	# mark timestamp
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp puma.config
	# cleaning up source directories:
	$(MAKE) -s -C Puma libclean
	$(MAKE) -s -C Puma tools-clean
	$(MAKE) -s -C Puma docs-clean
	$(MAKE) -s -C Puma examples-clean
	$(MAKE) -s -C AspectC++ clean
	$(MAKE) -s -C Ag++ clean
	# remove leftovers from Upstream Makefiles
	rm -rf AspectC++/tests/RepoVersion/repo.use
	rm -rf Ag++/DepFiles Ag++/ObjFiles Ag++/bin Ag++/tests/test_11.config
	rm -rf AspectC++/DepFiles AspectC++/ObjFiles AspectC++/bin
	rm -rf AspectC++/tests/*/feature.out
	# remove generated manpages:
	rm -f ac++.1 ag++.1
	rm -rf AspectC++/bin
	rm -rf Puma.copy/
	# standard cleaning:
	dh_clean

# Build architecture-independent files here.
binary-indep:
	dh_testdir
	dh_testroot
	dh_clean -k
	$(MAKE) -C Puma doc
	dh_installchangelogs
	dh_installdocs -p libpuma-doc Puma/doc/RefMan/html
	dh_installexamples -p libpuma-doc Puma/examples/cparser Puma/examples/ccparser Puma/examples/sync
	dh_compress
	dh_fixperms
	dh_installdeb -p libpuma-doc
	dh_gencontrol
	dh_md5sums
	dh_builddeb -p libpuma-doc

# Build architecture-dependent files here.
binary-arch: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	dh_installchangelogs
	dh_installdocs
	dh_install
	dh_installexamples -p aspectc++ AspectC++/examples/*
	dh_installman
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb -p aspectc++ -p libpuma-dev
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb -p aspectc++ -p libpuma-dev

get-orig-source:
	dh_testdir
	chmod +x debian/cleanup-source.sh
	sh debian/get-orig-source.sh -d$(VERSION) \
	    -c $(CURDIR)/debian/cleanup-source.sh \
	    -o ../aspectc++_1.0pre4~svn.$(VERSION).orig.tar.gz

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary