File: rules

package info (click to toggle)
jimtcl 0.81%2Bdfsg0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 15,416 kB
  • sloc: ansic: 175,569; tcl: 5,456; sh: 4,814; cpp: 1,671; makefile: 269
file content (55 lines) | stat: -rwxr-xr-x 1,368 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
#!/usr/bin/make -f

# That's needed for DEB_VERSION_UPSTREAM
-include /usr/share/dpkg/pkg-info.mk
# That's needed for DEB_HOST_MULTIARCH
-include /usr/share/dpkg/architecture.mk

export DEB_CFLAGS_MAINT_APPEND = $(shell dpkg-buildflags --get CPPFLAGS)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# Convenience shortcuts
MA_DESTDIR ?= debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)
MA_DEV_DESTDIR ?= debian/libjim-dev/usr/lib/$(DEB_HOST_MULTIARCH)

%:
	dh $@

# jimsh0.c is removed from source for DFSG reasons, build it from `make-bootstrap-jim`
autosetup/jimsh0.c: make-bootstrap-jim
	./$< > $@

override_dh_autoreconf:
	# Do not run autoreconf, it is not used

override_dh_auto_configure: autosetup/jimsh0.c
	dh_auto_configure --builddirectory=static/
	dh_auto_configure -- --shared

override_dh_auto_build:
	dh_auto_build --builddirectory=static/
	dh_auto_build

override_dh_auto_test:
	dh_auto_test --builddirectory=static/
	dh_auto_test

override_dh_auto_install:
	dh_auto_install --builddirectory=static/
	dh_auto_install

override_dh_install:
	dh_install
	set -e; rootdir=`pwd` ;\
	cd ${MA_DESTDIR}; libfile=`ls *.so.*`; cd $${rootdir};\
	cd ${MA_DEV_DESTDIR}; ln -sf $${libfile} libjim.so

override_dh_missing:
	dh_missing --list-missing

override_dh_auto_clean:
	dh_auto_clean
	rm -f autosetup/jimsh0.c
	rm -f libjim.so*
	rm -f tests/exec.tmp1
	rm -Rf static/