- add pl_mom to the build
[build.git] / Makefile
1 #
2 # PlanetLab RPM generation
3 #
4 # Copyright (c) 2003  The Trustees of Princeton University (Trustees).
5 # All Rights Reserved.
6
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted provided that the following conditions are
9 # met: 
10
11 #     * Redistributions of source code must retain the above copyright
12 #       notice, this list of conditions and the following disclaimer.
13
14 #     * Redistributions in binary form must reproduce the above
15 #       copyright notice, this list of conditions and the following
16 #       disclaimer in the documentation and/or other materials provided
17 #       with the distribution.
18
19 #     * Neither the name of the copyright holder nor the names of its
20 #       contributors may be used to endorse or promote products derived
21 #       from this software without specific prior written permission.
22
23 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TRUSTEES OR
27 # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
28 # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
29 # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
30 # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
31 # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
32 # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 #
35 # $Id: Makefile,v 1.56 2004/11/04 18:35:45 mlhuang Exp $
36 #
37
38 # Default target
39 all:
40
41 #
42 # CVSROOT: CVSROOT to use
43 # INITIAL: CVS tag to use for Source0 tarball
44 # TAG: CVS tag to patch to (if not HEAD)
45 # MODULE: CVS module name to use (if not HEAD)
46 # SPEC: RPM spec file template
47 # RPMFLAGS: Miscellaneous RPM flags
48 # CVS_RSH: If not ssh
49 # ALL: default targets
50 #
51 # If INITIAL is different than TAG, PatchSets will be generated
52 # automatically with cvsps(1) to bring Source0 up to TAG. If TAG is
53 # HEAD, a %{date} variable will be defined in the generated spec
54 # file. If a Patch: tag in the spec file matches a generated PatchSet
55 # number, the name of the patch will be as specified. Otherwise, the
56 # name of the patch will be the PatchSet number. %patch tags in the
57 # spec file are generated automatically.
58 #
59
60 # Default tags
61 INITIAL := HEAD
62 TAG := HEAD
63
64 #
65 # kernel
66 #
67
68 kernel-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
69 kernel-MODULE := linux-2.6
70 kernel-SPEC := linux-2.6/scripts/kernel-2.6-planetlab.spec
71 ALL += kernel
72
73 #
74 # vnet
75 #
76
77 vnet-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
78 vnet-MODULE := vnet
79 vnet-SPEC := vnet/vnet.spec
80 ALL += vnet
81
82 # Build kernel first so we can bootstrap off of its build
83 vnet: kernel
84
85 #
86 # util-vserver
87 #
88
89 util-vserver-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
90 util-vserver-MODULE := util-vserver
91 util-vserver-SPEC := util-vserver/util-vserver.spec
92 ALL += util-vserver
93
94 # Build kernel first so we can bootstrap off of its build
95 util-vserver: kernel
96
97 #
98 # vserver-reference
99 #
100
101 vserver-reference-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
102 vserver-reference-MODULE := vserver-reference
103 vserver-reference-SPEC := vserver-reference/vserver-reference.spec
104 ALL += vserver-reference
105
106 #
107 # lkcdutils
108 #
109
110 lkcdutils-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
111 lkcdutils-MODULE := lkcdutils
112 lkcdutils-SPEC := lkcdutils/spec/lkcdutils.spec
113 ALL += lkcdutils
114
115 # Build kernel first so we can bootstrap off of its build
116 lkcdutils: kernel
117
118 #
119 # yum
120 #
121
122 yum-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
123 yum-MODULE := yum
124 yum-SPEC := yum/yum.spec
125 ALL += yum
126
127 #
128 # ksymoops
129 #
130
131 ksymoops-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
132 ksymoops-INITIAL := ksymoops-2_4_9
133 ksymoops-MODULE := ksymoops
134 ksymoops-SPEC := ksymoops/ksymoops.spec
135 ALL += ksymoops
136
137 #
138 # PlanetLabAccounts
139 #
140
141 PlanetLabAccounts-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
142 PlanetLabAccounts-MODULE := PlanetLabAccounts
143 PlanetLabAccounts-SPEC := PlanetLabAccounts/PlanetLabAccounts.spec
144 ALL += PlanetLabAccounts
145
146 #
147 # NodeUpdate
148 #
149
150 NodeUpdate-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
151 NodeUpdate-MODULE := NodeUpdate
152 NodeUpdate-SPEC := NodeUpdate/NodeUpdate.spec
153 ALL += NodeUpdate
154
155 #
156 # PlanetLabConf
157 #
158
159 PlanetLabConf-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
160 PlanetLabConf-MODULE := PlanetLabConf
161 PlanetLabConf-SPEC := PlanetLabConf/PlanetLabConf.spec
162 ALL += PlanetLabConf
163
164 #
165 # PlanetLabKeys
166 #
167
168 PlanetLabKeys-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
169 PlanetLabKeys-MODULE := PlanetLabKeys
170 PlanetLabKeys-SPEC := PlanetLabKeys/PlanetLabKeys.spec
171 ALL += PlanetLabKeys
172
173 #
174 # ipod
175 #
176
177 ipod-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
178 ipod-MODULE := ipod
179 ipod-SPEC := ipod/ipod.spec
180 ALL += ipod
181
182 #
183 # sudo
184 #
185
186 sudo-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
187 sudo-MODULE := sudo
188 sudo-SPEC := sudo/planetlab_sudo.spec
189 ALL += sudo
190
191 #
192 # pycurl
193 #
194
195 pycurl-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
196 pycurl-MODULE := pycurl
197 pycurl-SPEC := pycurl/pycurl.spec
198 ALL += pycurl
199
200 #
201 # BootServerRequest
202 #
203
204 BootServerRequest-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
205 BootServerRequest-MODULE := BootServerRequest
206 BootServerRequest-SPEC := BootServerRequest/PLBootServerRequest.spec
207 ALL += BootServerRequest
208
209 #
210 # PlanetLabID
211 #
212
213 PlanetLabID-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
214 PlanetLabID-MODULE := PlanetLabID
215 PlanetLabID-SPEC := PlanetLabID/PlanetLabID.spec
216 ALL += PlanetLabID
217
218 #
219 # Node Manager
220 #
221
222 sidewinder-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
223 sidewinder-MODULE := sidewinder
224 sidewinder-SPEC := sidewinder/sidewinder.spec
225 ALL += sidewinder
226
227 #
228 # pl_sshd
229 #
230
231 pl_sshd-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
232 pl_sshd-MODULE := pl_sshd
233 pl_sshd-SPEC := pl_sshd/pl_sshd.spec
234 ALL += pl_sshd
235
236 #
237 # Resource Management Tools
238 #
239
240 resman-CVSROOT := :pserver:anon@build.planet-lab.org:/cvs
241 resman-MODULE := resman
242 resman-SPEC := resman/resman.spec
243 ALL += resman
244
245 #
246 # Proper: Privileged Operations Service
247 #
248
249 proper-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
250 proper-MODULE := proper
251 proper-SPEC := proper/proper.spec
252 ALL += proper
253
254 #
255 # ulogd
256 #
257
258 ulogd-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
259 ulogd-MODULE := ulogd
260 ulogd-SPEC := ulogd/ulogd.spec
261 ALL += ulogd
262
263 ulogd: kernel proper
264
265 #
266 # netflow and netsummary
267 #
268
269 netflow-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
270 netflow-MODULE := netflow netsummary
271 netflow-SPEC := netflow/netflow.spec
272 ALL += netflow
273
274 #
275 # PlanetLab Mom: Cleans up your mess
276 #
277
278 pl_mom-CVSROOT := :pserver:anon@cvs.planet-lab.org:/cvs
279 pl_mom-MODULE := pl_mom
280 pl_mom-SPEC := pl_mom/pl_mom.spec
281 ALL += pl_mom
282
283 ifeq ($(findstring $(package),$(ALL)),)
284
285 # Build all packages
286 all: $(ALL)
287
288 # Recurse
289 $(ALL):
290         $(MAKE) package=$@
291
292 # Remove files generated by this package
293 $(foreach package,$(ALL),$(package)-clean): %-clean:
294         $(MAKE) package=$* clean
295
296 # Remove all generated files
297 clean:
298         rm -rf BUILD RPMS SOURCES SPECS SRPMS .rpmmacros .cvsps
299
300 .PHONY: all $(ALL) $(foreach package,$(ALL),$(package)-clean) clean
301
302 else
303
304 # Define variables for Makerules
305 CVSROOT := $($(package)-CVSROOT)
306 INITIAL := $(if $($(package)-INITIAL),$($(package)-INITIAL),$(INITIAL))
307 TAG := $(if $($(package)-TAG),$($(package)-TAG),$(TAG))
308 MODULE := $($(package)-MODULE)
309 SPEC := $($(package)-SPEC)
310 RPMFLAGS := $($(package)-RPMFLAGS)
311 CVS_RSH := $(if $($(package)-CVS_RSH),$($(package)-CVS_RSH),ssh)
312
313 include Makerules
314
315 endif