~ubuntu-branches/ubuntu/intrepid/checkpolicy/intrepid

« back to all changes in this revision

Viewing changes to debian/common/targets.mk

  • Committer: Bazaar Package Importer
  • Author(s): Caleb Case, Caleb Case, Joseph Jackson IV
  • Date: 2008-02-09 21:34:46 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20080209213446-hqazy6s0r3lpdekc
Tags: 2.0.9-0ubuntu1
[ Caleb Case ]
* New upstream SVN HEAD.
 + Added support for policy capabilities from Todd Miller.
 + Initialize the source file name from the command line argument so
   that checkpolicy/checkmodule report something more useful than
   "unknown source".
 + Merged remove use of REJECT and trailing context in lex rules; make
   ipv4 address parsing like ipv6 from James Carter.
 + Merged handle unknown policydb flag support from Eric Paris.
   Adds new command line options -U {allow, reject, deny} for selecting
   the flag when a base module or kernel policy is built.
 + Merged fix for segfault on duplicate require of sensitivity from
   Caleb Case.
 + Merged fix for dead URLs in checkpolicy man pages from Dan Walsh.

[ Joseph Jackson IV ]
* debian/control
  - Update Debian Maintainer field

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
############################ -*- Mode: Makefile -*- ###########################
2
 
## targets.mk --- 
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
9
 
## Update Count     : 61
10
 
## Status           : Unknown, Use with caution!
11
 
## HISTORY          : 
12
 
## Description      : The top level targets mandated by policy, as well as
13
 
##                    their dependencies.
14
 
## 
15
 
## arch-tag: a81086a7-00f7-4355-ac56-8f38396935f4
16
 
## 
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.
21
 
##
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.
26
 
##
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
30
 
##
31
 
###############################################################################
32
 
 
33
 
#######################################################################
34
 
#######################################################################
35
 
###############             Miscellaneous               ###############
36
 
#######################################################################
37
 
#######################################################################
38
 
source diff:
39
 
        @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
40
 
 
41
 
testroot:
42
 
        @test $$(id -u) = 0 || (echo need root priviledges; exit 1)
43
 
 
44
 
checkpo:
45
 
        $(CHECKPO)
46
 
 
47
 
# arch-buildpackage likes to call this
48
 
prebuild: 
49
 
 
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.
53
 
 
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.
59
 
 
60
 
#######################################################################
61
 
#######################################################################
62
 
###############             Configuration               ###############
63
 
#######################################################################
64
 
#######################################################################
65
 
 
66
 
# Work here
67
 
CONFIG-common:: testdir
68
 
        $(REASON)
69
 
        $(checkdir)
70
 
 
71
 
stamp-arch-conf:  CONFIG-common
72
 
        $(REASON)
73
 
        $(checkdir)
74
 
        @echo done > $@
75
 
stamp-indep-conf: CONFIG-common
76
 
        $(REASON)
77
 
        $(checkdir)
78
 
        @echo done > $@
79
 
 
80
 
# Work here
81
 
CONFIG-arch::  stamp-arch-conf
82
 
        $(REASON)
83
 
CONFIG-indep:: stamp-indep-conf
84
 
        $(REASON)
85
 
 
86
 
STAMPS_TO_CLEAN += stamp-arch-conf stamp-indep-conf
87
 
# Work here
88
 
$(patsubst %,CONFIG/%,$(DEB_ARCH_PACKAGES))  :: CONFIG/% : CONFIG-arch  
89
 
        $(REASON)
90
 
        $(checkdir)
91
 
$(patsubst %,CONFIG/%,$(DEB_INDEP_PACKAGES)) :: CONFIG/% : CONFIG-indep 
92
 
        $(REASON)
93
 
        $(checkdir)
94
 
 
95
 
stamp-configure-arch:  $(patsubst %,CONFIG/%,$(DEB_ARCH_PACKAGES))
96
 
        $(REASON)
97
 
        @echo done > $@
98
 
stamp-configure-indep: $(patsubst %,CONFIG/%,$(DEB_INDEP_PACKAGES))
99
 
        $(REASON)
100
 
        @echo done > $@
101
 
 
102
 
configure-arch:  stamp-configure-arch
103
 
        $(REASON)
104
 
configure-indep: stamp-configure-indep
105
 
        $(REASON)
106
 
 
107
 
stamp-configure: configure-arch configure-indep
108
 
        $(REASON)
109
 
        @echo done > $@
110
 
 
111
 
configure: stamp-configure
112
 
        $(REASON)
113
 
 
114
 
STAMPS_TO_CLEAN += stamp-configure-arch stamp-configure-indep stamp-configure
115
 
#######################################################################
116
 
#######################################################################
117
 
###############                 Build                   ###############
118
 
#######################################################################
119
 
#######################################################################
120
 
 
121
 
# Work here
122
 
BUILD-common:: testdir
123
 
        $(REASON)
124
 
        $(checkdir)
125
 
 
126
 
stamp-arch-build:  BUILD-common $(patsubst %,CONFIG/%,$(DEB_ARCH_PACKAGES))  
127
 
        $(REASON)
128
 
        $(checkdir)
129
 
        @echo done > $@
130
 
stamp-indep-build: BUILD-common $(patsubst %,CONFIG/%,$(DEB_INDEP_PACKAGES)) 
131
 
        $(REASON)
132
 
        $(checkdir)
133
 
        @echo done > $@
134
 
 
135
 
STAMPS_TO_CLEAN += stamp-arch-build stamp-indep-build
136
 
# sync. Work here
137
 
BUILD-arch::  stamp-arch-build
138
 
        $(REASON)
139
 
        $(checkdir)
140
 
BUILD-indep:: stamp-indep-build
141
 
        $(REASON)
142
 
        $(checkdir)
143
 
 
144
 
# Work here
145
 
$(patsubst %,BUILD/%,$(DEB_ARCH_PACKAGES))  :: BUILD/% : BUILD-arch  
146
 
        $(REASON)
147
 
        $(checkdir)
148
 
$(patsubst %,BUILD/%,$(DEB_INDEP_PACKAGES)) :: BUILD/% : BUILD-indep 
149
 
        $(REASON)
150
 
        $(checkdir)
151
 
 
152
 
stamp-build-arch:  $(patsubst %,BUILD/%,$(DEB_ARCH_PACKAGES))
153
 
        $(REASON)
154
 
        @echo done > $@
155
 
stamp-build-indep: $(patsubst %,BUILD/%,$(DEB_INDEP_PACKAGES))
156
 
        $(REASON)
157
 
        @echo done > $@
158
 
 
159
 
build-arch:  stamp-build-arch
160
 
        $(REASON)
161
 
build-indep: stamp-build-indep
162
 
        $(REASON)
163
 
 
164
 
stamp-build: build-arch build-indep 
165
 
        $(REASON)
166
 
        @echo done > $@
167
 
 
168
 
build: stamp-build
169
 
        $(REASON)
170
 
 
171
 
# Work here
172
 
POST-BUILD-arch-stamp::
173
 
        $(REASON)
174
 
POST-BUILD-indep-stamp::
175
 
        $(REASON)
176
 
 
177
 
STAMPS_TO_CLEAN += stamp-build-arch stamp-build-indep stamp-build
178
 
#######################################################################
179
 
#######################################################################
180
 
###############                Install                  ###############
181
 
#######################################################################
182
 
#######################################################################
183
 
# Work here
184
 
INST-common:: testdir
185
 
        $(checkdir)
186
 
        $(REASON)
187
 
 
188
 
stamp-arch-inst: POST-BUILD-arch-stamp INST-common $(patsubst %,BUILD/%,$(DEB_ARCH_PACKAGES))    
189
 
        $(REASON)
190
 
        $(checkdir)
191
 
        @echo done > $@
192
 
stamp-indep-inst: POST-BUILD-indep-stamp INST-common $(patsubst %,BUILD/%,$(DEB_INDEP_PACKAGES)) 
193
 
        $(REASON)
194
 
        $(checkdir)
195
 
        @echo done > $@
196
 
 
197
 
STAMPS_TO_CLEAN += stamp-arch-inst stamp-indep-inst
198
 
# sync. Work here
199
 
INST-arch::  stamp-arch-inst
200
 
        $(REASON)
201
 
        $(checkdir)
202
 
INST-indep:: stamp-indep-inst
203
 
        $(REASON)
204
 
        $(checkdir)
205
 
 
206
 
# Work here
207
 
$(patsubst %,INST/%,$(DEB_ARCH_PACKAGES))  :: INST/% : testroot INST-arch  
208
 
        $(REASON)
209
 
        $(checkdir)
210
 
$(patsubst %,INST/%,$(DEB_INDEP_PACKAGES)) :: INST/% : testroot INST-indep 
211
 
        $(REASON)
212
 
        $(checkdir)
213
 
 
214
 
stamp-install-arch:  $(patsubst %,INST/%,$(DEB_ARCH_PACKAGES))
215
 
        $(REASON)
216
 
        @echo done > $@
217
 
stamp-install-indep: $(patsubst %,INST/%,$(DEB_INDEP_PACKAGES))
218
 
        $(REASON)
219
 
        @echo done > $@
220
 
 
221
 
install-arch:  stamp-install-arch
222
 
        $(REASON)
223
 
install-indep: stamp-install-indep
224
 
        $(REASON)
225
 
 
226
 
stamp-install: install-indep install-arch
227
 
        $(REASON)
228
 
        @echo done > $@
229
 
 
230
 
install: stamp-install
231
 
        $(REASON)
232
 
 
233
 
STAMPS_TO_CLEAN += stamp-install stamp-install-arch stamp-install-indep
234
 
#######################################################################
235
 
#######################################################################
236
 
###############                Package                  ###############
237
 
#######################################################################
238
 
#######################################################################
239
 
# Work here
240
 
BIN-common:: testdir testroot 
241
 
        $(REASON)
242
 
        $(checkdir)
243
 
 
244
 
stamp-arch-bin:  testdir testroot BIN-common  $(patsubst %,INST/%,$(DEB_ARCH_PACKAGES))
245
 
        $(REASON)
246
 
        $(checkdir)
247
 
        @echo done > $@
248
 
stamp-indep-bin: testdir testroot BIN-common  $(patsubst %,INST/%,$(DEB_INDEP_PACKAGES))
249
 
        $(REASON)
250
 
        $(checkdir)
251
 
        @echo done > $@
252
 
 
253
 
STAMPS_TO_CLEAN += stamp-arch-bin stamp-indep-bin
254
 
# sync Work here
255
 
BIN-arch::  testroot  stamp-arch-bin
256
 
        $(REASON)
257
 
        $(checkdir)
258
 
BIN-indep:: testroot  stamp-indep-bin
259
 
        $(REASON)
260
 
        $(checkdir)
261
 
 
262
 
# Work here
263
 
$(patsubst %,BIN/%,$(DEB_ARCH_PACKAGES))  :: BIN/% : testroot BIN-arch  
264
 
        $(REASON)
265
 
        $(checkdir)
266
 
$(patsubst %,BIN/%,$(DEB_INDEP_PACKAGES)) :: BIN/% : testroot BIN-indep 
267
 
        $(REASON)
268
 
        $(checkdir)
269
 
 
270
 
 
271
 
stamp-binary-arch:  $(patsubst %,BIN/%,$(DEB_ARCH_PACKAGES))
272
 
        $(REASON)
273
 
        @echo done > $@
274
 
stamp-binary-indep: $(patsubst %,BIN/%,$(DEB_INDEP_PACKAGES))
275
 
        $(REASON)
276
 
        @echo done > $@
277
 
# required
278
 
binary-arch:  stamp-binary-arch
279
 
        $(REASON)
280
 
binary-indep: stamp-binary-indep
281
 
        $(REASON)
282
 
 
283
 
stamp-binary: binary-indep binary-arch
284
 
        $(REASON)
285
 
        @echo done > $@
286
 
 
287
 
# required
288
 
binary: stamp-binary
289
 
        $(REASON)
290
 
        @echo arch package   = $(DEB_ARCH_PACKAGES)
291
 
        @echo indep packages = $(DEB_INDEP_PACKAGES)
292
 
 
293
 
STAMPS_TO_CLEAN += stamp-binary stamp-binary-arch stamp-binary-indep
294
 
#######################################################################
295
 
#######################################################################
296
 
###############                 Clean                   ###############
297
 
#######################################################################
298
 
#######################################################################
299
 
# Work here
300
 
CLN-common:: testdir 
301
 
        $(REASON)
302
 
        $(checkdir)
303
 
# sync Work here
304
 
CLN-arch::  CLN-common
305
 
        $(REASON)
306
 
        $(checkdir)
307
 
CLN-indep:: CLN-common
308
 
        $(REASON)
309
 
        $(checkdir)
310
 
# Work here
311
 
$(patsubst %,CLEAN/%,$(DEB_ARCH_PACKAGES))  :: CLEAN/% : CLN-arch
312
 
        $(REASON)
313
 
        $(checkdir)
314
 
$(patsubst %,CLEAN/%,$(DEB_INDEP_PACKAGES)) :: CLEAN/% : CLN-indep
315
 
        $(REASON)
316
 
        $(checkdir)
317
 
 
318
 
clean-arch:  $(patsubst %,CLEAN/%,$(DEB_ARCH_PACKAGES))
319
 
        $(REASON)
320
 
clean-indep: $(patsubst %,CLEAN/%,$(DEB_INDEP_PACKAGES))
321
 
        $(REASON)
322
 
 
323
 
stamp-clean: clean-indep clean-arch
324
 
        $(REASON)
325
 
        $(checkdir)
326
 
        -test -f Makefile && $(MAKE) distclean
327
 
        -rm -f  $(FILES_TO_CLEAN) $(STAMPS_TO_CLEAN)
328
 
        -rm -rf $(DIRS_TO_CLEAN)
329
 
        -rm -f core TAGS                                                     \
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 \)          \
336
 
                -print`
337
 
 
338
 
clean: stamp-clean
339
 
        $(REASON)
340
 
 
341
 
 
342
 
#######################################################################
343
 
#######################################################################
344
 
###############                                         ###############
345
 
#######################################################################
346
 
#######################################################################
347
 
 
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
359
 
 
360
 
#Local variables:
361
 
#mode: makefile
362
 
#End: