File: rules

package info (click to toggle)
doxygen 1.9.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 22,740 kB
  • sloc: cpp: 243,066; lex: 36,477; ansic: 14,244; xml: 10,904; python: 3,219; javascript: 2,540; yacc: 574; php: 441; perl: 375; makefile: 198; sh: 26; objc: 14; cs: 5; f90: 4; java: 1
file content (184 lines) | stat: -rwxr-xr-x 5,670 bytes parent folder | download | duplicates (4)
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
#!/usr/bin/make -f

COMMA = ,
ifneq (,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
  NJOBS := -j $(subst parallel=,,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
endif

export DEB_BUILD_MAINT_OPTIONS=reproducible=+fixfilepath

#export DH_VERBOSE=1
export DH_OPTIONS=

CFLAGS := $(shell dpkg-buildflags --get CPPFLAGS; dpkg-buildflags --get CFLAGS)
CXXFLAGS := $(shell dpkg-buildflags --get CPPFLAGS; dpkg-buildflags --get CXXFLAGS)
LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
export CFLAGS
export CXXFLAGS
export LDFLAGS
DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

llvm_ver = $(shell sed -n 's/.*\bllvm-\([^[:space:]]*\)-dev.*/\1/p' debian/control)
clang_archs = $(shell sed -n 's/.*\bllvm-[^[:space:]]*-dev[[:space:]]*\[\(.*\)\].*/\1/p' debian/control)

export LLVM_DIR = /usr/lib/llvm-$(llvm_ver)/lib/cmake/llvm/
export Clang_DIR = /usr/lib/llvm-$(llvm_ver)/lib/cmake/clang/

with_doxywizard = $(if $(findstring stage1,$(DEB_BUILD_PROFILES)),no,yes)

CONFIGUREFLAGS += -DCMAKE_INSTALL_PREFIX=/usr
CONFIGUREFLAGS += -Dbuild_wizard=$(if $(filter yes, $(with_doxywizard)),ON,OFF)
CONFIGUREFLAGS += -Dbuild_doc=$(if $(filter yes, $(with_docs)),ON,OFF)
CONFIGUREFLAGS += -DPYTHON_EXECUTABLE=/usr/bin/python3
CONFIGUREFLAGS += -Duse_libclang=$(if $(filter $(DEB_HOST_ARCH),$(clang_archs)),ON,OFF)
CONFIGUREFLAGS += -Dbuild_search=ON
CONFIGUREFLAGS += -Dbuild_parse=ON
# still experimental according to upstream
#CONFIGUREFLAGS += -Duse_sqlite3=ON

configure-stamp:
	dh_testdir
	$(MAKE) -C jquery install
	rm -rf build
	mkdir -p build
	cd build && cmake -G "Unix Makefiles" $(CONFIGUREFLAGS) $(CURDIR)
	touch $@

build: with_docs=yes
build-arch: with_docs=no
build-indep: with_docs=yes

build: build-stamp
build-arch: build-stamp
build-indep: build-stamp
build-stamp: configure-stamp
	dh_testdir
	$(MAKE) -C build $(NJOBS) VERBOSE=1
	[ "$(with_docs)" = no ] || $(MAKE) -C build $(NJOBS) VERBOSE=1 docs
	[ "$(with_docs)" = no ] || find build/html/examples/ -type f -iregex .*pdf -exec mat2 --inplace '{}' \;
	touch $@

clean:
	dh_testdir
	dh_testroot
	rm -f configure-stamp build-stamp install*stamp doc/config.doc doc/language.doc doc/mailto.txt doc/translator_report.txt templates/html/jquery.js
	rm -rf build
	rm -f src/jquery_*.js
	rm -rf jquery/.sass-cache
	rm -f qtools/Makefile.qtools
	rm -f doxygen_sqlite3.db
	rm -f jquery/*-min.js
	rm -f jquery/jquery.js
	rm -f jquery/doxmenu-min.css
	dh_clean

uninstall:
	dh_testdir
	dh_testroot
	rm -f install*stamp
	dh_prep

install-indep: install-arch
install-indep: install-indep-stamp
install-indep-stamp: DH_OPTIONS=-i
install-indep-stamp:
	dh_testdir
	dh_testroot
	dh_installdirs
	$(MAKE) -C build install \
		VERBOSE=1 \
		DESTDIR=$(CURDIR)/debian/doxygen-doc
	  mkdir -p debian/doxygen-doc/usr/share/doc/doxygen
	  mv debian/doxygen-doc/usr/share/doc/packages/doxygen/* \
		debian/doxygen-doc/usr/share/doc/doxygen/.
	  rm -rf debian/doxygen-doc/usr/share/doc/packages
	  rm -rf debian/doxygen-doc/usr/bin
	  rm -rf debian/doxygen-doc/usr/share/man
	-find debian -name .cvsignore -o -name CVS | xargs rm -rf
	touch $@

install-arch: build
install-arch: install-arch-stamp
install-arch-stamp: DH_OPTIONS=-a
install-arch-stamp:
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs
	$(MAKE) -C build install \
		VERBOSE=1 \
		DESTDIR=$(CURDIR)/debian/doxygen
	cd debian/dh-doxygen && pod2man -c Debhelper -r '' dh_doxygen dh_doxygen.1
	: # FIXME: man pages not installed when building without docs
	[ -f debian/doxygen/usr/share/man/man1/doxygen.1 ] \
	  || install -D doc/doxygen.1 debian/doxygen/usr/share/man/man1/doxygen.1
	[ -f debian/doxygen/usr/share/man/man1/doxyindexer.1 ] \
	  || install -D doc/doxyindexer.1 debian/doxygen/usr/share/man/man1/doxyindexer.1
	[ -f debian/doxygen/usr/share/man/man1/doxysearch.cgi.1 ] \
	  || install -D doc/doxysearch.1 debian/doxygen/usr/share/man/man1/doxysearch.cgi.1
ifeq ($(with_doxywizard),yes)
	[ -f debian/doxygen/usr/share/man/man1/doxywizard.1 ] \
	  || install -D doc/doxywizard.1 debian/doxygen/usr/share/man/man1/doxywizard.1
	dh_movefiles -Ndoxygen --sourcedir=debian/doxygen \
		usr/bin/doxywizard \
		usr/share/man/man1/doxywizard.1
endif
	rm -rf debian/doxygen/usr/share/doc/packages
	-find debian -name .cvsignore -o -name CVS | xargs rm -rf
	dh_movefiles -Ndoxygen -Ndoxygen-gui -pdoxygen-doxyparse --sourcedir=debian/doxygen usr/bin/doxyparse
	touch $@

install: install-indep install-arch

binary: with_docs=yes
binary-arch: with_docs=no
binary-indep: with_docs=yes

binary-indep:
binary-indep: install-indep
	dh_testdir
	dh_testroot
	dh_installdocs -i
	dh_lintian -i
	./debian/dh-doxygen/dh_doxygen
	rdfind -outputname /dev/null -makehardlinks true debian/doxygen-doc/usr/share/doc/doxygen
	dh_installchangelogs doc/changelog.doc
	dh_link -i
	dh_compress -i -X.pdf
	dh_fixperms -i
	dh_installdeb -i
	dh_shlibdeps -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

ifeq ($(with_doxywizard),yes)
binary-arch:
else
binary-arch: DH_OPTIONS=-Ndoxygen-gui -Ndoxygen-doxyparse
endif
binary-arch: install-arch
	dh_testdir
	dh_testroot
	dh_install
	dh_installdocs -a LANGUAGE.HOWTO README.md VERSION
	dh_installman -a
	dh_installchangelogs -a doc/changelog.doc
	dh_strip -a
	dh_link -a
	dh_installmenu -a
	dh_compress -a
	dh_fixperms -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

binary: binary-arch binary-indep

.PHONY: configure build clean uninstall
.PHONY: install-arch install-indep install
.PHONY: binary-arch binary-indep binary