2 # Thierry Parmentelat - INRIA Sophia Antipolis
10 # this extracts all specfiles and computes .mk from specfiles
11 # you need to specify PLDISTRO here if relevant - see below
13 # for more info on how to invoke this stuff
15 #################### (fedora) distributions
17 # (*) as of nov. 2007, myplc-devel is deprecated
18 # (*) instead, we create a fresh vserver that holds required tools (see e.g. planetlab-devel.lst)
19 # (*) the build uses the current fedora version as a target for the produced images
20 # (*) so you simply need to create a fedora 8 build image for building fedora-8 images
22 #################### (planetlab) distributions
24 # (*) the default distribution is called 'planetlab'
25 # (*) you may define an alternative distribution, e.g. onelab
26 # in this case you need to
27 # (*) create onelab.mk that defines your *packages* (see below)
28 # (*) create onelab-tags.mk that defines where to fetch your *modules*
29 # (*) create your main yumgroups.xml as groups/<distro>.xml
30 # (*) there are also various places where a set of modules are defined.
31 # check for .lst files in the various modules that build root images
32 # and mimic what's done for planetlab
33 # (*) then you need to run
34 # make stage1=true PLDISTRO=onelab
37 # This build deals with 2 kinds of objects
39 # (*) packages are named upon the RPM name; they are mostly lowercase
40 # Add a package to ALL if you want it built as part of the default set.
41 # (*) modules are named after the subversion tree; as of this writing their names
42 # are mostly mixed case like MyPLC or Vserverreference
44 #################### packages
45 # basics: how to build a package - you need/may define the following variables
48 # a package needs one or several modules to build.
51 # the package's specfile; this is relative to the FIRST module in package-MODULES
52 # see 'codebase' below
56 # (*) package-SPECVARS
57 # space-separated list of spec variable definitions, where you can reference make variable that relate to
58 # packages defined BEFORE the current one (note: you should use = - as opposed to := - to define these)
59 # e.g. mydriver-SPECVARS = foo=$(kernel-rpm-release)
60 # would let you use the %release from the kernel's package when rpmbuild'ing mydriver - see automatic below
62 # a set of *packages* that this package depends on
63 # (*) package-DEPENDDEVELS
64 # a set of *packages* that the build will rpm-install the -devel variant before building <package>
65 # (*) package-DEPENDDEVELRPMS
66 # a set of *rpms* that the build will rpm-install before building <package>
67 # (*) package-DEPENDFILES
68 # a set of files that the package depends on - and that make needs to know about
69 # if this contains RPMS/yumgroups.xml, then the toplevel RPMS's index
70 # is refreshed with createrepo prior to running rpmbuild
71 # (*) package-RPMFLAGS: Miscellaneous RPM flags
72 # (*) package-RPMBUILD: If not rpmbuild - mostly used for sudo'ing rpmbuild
74 #################### modules
75 # Required information about the various modules (set this in e.g. planetlab-tags.mk)
78 # the complete path where this module lies;
79 # you can specify the trunk or a given tag with this variable
81 # OR if the module is managed under cvs (will be obsoleted)
86 #################### automatic variables
88 # the build defines the following make variables - these are extracted from spec files
89 # (*) package-TARBALLS : from the Source<n>: declaration
90 # example: kernel-i386-TARBALLS = SOURCES/linux-2.6.20.tar.bz2
91 # (*) package-SOURCE :
92 # example: kernel-i386-SOURCE = SOURCES/linux-2.6.20
94 # example: kernel-i386-SRPM = SRPMS/kernel-2.6.20-1.2949.fc6.vs2.2.0.1.0.planetlab.src.rpm
96 # example: kernel-i386-RPMS = \
97 # RPMS/i686/kernel-2.6.20-1.2949.fc6.vs2.2.0.1.0.planetlab.i686.rpm \
98 # RPMS/i686/kernel-devel-2.6.20-1.2949.fc6.vs2.2.0.1.0.planetlab.i686.rpm \
99 # RPMS/i686/kernel-vserver-2.6.20-1.2949.fc6.vs2.2.0.1.0.planetlab.i686.rpm \
100 # RPMS/i686/kernel-debuginfo-2.6.20-1.2949.fc6.vs2.2.0.1.0.planetlab.i686.rpm
101 # (*) package-rpm-name
102 # example: kernel-i386-rpm-name = kernel
103 # (*) package-rpm-release
104 # example: kernel-i386-rpm-release = 1.2949.fc6.vs2.2.0.1.0.planetlab
105 # (*) package-version
106 # example: kernel-i386-rpm-version = 2.6.20
107 # (*) package-subversion
108 # example: myplc-rpm-subversion = 15
114 HOSTARCH := $(shell uname -i)
115 DISTRO := $(shell ./getdistro.sh)
116 RELEASE := $(shell ./getrelease.sh)
118 #################### Makefile
124 PLDISTRO := planetlab
126 export CVS_RSH := ssh
128 ########## pldistro.mk holds PLDISTRO - it is generated at stage1 (see below)
133 #################### include onelab.mk
134 # describes the set of components
135 PLDISTROCONTENTS := $(PLDISTRO).mk
136 include $(PLDISTROCONTENTS)
138 #################### include <pldistro>-tags.mk
139 # describes where to fetch components, and the related tags if using cvs
140 PLDISTROTAGS := $(PLDISTRO)-tags.mk
141 include $(PLDISTROTAGS)
143 ########## stage1 and stage2
144 # extract specs and compute .mk files by running
146 # entering stage1, we compute all the spec files
147 # then we use stage2 to compute the .mk iteratively,
148 # ensuring that the n-1 first makefiles are loaded when creating the n-th one
149 # when stage2 is set, it is supposed to be an index (starting at 1) in $(ALL)
151 ALLMKS := $(foreach package, $(ALL), MAKE/$(package).mk)
153 ### stage2 : need some arithmetic, see
154 # http://www.cmcrossroads.com/articles/ask-mr.-make/learning-gnu-make-functions-with-arithmetic.html
156 # the first n packages
157 packages := $(wordlist 1,$(words $(stage2)),$(ALL))
159 package := $(word $(words $(packages)),$(packages))
160 # the n-1 first packages
161 stage2_1 := $(wordlist 2,$(words $(stage2)),$(stage2))
162 previous := $(wordlist 1,$(words $(stage2_1)),$(ALL))
163 previousmks := $(foreach package,$(previous),MAKE/$(package).mk)
164 include $(previousmks)
167 @echo "========== stage2 : $(package)"
168 # @echo "stage2 : included .mk files : $(previousmks)"
169 all: $($(package)_specpath)
170 all: MAKE/$(package).mk
176 @echo "========== stage1"
179 # specs and makes are done sequentially by stage2
182 arg=""; for n in $(ALL) ; do arg="$$arg x"; $(MAKE) --no-print-directory stage2="$$arg"; done
185 ### once .mks are OK, you can run make normally
192 # mention $(ALL) here rather than rpms
193 # this is because the inter-package dependencies are expressed like
194 # util-vserver: util-python
201 # gather build information for the 'About' page
203 @echo 'Creating myplc-release'
205 (echo -n 'Build bdate: ' ; date '+%Y.%m.%d') >> $@
206 (echo -n 'Build btime: ' ; date '+%H:%M') >> $@
207 (echo -n 'Build hostname: ' ; hostname) >> $@
208 (echo -n 'Build location: ' ; pwd) >> $@
209 (echo -n 'Build tags file: ' ; fgrep '$$''Id' $(PLDISTROTAGS)) >> $@
210 echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx modules versions info" >> $@
211 $(MAKE) --no-print-directory versions >> $@
216 YUMGROUPS := groups/$(PLDISTRO).xml
219 RPMS/yumgroups.xml: $(YUMGROUPS)
221 install -D -m 644 $(YUMGROUPS) $@
223 createrepo = createrepo --quiet -g yumgroups.xml RPMS/
225 repo: RPMS/yumgroups.xml
232 # * to make configuration easier, we always use the first module's
233 # definitions (CVSROOT,TAG, or SVNPATH) to extract the spec file
234 # * for the same reason, in case cvs is used, the first module name is added to
235 # $(package)-SPEC - otherwise the cvs modules have to define spec as
236 # <module>/<module>.spec while svn modules just define it as <module>.spec
238 define stage1_variables
239 $(1)_spec = $(notdir $($(1)-SPEC))
240 $(1)_specpath = SPECS/$(notdir $($(1)-SPEC))
241 $(1)_module = $(firstword $($(1)-MODULES))
244 $(foreach package, $(ALL), $(eval $(call stage1_variables,$(package))))
247 # for each package, compute whether we need to set date (i.e. whether we use the trunk)
248 # the myplc package is forced to have a date, because it is more convenient
249 # (we cannot bump its number everytime something changes in the system)
251 define package_hasdate
252 $(1)_hasdate = $(if $(subst myplc,,$(1)), \
253 $(if $($(1)-SVNPATH),\
254 $(if $(findstring /trunk,$($(1)-SVNPATH)),yes,),\
255 $(if $(findstring HEAD,$($(1)-TAG)),yes,)), \
259 $(foreach package, $(ALL), $(eval $(call package_hasdate,$(package))))
261 ### extract spec file from scm
262 # usage: extract_spec_file package
263 # see early releases for comments on other possible implementations
264 # cannot use variables in such rules, we need to inline everything, sigh
268 (echo -n "# Generated by planetlab build from $($(1)-SPEC) on " ; date) > $($(1)_specpath)
269 echo "%define distroname $(DISTRO)" >> $($(1)_specpath)
270 echo "%define distrorelease $(RELEASE)" >> $($(1)_specpath)
271 echo "%define pldistro $(PLDISTRO)" >> $($(1)_specpath)
272 $(if $($(1)_hasdate),echo "%define date $(shell date +%Y.%m.%d)" >> $($(1)_specpath),)
273 echo "# included from codebase specfile" >> $($(1)_specpath)
274 $(if $($(1)-SPECVARS), \
275 $(foreach line,$($(1)-SPECVARS), \
276 echo "%define" $(word 1,$(subst =, ,$(line))) "$(word 2,$(subst =, ,$(line)))" >> $($(1)_specpath) ;))
277 $(if $($($(1)_module)-SVNPATH),\
278 svn cat $($($(1)_module)-SVNPATH)/$($(1)-SPEC) >> $($(1)_specpath),\
279 cvs -d $($($(1)_module)-CVSROOT) checkout \
280 -r $($($(1)_module)-TAG) \
281 -p $($(1)_module)/$($(1)-SPEC) >> $($(1)_specpath))
282 @if [ -z $($(1)_specpath) ] ; then rm $($(1)_specpath) ; exit 1 ; fi
285 $(foreach package,$(ALL),$(eval $(call target_spec,$(package))))
288 # Base rpmbuild in the current directory
289 # issues on fedora 8 : see the following posts
290 # http://forums.fedoraforum.org/showthread.php?t=39625 - and more specifically post#6
291 # https://www.redhat.com/archives/fedora-devel-list/2007-November/msg00171.html
293 FAKEROOT=/longbuildroot
294 PWD=$(shell /bin/pwd)
295 ifeq "$(PWD)" "$(REALROOT)"
296 export HOME := $(FAKEROOT)
298 export HOME := $(PWD)
301 ifeq "$(shell pwd)" "/build"
302 rm -f $(FAKEROOT) ; ln -s $(REALROOT) $(FAKEROOT)
305 echo "%_topdir $(HOME)" >> $@
306 echo "%_tmppath $(HOME)/tmp" >> $@
307 echo "%_netsharedpath /proc:/dev/pts" >> $@
308 echo "%_install_langs C:de:en:es:fr" >> $@
309 echo "%_excludedocs yes" >> $@
311 ### this utility allows to extract various info from a spec file
312 ### and to define them in makefiles
313 spec2make: spec2make.c
314 $(CC) -g -Wall $< -o $@ -lrpm -lrpmbuild
316 ### run spec2make on the spec file and include the result
317 # usage: spec2make package
319 MAKE/$(1).mk: $($(1)_specpath) spec2make .rpmmacros
321 ./spec2make $($(1)-RPMFLAGS) $($(1)_specpath) $(1) > MAKE/$(1).mk
322 @if [ -z MAKE/$(1).mk ] ; then rm MAKE/$(1).mk ; exit 1 ; fi
325 $(foreach package,$(ALL),$(eval $(call target_mk,$(package))))
327 # stores PLDISTRO in a file
328 # this is done at stage1. later run wont get confused
330 echo "PLDISTRO:=$(PLDISTRO)" > $@
331 echo "PLDISTROTAGS:=$(PLDISTROTAGS)" >> $@
333 savepldistro: pldistro.mk
336 # always refresh this
340 ### pack sources into tarballs
341 ALLTARBALLS:= $(foreach package, $(ALL), $($(package)-TARBALLS))
342 tarballs: $(ALLTARBALLS)
343 @echo $(words $(ALLTARBALLS)) source tarballs OK
346 SOURCES/%.tar.bz2: SOURCES/%
347 tar chpjf $@ -C SOURCES $*
349 SOURCES/%.tar.gz: SOURCES/%
350 tar chpzf $@ -C SOURCES $*
352 SOURCES/%.tgz: SOURCES/%
353 tar chpzf $@ -C SOURCES $*
356 URLS/%: url=$(subst @colon@,:,$(subst @slash@,/,$(notdir $@)))
357 URLS/%: basename=$(notdir $(url))
359 echo curl $(url) -o SOURCES/$(basename)
362 ### the directory SOURCES/<package>-<version> is made
363 # with a copy -rl from CODEBASES/<package>
364 # the former is $(package-SOURCE) and the latter is $(package-CODEBASE)
365 ALLSOURCES:=$(foreach package, $(ALL), $($(package)-SOURCE))
366 # so that make does not use the rule below directly for creating the tarball files
367 .SECONDARY: $(ALLSOURCES)
369 sources: $(ALLSOURCES)
370 @echo $(words $(ALLSOURCES)) versioned source trees OK
373 define target_link_codebase_sources
374 $($(1)-SOURCE): $($(1)-CODEBASE) ; mkdir -p SOURCES ; cp -rl $($(1)-CODEBASE) $($(1)-SOURCE)
377 $(foreach package,$(ALL),$(eval $(call target_link_codebase_sources,$(package))))
379 ### codebase extraction
380 ALLCODEBASES:=$(foreach package, $(ALL), $($(package)-CODEBASE))
381 # so that make does not use the rule below directly for creating the tarball files
382 .SECONDARY: $(ALLCODEBASES)
384 codebases : $(ALLCODEBASES)
385 @echo $(words $(ALLCODEBASES)) codebase OK
389 # usage: extract_single_module package
390 define extract_single_module
392 $(if $($($(1)_module)-SVNPATH), cd CODEBASES && svn export $($($(1)_module)-SVNPATH) $(1), cd CODEBASES && cvs -d $($($(1)_module)-CVSROOT) export -r $($($(1)_module)-TAG) -d $(1) $($(1)_module))
395 # usage: extract_multi_module package
396 define extract_multi_module
397 mkdir -p CODEBASES/$(1) && cd CODEBASES/$(1) && (\
398 $(foreach m,$($(1)-MODULES), $(if $($(m)-SVNPATH), svn export $($(m)-SVNPATH) $(m);, cvs -d $($(m)-CVSROOT) export -r $($(m)-TAG) $(m);)))
401 CODEBASES/%: package=$(notdir $@)
402 CODEBASES/%: multi_module=$(word 2,$($(package)-MODULES))
404 @(echo -n "XXXXXXXXXXXXXXX -- BEG CODEBASE $(package) : $@ " ; date)
405 $(if $(multi_module),\
406 $(call extract_multi_module,$(package)),\
407 $(call extract_single_module,$(package)))
408 @(echo -n "XXXXXXXXXXXXXXX -- END CODEBASE $(package) : $@ " ; date)
411 ALLSRPMS:=$(foreach package,$(ALL),$($(package)-SRPM))
413 @echo $(words $(ALLSRPMS)) source rpms OK
416 # usage: target_source_rpm package
417 # select upon the package name, whether it contains srpm or not
418 define target_source_rpm
419 ifeq "$(subst srpm,,$(1))" "$(1)"
420 $($(1)-SRPM): $($(1)_specpath) .rpmmacros $($(1)-TARBALLS)
421 mkdir -p BUILD SRPMS tmp
422 @(echo -n "XXXXXXXXXXXXXXX -- BEG SRPM $(1) " ; date)
423 -$(foreach devel,$($(1)-DEPENDDEVELS), $(if $($(devel)-DEVEL-RPMS),rpm --force -Uvh $($(devel)-DEVEL-RPMS);))
424 -$(foreach rpm,$($(1)-DEPENDDEVELRPMS), rpm --force -Uvh $($(rpm)-RPM-PATH);)
425 $(if $($(1)-RPMBUILD),\
426 $($(1)-RPMBUILD) $($(1)-RPMFLAGS) -bs $($(1)_specpath),
427 $(RPMBUILD) $($(1)-RPMFLAGS) -bs $($(1)_specpath))
428 @(echo -n "XXXXXXXXXXXXXXX -- END SRPM $(1) " ; date)
430 $($(1)-SRPM): $($(1)_specpath) .rpmmacros $($(1)-CODEBASE)
431 mkdir -p BUILD SRPMS tmp
432 @(echo -n "XXXXXXXXXXXXXXX -- BEG SRPM $(1) (using make srpm) " ; date)
433 -$(foreach devel,$($(1)-DEPENDDEVELS), $(if $($(devel)-DEVEL-RPMS),rpm --force -Uvh $($(devel)-DEVEL-RPMS);))
434 -$(foreach rpm,$($(1)-DEPENDDEVELRPMS), rpm --force -Uvh $($(rpm)-RPM-PATH);)
435 make -C $($(1)-CODEBASE) srpm && \
436 rm -f SRPMS/$(notdir $($(1)-SRPM)) && \
437 ln $($(1)-CODEBASE)/$(notdir $($(1)-SRPM)) SRPMS/$(notdir $($(1)-SRPM))
438 @(echo -n "XXXXXXXXXXXXXXX -- END SRPM $(1) " ; date)
442 $(foreach package,$(ALL),$(eval $(call target_source_rpm,$(package))))
444 ### rpmbuild invokation
445 ALLRPMS:=$(foreach package,$(ALL),$($(package)-RPMS))
446 # same as above, mention $(ALL) and not $(ALLRPMS)
448 @echo $(words $(ALLRPMS)) binary rpms OK
451 # use tmp dirs when building binary rpm so make remains idempotent
452 # otherwise SOURCES/ or SPEC gets touched again - which leads to rebuilding
453 rpm_use_tmp_dirs = --define "_sourcedir $(HOME)/tmp" --define "_specdir $(HOME)/tmp"
455 # usage: build_binary_rpm package
456 # xxx hacky - invoke createrepo if DEPENDFILES mentions RPMS/yumgroups.xml
457 define target_binary_rpm
458 $($(1)-RPMS): $($(1)-SRPM)
459 mkdir -p BUILD RPMS tmp
460 @(echo -n "XXXXXXXXXXXXXXX -- BEG RPM $(1) " ; date)
461 $(if $(findstring RPMS/yumgroups.xml,$($(1)-DEPENDFILES)), $(createrepo) , )
462 $(if $($(1)-RPMBUILD),\
463 $($(1)-RPMBUILD) $($(1)-RPMFLAGS) --rebuild $(rpm_use_tmp_dirs) $($(1)-SRPM), \
464 $(RPMBUILD) $($(1)-RPMFLAGS) --rebuild $(rpm_use_tmp_dirs) $($(1)-SRPM))
465 @(echo -n "XXXXXXXXXXXXXXX -- END RPM $(1) " ; date)
468 $(foreach package,$(ALL),$(eval $(call target_binary_rpm,$(package))))
471 # e.g. make proper -> does propers rpms
472 # usage shorthand_target package
473 define target_shorthand
474 $(1): $($(package)-RPMS)
476 $(1)-spec: $($(package)-SPEC)
478 $(1)-mk: $($(package)-MK)
480 $(1)-tarball: $($(package)-TARBALLS)
482 $(1)-codebase: $($(package)-CODEBASE)
484 $(1)-source: $($(package)-SOURCE)
485 .PHONY: $(1)-codebase
486 $(1)-rpms: $($(package)-RPMS)
488 $(1)-srpm: $($(package)-SRPM)
492 $(foreach package,$(ALL),$(eval $(call target_shorthand,$(package))))
495 define package_depends_on_file
500 define target_dependfiles
501 $(foreach file,$($(1)-DEPENDFILES),$(eval $(call package_depends_on_file,$(1),$(file))))
504 define package_depends_on_package
507 $($(1)-RPMS):$($(2)-RPMS)
510 define target_depends
511 $(foreach package,$($(1)-DEPENDS) $($(1)-DEPENDDEVELS),$(eval $(call package_depends_on_package,$(1),$(package))))
514 $(foreach package,$(ALL),$(eval $(call target_depends,$(package))))
515 $(foreach package,$(ALL),$(eval $(call target_dependfiles,$(package))))
518 # usage: target_clean package
521 rm -rf $($(1)-CODEBASE)
522 .PHONY: $(1)-clean-codebase
523 CLEANS += $(1)-clean-codebase
525 rm -rf $($(1)-SOURCE)
526 .PHONY: $(1)-clean-source
527 CLEANS += $(1)-clean-source
529 rm -rf $($(1)-TARBALLS)
530 .PHONY: $(1)-clean-tarball
531 CLEANS += $(1)-clean-tarball
533 rm -rf BUILD/$(notdir $($(1)-SOURCE))
534 CLEANS += $(1)-clean-build
537 .PHONY: $(1)-clean-rpms
538 CLEANS += $(1)-clean-rpms
541 .PHONY: $(1)-clean-srpm
542 CLEANS += $(1)-clean-srpm
543 $(1)-codeclean: $(1)-clean-source $(1)-clean-tarball $(1)-clean-build $(1)-clean-rpms $(1)-clean-srpm
544 $(1)-clean: $(1)-clean-codebase $(1)-codeclean
545 .PHONY: $(1)-codeclean $(1)-clean
547 rm -rf $($(1)_specpath)
548 .PHONY: $(1)-clean-spec
551 .PHONY: $(1)-clean-make
552 $(1)-distclean: $(1)-distclean1 $(1)-distclean2
553 $(1)-distclean1: $(1)-clean-spec $(1)-clean-make
554 $(1)-distclean2: $(1)-clean
555 .PHONY: $(1)-distclean $(1)-distclean1 $(1)-distclean2
558 $(foreach package,$(ALL),$(eval $(call target_clean,$(package))))
566 @echo Available clean targets
569 ### brute force clean
571 rm -rf pldistro.mk .rpmmacros spec2make SPECS MAKE
573 rm -rf CODEBASES SOURCES BUILD RPMS SRPMS tmp
574 distclean: distclean1 distclean2
575 .PHONY: distclean1 distclean2 distclean
577 # xxx tmp - I cannot use this on my mac for local testing
578 ISMACOS=$(findstring Darwin,$(shell uname))
579 ifneq "$(ISMACOS)" ""
580 #################### produce reliable version information
582 VFORMAT="%30s := %s\n"
585 @$(if $($(1)-SVNPATH),\
586 printf $(VFORMAT) $(1)-SVNPATH "$($(1)-SVNPATH)",\
587 printf $(VFORMAT) $(1)-CVSROOT "$($(1)-CVSROOT)" ; printf $(VFORMAT) $(1)-TAG "$($(1)-TAG)")
590 # compute all modules
592 $(foreach package,$(ALL), $(eval ALL-MODULES+=$($(package)-MODULES)))
593 ALL-MODULES:=$(sort $(ALL-MODULES))
595 $(foreach module,$(ALL-MODULES), $(eval $(call print_version,$(module))))
597 versions: $(foreach module, $(ALL-MODULES), $(module)-version)
600 @echo "warning : the 'versions' target is not supported on macos"
603 #################### include install Makefile
604 # the default is to use the distro-dependent install file
605 # however the main distro file can redefine PLDISTROINSTALL
606 ifndef PLDISTROINSTALL
607 PLDISTROINSTALL := $(PLDISTRO)-install.mk
610 -include $(PLDISTROINSTALL)
614 @echo "Known pakages are"
616 @echo "Run make in two stages:"
618 @echo "make stage1=true PLDISTRO=onelab"
619 @echo " -> extracts all spec files in SPECS/ and mk files in MAKE/"
620 @echo " as well as save PLDISTRO for subsequent runs"
622 @echo "Then you can use the following targets"
624 @echo " rebuilds everything"
625 @echo '$ make util-vserver'
626 @echo " makes the RPMS related to util-vserver"
627 @echo " equivalent to 'make util-vserver-rpms'"
629 @echo "Or, vertically - step-by-step for a given package"
630 @echo '$ make util-vserver-codebase'
631 @echo " performs codebase extraction in CODEBASES/util-vserver"
632 @echo '$ make util-vserver-source'
633 @echo " creates source link in SOURCES/util-vserver-<version>"
634 @echo '$ make util-vserver-tarball'
635 @echo " creates source tarball in SOURCES/util-vserver-<version>.<tarextension>"
636 @echo '$ make util-vserver-rpms'
637 @echo " build rpm(s) in RPMS/"
638 @echo '$ make util-vserver-srpm'
639 @echo " build source rpm in SRPMS/"
641 @echo "Or, horizontally, reach a step for all known packages"
642 @echo '$ make codebases'
643 @echo '$ make sources'
644 @echo '$ make tarballs'
648 @echo "Cleaning examples"
650 @echo " removes the files made by make"
651 @echo "$ make distclean"
652 @echo " brute-force cleaning, removes entire directories - requires a new stage1"
654 @echo "$ make iptables-distclean"
655 @echo "$ make iptables-codeclean"
656 @echo " run this if you've made a change in the CODEBASES area for iptables"
658 @echo "$ make util-vserver-clean"
659 @echo " removes codebase, source, tarball, build, rpm and srpm for util-vserver"
660 @echo "$ make util-vserver-clean-codebase"
661 @echo " and so on for source, tarball, build, rpm and srpm"
663 #################### convenience, for debugging only
664 # make +foo : prints the value of $(foo)
665 # make ++foo : idem but verbose, i.e. foo=$(foo)
666 ++%: varname=$(subst +,,$@)
668 @echo "$(varname)=$($(varname))"
669 +%: varname=$(subst +,,$@)
671 @echo "$($(varname))"