File: rules

package info (click to toggle)
ccbuild 2.0.6-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,376 kB
  • ctags: 551
  • sloc: cpp: 5,076; ansic: 1,913; sh: 1,342; makefile: 67
file content (69 lines) | stat: -rwxr-xr-x 1,690 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
#!/usr/bin/make -f

PACKAGE	 = ccbuild

include debian/debian-save-restore.mk

# Due to autoreconf(1)
FILE_LIST_PRESERVE = \
 INSTALL \
 depcomp \
 Makefile.in \
 aclocal.m4 \
 configure \
 configure.in \
 install-sh \
 missing \
 doc/ccbuild/Makefile \
 src/sourceScanner/yylex.cc

export DEB_BUILD_MAINT_OPTIONS  = hardening=+all
export DEB_CXXFLAGS_MAINT_APPEND  = -Wall -pedantic
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

# 2012-05-15 No longer used. Bobcat 2.22 is working on hurd again.
control:
	# target: control -- Generate debian/control from *.in
	# 2011-11-30 Exclude due to problems in package
	# bobcat (hurd-i386).
	# https://buildd.debian.org/status/package.php?p=bobcat&suite=sid

	arch=$$(dpkg-architecture -L | grep -Ev 'hurd' | sort); \
	sed "s/@arch@/$$(echo $$arch)/g" debian/control.in > debian/control

override_dh_clean:
	dh_clean

override_dh_auto_clean:
	# Do all manually. Makefile would run ./config.status --recheck
	find .	-type f \
		-name $(PACKAGE) \
		-o -name "*.o" \
		-o -name .dirstamp \
		| xargs --no-run-if-empty rm

	find . -type d -name .deps \
		| xargs --no-run-if-empty rm -r

	$(file-state-restore)

override_dh_auto_configure:
	$(file-state-save)
	# See patch 20. We have to regenerate ./configure
	cp -vf /usr/share/misc/config.sub /usr/share/misc/config.guess .
	touch README
	autoreconf -vfi
	dh_auto_configure

override_dh_auto_build:
	# For some reason, the only way to pass flags is in CXX
	@echo "# environment: CXX $(CXX) CFLAGS $(CFLAGS) CXXFLAGS $(CXXFLAGS)"
	$(MAKE) CXX="g++ $(CXXFLAGS)" DESTDIR=$(CURDIR)/debian/ccbuild install

override_dh_installchangelogs:
	dh_installchangelogs ChangeLog

%:
	dh  $@

# End of file