File: rules

package info (click to toggle)
tup 0.7.8-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 18,448 kB
  • sloc: ansic: 217,845; sh: 17,432; perl: 184; python: 67; lisp: 63; makefile: 62
file content (38 lines) | stat: -rwxr-xr-x 1,245 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all qa=+canary
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk

%:
	dh $@
override_dh_auto_configure:
	echo 'CONFIG_TUP_USE_SYSTEM_SQLITE=y' > tup.config
	echo 'CONFIG_TUP_DEBUG=y' >> tup.config
	dpkg-buildflags | sed 's/=/+=/' > dpkgflags.tup

# build.sh script compiles tup in bootstrap mode, with pre-bundled
# sqlite3 and lua. We use it to rebuild tup again, properly this time
override_dh_auto_build: debian/tup.emacsen-startup
	rm -rf .pc
	./build.sh
	find -name '*.o' -delete
	find -name '*.a' -delete
	rm -f src/lua/lua                 \
	      src/luabuiltin/luabuiltin.h \
	      src/tup/version/version.c   \
	      tup_client.h                \
	      tup
	./build/tup init
	./build/tup generate --verbose build-nofuse.sh
	./build-nofuse.sh

# Generates autoload file for tupfile-mode. See more in
# dh_installemacsen(1).
debian/tup.emacsen-startup: debian/tupfile-mode.el
	emacs -Q --batch --eval \
	  '(update-file-autoloads "$(CURDIR)/$<" t "$(CURDIR)/$@")'
	# Portability note: assumes GNU sed, which accepts -i without argument.
	# But GNU sed is essential, on Debian, after all.
	sed -i '/^;/ d' $@
	sed -i '/^\s*$$/ d' $@
	sed -i '/^(provide/ d' $@