1
############################ -*- Mode: Makefile -*- ###########################
3
## Author : Manoj Srivastava ( srivasta@glaurung.green-gryphon.com )
4
## Created On : Sat Nov 15 01:10:05 2003
5
## Created On Node : glaurung.green-gryphon.com
6
## Last Modified By : Manoj Srivastava
7
## Last Modified On : Fri Sep 15 12:58:50 2006
8
## Last Machine Used: glaurung.internal.golden-gryphon.com
10
## Status : Unknown, Use with caution!
12
## Description : The top level targets mandated by policy, as well as
13
## their dependencies.
15
## arch-tag: a81086a7-00f7-4355-ac56-8f38396935f4
17
## This program is free software; you can redistribute it and/or modify
18
## it under the terms of the GNU General Public License as published by
19
## the Free Software Foundation; either version 2 of the License, or
20
## (at your option) any later version.
22
## This program is distributed in the hope that it will be useful,
23
## but WITHOUT ANY WARRANTY; without even the implied warranty of
24
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25
## GNU General Public License for more details.
27
## You should have received a copy of the GNU General Public License
28
## along with this program; if not, write to the Free Software
29
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
31
###############################################################################
33
#######################################################################
34
#######################################################################
35
############### Miscellaneous ###############
36
#######################################################################
37
#######################################################################
39
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
42
@test $$(id -u) = 0 || (echo need root priviledges; exit 1)
47
# arch-buildpackage likes to call this
50
# OK. We have two sets of rules here, one for arch dependent packages,
51
# and one for arch independent packages. We have already calculated a
52
# list of each of these packages.
54
# In each set, we may need to do things in five steps: configure,
55
# build, install, package, and clean. Now, there can be a common
56
# actions to be taken for all the packages, all arch dependent
57
# packages, all all independent packages, and each package
58
# individually at each stage.
60
#######################################################################
61
#######################################################################
62
############### Configuration ###############
63
#######################################################################
64
#######################################################################
67
CONFIG-common:: testdir
71
stamp-arch-conf: CONFIG-common
75
stamp-indep-conf: CONFIG-common
81
CONFIG-arch:: stamp-arch-conf
83
CONFIG-indep:: stamp-indep-conf
86
STAMPS_TO_CLEAN += stamp-arch-conf stamp-indep-conf
88
$(patsubst %,CONFIG/%,$(DEB_ARCH_PACKAGES)) :: CONFIG/% : CONFIG-arch
91
$(patsubst %,CONFIG/%,$(DEB_INDEP_PACKAGES)) :: CONFIG/% : CONFIG-indep
95
stamp-configure-arch: $(patsubst %,CONFIG/%,$(DEB_ARCH_PACKAGES))
98
stamp-configure-indep: $(patsubst %,CONFIG/%,$(DEB_INDEP_PACKAGES))
102
configure-arch: stamp-configure-arch
104
configure-indep: stamp-configure-indep
107
stamp-configure: configure-arch configure-indep
111
configure: stamp-configure
114
STAMPS_TO_CLEAN += stamp-configure-arch stamp-configure-indep stamp-configure
115
#######################################################################
116
#######################################################################
117
############### Build ###############
118
#######################################################################
119
#######################################################################
122
BUILD-common:: testdir
126
stamp-arch-build: BUILD-common $(patsubst %,CONFIG/%,$(DEB_ARCH_PACKAGES))
130
stamp-indep-build: BUILD-common $(patsubst %,CONFIG/%,$(DEB_INDEP_PACKAGES))
135
STAMPS_TO_CLEAN += stamp-arch-build stamp-indep-build
137
BUILD-arch:: stamp-arch-build
140
BUILD-indep:: stamp-indep-build
145
$(patsubst %,BUILD/%,$(DEB_ARCH_PACKAGES)) :: BUILD/% : BUILD-arch
148
$(patsubst %,BUILD/%,$(DEB_INDEP_PACKAGES)) :: BUILD/% : BUILD-indep
152
stamp-build-arch: $(patsubst %,BUILD/%,$(DEB_ARCH_PACKAGES))
155
stamp-build-indep: $(patsubst %,BUILD/%,$(DEB_INDEP_PACKAGES))
159
build-arch: stamp-build-arch
161
build-indep: stamp-build-indep
164
stamp-build: build-arch build-indep
172
POST-BUILD-arch-stamp::
174
POST-BUILD-indep-stamp::
177
STAMPS_TO_CLEAN += stamp-build-arch stamp-build-indep stamp-build
178
#######################################################################
179
#######################################################################
180
############### Install ###############
181
#######################################################################
182
#######################################################################
184
INST-common:: testdir
188
stamp-arch-inst: POST-BUILD-arch-stamp INST-common $(patsubst %,BUILD/%,$(DEB_ARCH_PACKAGES))
192
stamp-indep-inst: POST-BUILD-indep-stamp INST-common $(patsubst %,BUILD/%,$(DEB_INDEP_PACKAGES))
197
STAMPS_TO_CLEAN += stamp-arch-inst stamp-indep-inst
199
INST-arch:: stamp-arch-inst
202
INST-indep:: stamp-indep-inst
207
$(patsubst %,INST/%,$(DEB_ARCH_PACKAGES)) :: INST/% : testroot INST-arch
210
$(patsubst %,INST/%,$(DEB_INDEP_PACKAGES)) :: INST/% : testroot INST-indep
214
stamp-install-arch: $(patsubst %,INST/%,$(DEB_ARCH_PACKAGES))
217
stamp-install-indep: $(patsubst %,INST/%,$(DEB_INDEP_PACKAGES))
221
install-arch: stamp-install-arch
223
install-indep: stamp-install-indep
226
stamp-install: install-indep install-arch
230
install: stamp-install
233
STAMPS_TO_CLEAN += stamp-install stamp-install-arch stamp-install-indep
234
#######################################################################
235
#######################################################################
236
############### Package ###############
237
#######################################################################
238
#######################################################################
240
BIN-common:: testdir testroot
244
stamp-arch-bin: testdir testroot BIN-common $(patsubst %,INST/%,$(DEB_ARCH_PACKAGES))
248
stamp-indep-bin: testdir testroot BIN-common $(patsubst %,INST/%,$(DEB_INDEP_PACKAGES))
253
STAMPS_TO_CLEAN += stamp-arch-bin stamp-indep-bin
255
BIN-arch:: testroot stamp-arch-bin
258
BIN-indep:: testroot stamp-indep-bin
263
$(patsubst %,BIN/%,$(DEB_ARCH_PACKAGES)) :: BIN/% : testroot BIN-arch
266
$(patsubst %,BIN/%,$(DEB_INDEP_PACKAGES)) :: BIN/% : testroot BIN-indep
271
stamp-binary-arch: $(patsubst %,BIN/%,$(DEB_ARCH_PACKAGES))
274
stamp-binary-indep: $(patsubst %,BIN/%,$(DEB_INDEP_PACKAGES))
278
binary-arch: stamp-binary-arch
280
binary-indep: stamp-binary-indep
283
stamp-binary: binary-indep binary-arch
290
@echo arch package = $(DEB_ARCH_PACKAGES)
291
@echo indep packages = $(DEB_INDEP_PACKAGES)
293
STAMPS_TO_CLEAN += stamp-binary stamp-binary-arch stamp-binary-indep
294
#######################################################################
295
#######################################################################
296
############### Clean ###############
297
#######################################################################
298
#######################################################################
304
CLN-arch:: CLN-common
307
CLN-indep:: CLN-common
311
$(patsubst %,CLEAN/%,$(DEB_ARCH_PACKAGES)) :: CLEAN/% : CLN-arch
314
$(patsubst %,CLEAN/%,$(DEB_INDEP_PACKAGES)) :: CLEAN/% : CLN-indep
318
clean-arch: $(patsubst %,CLEAN/%,$(DEB_ARCH_PACKAGES))
320
clean-indep: $(patsubst %,CLEAN/%,$(DEB_INDEP_PACKAGES))
323
stamp-clean: clean-indep clean-arch
326
-test -f Makefile && $(MAKE) distclean
327
-rm -f $(FILES_TO_CLEAN) $(STAMPS_TO_CLEAN)
328
-rm -rf $(DIRS_TO_CLEAN)
330
`find . ! -regex '.*/\.git/.*' ! -regex '.*/\{arch\}/.*' \
331
! -regex '.*/CVS/.*' ! -regex '.*/\.arch-ids/.*' \
332
! -regex '.*/\.svn/.*' \
333
\( -name '*.orig' -o -name '*.rej' -o -name '*~' -o \
334
-name '*.bak' -o -name '#*#' -o -name '.*.orig' -o \
335
-name '.*.rej' -o -name '.SUMS' -o -size 0 \) \
342
#######################################################################
343
#######################################################################
344
############### ###############
345
#######################################################################
346
#######################################################################
348
.PHONY: CONFIG-common CONFIG-indep CONFIG-arch configure-arch configure-indep configure \
349
BUILD-common BUILD-indep BUILD-arch build-arch build-indep build \
350
INST-common INST-indep INST-arch install-arch install-indep install \
351
BIN-common BIN-indep BIN-arch binary-arch binary-indep binary \
352
CLN-common CLN-indep CLN-arch clean-arch clean-indep clean \
353
$(patsubst %,CONFIG/%,$(DEB_INDEP_PACKAGES)) $(patsubst %,CONFIG/%,$(DEB_ARCH_PACKAGES)) \
354
$(patsubst %,BUILD/%, $(DEB_INDEP_PACKAGES)) $(patsubst %,BUILD/%, $(DEB_ARCH_PACKAGES)) \
355
$(patsubst %,INST/%, $(DEB_INDEP_PACKAGES)) $(patsubst %,INST/%, $(DEB_ARCH_PACKAGES)) \
356
$(patsubst %,BIN/%, $(DEB_INDEP_PACKAGES)) $(patsubst %,BIN/%, $(DEB_ARCH_PACKAGES)) \
357
$(patsubst %,CLEAN/%, $(DEB_INDEP_PACKAGES)) $(patsubst %,CLEAN/%, $(DEB_ARCH_PACKAGES)) \
358
implode explode prebuild checkpo