+####################
+# invocation:
+#
+# (*) make stage1=true
+# this extracts all specfiles and computes .mk from specfiles
+# you need to specify PLDISTRO here if relevant - see below
+# (*) make help
+# for more info on how to invoke this stuff
+#
+#################### (fedora) distributions
+#
+# (*) as of nov. 2007, myplc-devel is deprecated
+# (*) instead, we create a fresh vserver that holds required tools (see e.g. planetlab-devel.lst)
+# (*) the build uses the current fedora version as a target for the produced images
+# (*) so you simply need to create a fedora 8 build image for building fedora-8 images
+#
+#################### (planetlab) distributions
+#
+# (*) see README-pldistros.txt
+# (*) then you need to run
+# make stage1=true PLDISTRO=onelab
+#
+####################
+# This build deals with 3 kinds of objects
+#
+# (*) packages are named upon the RPM name; they are mostly lowercase
+# Add a package to ALL if you want it built as part of the default set.
+# (*) modules are named after the subversion tree; as of this writing their names
+# are mostly mixed case like MyPLC or VserverReference
+# (*) rpms are named in the spec files. A package typically defines several rpms;
+# rpms are used for defining DEPEND-DEVEL-RPMS. See also package.rpmnames
+#
+#################### packages
+# basics: how to build a package - you need/may define the following variables
+#
+# (*) package-MODULES
+# a package needs one or several modules to build.
+# to this end, define
+# (*) package-SPEC
+# the package's specfile; this is relative to the FIRST module in package-MODULES
+# see 'codebase' below
+#
+# Optional:
+#
+# (*) package-SPECVARS
+# space-separated list of spec variable definitions, where you can reference make variable that relate to
+# packages defined BEFORE the current one (note: you should use = - as opposed to := - to define these)
+# e.g. mydriver-SPECVARS = foo=$(kernel-rpm-release)
+# would let you use the %release from the kernel's package when rpmbuild'ing mydriver - see automatic below
+# (*) package-DEPEND-PACKAGES
+# a set of *packages* that this package depends on
+# (*) package-DEPEND-DEVEL-RPMS
+# a set of *rpms* that the build will rpm-install before building <package>
+# (*) package-DEPEND-FILES
+# a set of files that the package depends on - and that make needs to know about
+# if this contains RPMS/yumgroups.xml, then the toplevel RPMS's index
+# is refreshed with createrepo prior to running rpmbuild
+# (*) package-RPMFLAGS: Miscellaneous RPM flags
+# (*) package-RPMBUILD: If not rpmbuild - mostly used for sudo'ing rpmbuild
+# (*) package-BUILD-FROM-SRPM: set this to any non-empty value, if your package is able to produce
+# a source rpms by running 'make srpm'
+#
+#################### modules
+# Required information about the various modules (set this in e.g. planetlab-tags.mk)
+#
+# (*) module-SVNPATH
+# the complete path where this module lies;
+# you can specify the trunk or a given tag with this variable
+#
+# OR if the module is managed under cvs (will be obsoleted)
+#
+# (*) module-CVSROOT
+# (*) module-TAG
+#
+#################### automatic variables
+#
+# the build defines some make variables that are extracted from spec files
+# see for example
+# (*) $ make ulogd-pkginfo
+# to see the list f variables attached to a given package
+# (*) $ make kernel-devel-rpminfo
+# to see the list f variables attached to a given rpm
+#
+####################
+
+# exported to spec files as plrelease
+PLANETLAB_RELEASE = 4.2
+
+#
+# Default values
+#
+HOSTARCH := $(shell uname -i)
+DISTRO := $(shell ./getdistro.sh)
+RELEASE := $(shell ./getrelease.sh)
+DISTRONAME := $(shell ./getdistroname.sh)
+RPM-INSTALL-DEVEL := rpm --force -Uvh
+# cannot force rpm -e
+RPM-UNINSTALL-DEVEL := rpm -e