File: rules

package info (click to toggle)
gv 1:3.7.4-2
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 3,744 kB
  • sloc: ansic: 31,837; sh: 3,914; makefile: 317; perl: 226
file content (81 lines) | stat: -rwxr-xr-x 2,348 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
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
#!/usr/bin/make -f

DEB_BUILD_MAINT_OPTIONS=hardening=+all
include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/buildflags.mk

ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
BUILD_SYSTEM = --build $(DEB_BUILD_GNU_TYPE)
else
BUILD_SYSTEM = --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif
CONFFLAGS = --enable-scrollbar-code --enable-signal-handler --without-libzio \
             --disable-setenv-code --enable-off_t --enable-largefile
# some flags need to be given to make:
DIRFLAGS = appdefaultsdir=/etc/X11/app-defaults sysdocdir=/usr/share/doc

CFLAGS += -Wall -Wmissing-prototypes -Wshadow
LDFLAGS += -Wl,-z,defs
ifneq (,$(filter debug,$(DEB_BUILD_OPTIONS)))
	CPPFLAGS += -DMESSAGES
endif
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
        MAKEFLAGS += -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
endif

clean:
	dh_testdir
	# run distclean if configure was completed or attempted
	if [ -f config.status -o -f config.log ] ; then $(MAKE) distclean ; fi
	test ! -f config.status
	rm -f config.guess config.sub
	dh_clean
	rm -f build-arch-stamp

config.status: configure
	dh_testdir
	cp -f /usr/share/misc/config.guess config.guess
	cp -f /usr/share/misc/config.sub config.sub
	# touch files to avoid recreating files in case of timestamp issues
	touch src/gv-i18n.h doc/gv.1
	./configure $(BUILD_SYSTEM) \
		    $(CONFFLAGS) CFLAGS='$(CFLAGS)' CPPFLAGS='$(CPPFLAGS)' \
		    LDFLAGS='$(LDFLAGS)' \
		    --bindir=/usr/bin --datarootdir=/usr/share \
		    --mandir=/usr/share/man --infodir=/usr/share/info \
	|| ( echo configure failed with $$? ; cat config.log ; exit 1 )

build-arch: build-arch-stamp
build-arch-stamp: config.status
	dh_testdir
	$(MAKE) $(DIRFLAGS) LIBS="-lXaw3d -lXmu -lXt -lX11 -lm -lXinerama"
	touch $@

binary-arch: build-arch-stamp
	dh_testdir
	dh_testroot
	dh_prep
	$(MAKE) $(DIRFLAGS) install DESTDIR=${CURDIR}/debian/gv
	dh_install
	dh_installchangelogs ChangeLog
	dh_installdocs AUTHORS NEWS README
	dh_installinfo doc/gv.info
	dh_installmime
	dh_strip
	dh_compress
	find debian/gv -name "dir.gz" -print -delete
	dh_fixperms
	dh_md5sums
	dh_shlibdeps
	dh_installdeb
	dh_gencontrol
	dh_builddeb

build-indep:
binary-indep:
# nothing to do...

build: build-arch
binary: binary-arch

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