File: rules

package info (click to toggle)
subcommander 2.0.0~b5p2-6
  • links: PTS
  • area: main
  • in suites: buster, stretch
  • size: 15,340 kB
  • ctags: 9,527
  • sloc: cpp: 63,594; sh: 4,050; xml: 1,992; makefile: 1,134; ansic: 786; ruby: 251; lisp: 24
file content (79 lines) | stat: -rwxr-xr-x 2,396 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f

export BDIR             := BUILD
export LDFLAGS          := -Wl,-z,defs -Wl,--as-needed $(shell dpkg-buildflags --get LDFLAGS)
export CPPFLAGS         := $(shell dpkg-buildflags --get CPPFLAGS)
export CXXFLAGS         := $(shell dpkg-buildflags --get CXXFLAGS) -Wall -Wno-deprecated -I$(CURDIR)
export QTDIR            := /usr
DH_AUTO_OPTIONS         := -v -Sautoconf --parallel -B$(BDIR)
DESTDIR                 := $(CURDIR)/debian/tmp

build: export MISSING_BUILD_DEPS := $(shell dpkg-checkbuilddeps 2>&1)
%: force
	dh "$@"


ifneq ($(shell dh_listpackages),$(shell dh_listpackages -i))  # arch:any packages are built
override_dh_auto_build:   $(BDIR)/build-arch-stamp

override_dh_auto_install: install-arch-into-pkgdir
endif

ifneq ($(shell dh_listpackages),$(shell dh_listpackages -a)) # arch:all packages are built
  ifneq (,$(MISSING_BUILD_DEPS))
    $(warning $(MISSING_BUILD_DEPS))
    $(warning Postponing build of architecture independent files until binary or binary-indep target is called)
  else
override_dh_auto_build:   $(BDIR)/build-indep-stamp
  endif
override_dh_auto_install: install-indep-into-pkgdir
endif

override_dh_auto_configure: $(BDIR)/configure-stamp


override_dh_auto_clean:
	rm -f $(BDIR)/build-arch-stamp $(BDIR)/build-indep-stamp $(BDIR)/configure-stamp
	$(MAKE) -C doc/docbook/guide clean
	dh_autoreconf_clean
	dh_auto_clean  $(DH_AUTO_OPTIONS)


$(BDIR)/configure-stamp:
	dh_autoreconf
	dh_auto_configure $(DH_AUTO_OPTIONS) -- \
	                  --enable-nls  
	touch "$@"

$(BDIR)/build-arch-stamp: $(BDIR)/configure-stamp
	dh_auto_build $(DH_AUTO_OPTIONS) 
	
	dh_auto_build $(DH_AUTO_OPTIONS) -- -C po
	touch "$@"
	

$(BDIR)/build-indep-stamp: $(BDIR)/configure-stamp
	$(MAKE) -C doc/docbook/guide
	touch "$@"
	


install-arch-into-pkgdir: $(BDIR)/build-arch-stamp
	dh_auto_install $(DH_AUTO_OPTIONS)
	dh_auto_install $(DH_AUTO_OPTIONS) -- -C po
	
	mkdir -p $(DESTDIR)/usr/share/pixmaps
	install --mode=644 pics/subcommander.xpm $(DESTDIR)/usr/share/pixmaps


install-indep-into-pkgdir: $(BDIR)/build-indep-stamp
	$(MAKE) -C doc/docbook/guide install  DESTDIR=$(DESTDIR)/usr/share/doc/subcommander/html

force debian/rules:

.PHONY: force debian/rules \
	override_dh_auto_build override_dh_auto_clean \
	override_dh_auto_configure override_dh_auto_install \
	install-arch-into-pkgdir install-indep-into-pkgdir

.DEFAULT_GOAL := binary