* Build dummy packages.
* Make sure that the build uses an up to date control file. r3735: waldi | 2005-08-08 08:07:55 +0000 * debian/bin/gencontrol.py: Write informations about dummy packages into Makefile.inc. r3737: waldi | 2005-08-08 12:41:11 +0000 * debian/rules - Add debian/bin/gencontrol.py to prequisites of debian/control. - Add debian/control to prequisites of build to avoid builds with an out of date control file. - Call dummy binary targets. svn path=/trunk/kernel/source/linux-2.6/; revision=3738
This commit is contained in:
parent
5fa8e661d1
commit
2194b95339
|
@ -242,4 +242,16 @@ build-$(subarch)-%: $(kdir) config.%
|
|||
cp config.$* $@/.config; \
|
||||
fi
|
||||
|
||||
binary-dummy:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_installchangelogs -p$(PACKAGE)
|
||||
dh_installdocs -p$(PACKAGE)
|
||||
dh_compress -p$(PACKAGE)
|
||||
dh_fixperms -p$(PACKAGE)
|
||||
dh_installdeb -p$(PACKAGE)
|
||||
dh_gencontrol -p$(PACKAGE)
|
||||
dh_md5sums -p$(PACKAGE)
|
||||
dh_builddeb -p$(PACKAGE)
|
||||
|
||||
.PHONY: build unpack binary-indep binary-arch binary
|
||||
|
|
|
@ -260,6 +260,17 @@ def vars_changelog(vars, changelog):
|
|||
def write_control(list):
|
||||
write_rfc822(file("debian/control", 'w'), list)
|
||||
|
||||
def write_makefile(list):
|
||||
f = file("debian/Makefile.inc", 'w')
|
||||
for i in list:
|
||||
f.write("%s\n" % i[0])
|
||||
if i[1] is not None:
|
||||
list = i[1]
|
||||
if isinstance(list, basestring):
|
||||
list = list.split('\n')
|
||||
for j in list:
|
||||
f.write("\t%s\n" % j)
|
||||
|
||||
def write_rfc822(f, list):
|
||||
for i in list:
|
||||
for j in i.iteritems():
|
||||
|
@ -290,6 +301,7 @@ if __name__ == '__main__':
|
|||
arches[arch] = t1
|
||||
|
||||
packages = []
|
||||
makefile = []
|
||||
|
||||
source = read_template("source")
|
||||
packages.append(process_entry(source[0], vars))
|
||||
|
@ -318,16 +330,24 @@ if __name__ == '__main__':
|
|||
arch_vars = vars.copy()
|
||||
arch_vars['arch'] = arch
|
||||
arch_vars.update(config_arch(arch).defaults())
|
||||
|
||||
i2 = arches[arch].keys()
|
||||
i2.sort()
|
||||
for subarch in i2:
|
||||
subarch_config = config_subarch(arch, subarch)
|
||||
subarch_vars = arch_vars.copy()
|
||||
subarch_vars.update(subarch_config.defaults())
|
||||
|
||||
if subarch is not None:
|
||||
subarch_text = subarch
|
||||
subarch_vars['subarch'] = '%s-' % subarch
|
||||
else:
|
||||
subarch_text = 'none'
|
||||
subarch_vars['subarch'] = ''
|
||||
|
||||
for i in ('binary', 'build', 'unpack'):
|
||||
makefile.append(("%s-%s:: %s-%s-%s" % (i, arch, i, arch, subarch_text), None))
|
||||
|
||||
i3 = arches[arch][subarch].keys()
|
||||
i3.sort()
|
||||
for flavour in i3:
|
||||
|
@ -341,10 +361,21 @@ if __name__ == '__main__':
|
|||
if not flavour_vars.has_key('longclass'):
|
||||
flavour_vars['longclass'] = flavour_vars['class']
|
||||
|
||||
packages.extend(process_real_packages(image_latest, flavour_vars))
|
||||
dummy_packages = []
|
||||
dummy_packages.extend(process_real_packages(image_latest, flavour_vars))
|
||||
packages.append(process_real_image(image[0], flavour_vars))
|
||||
packages.append(process_real_package(headers_latest[0], flavour_vars))
|
||||
dummy_packages.append(process_real_package(headers_latest[0], flavour_vars))
|
||||
packages.append(process_real_package(headers[0], flavour_vars))
|
||||
packages.extend(dummy_packages)
|
||||
|
||||
for i in ('binary', 'build', 'unpack'):
|
||||
makefile.append(("%s-%s-%s:: %s-%s-%s-%s" % (i, arch, subarch_text, i, arch, subarch_text, flavour), None))
|
||||
rule = []
|
||||
for i in dummy_packages:
|
||||
rule.append("$(MAKE) -f debian/Makefile binary-dummy PACKAGE=%s" % i['Package'])
|
||||
makefile.append(("binary-%s-%s-%s:" % (arch, subarch_text, flavour), rule))
|
||||
|
||||
write_control(packages)
|
||||
write_makefile(makefile)
|
||||
|
||||
|
||||
|
|
|
@ -7,7 +7,9 @@ abiname := 1
|
|||
# Generally nothing needs to be modified below this line
|
||||
#
|
||||
SHELL := sh -e
|
||||
karch := $(shell dpkg-architecture -qDEB_HOST_ARCH)
|
||||
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
|
||||
DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
|
||||
karch := $(DEB_BUILD_ARCH)
|
||||
srcver := $(shell dpkg-parsechangelog | awk '/^Version:/ {print $$2}')
|
||||
version := $(word 1,$(subst -, ,$(srcver)))
|
||||
ltver := $(word 2,$(subst -, ,$(srcver)))
|
||||
|
@ -180,7 +182,7 @@ debian/unpack-stamp: debian/patch-stamp
|
|||
ln -s $$(command -v touch) debian/bin/touch.orig
|
||||
touch debian/unpack-stamp
|
||||
|
||||
build: debian/build-stamp
|
||||
build: debian/control debian/build-stamp
|
||||
debian/build-stamp: debian/unpack-stamp
|
||||
dh_testdir
|
||||
cd debian; \
|
||||
|
@ -218,6 +220,7 @@ binary-arch: build
|
|||
for i in $(subarchs); do \
|
||||
$(MAKE) subarch=$${i} binary; \
|
||||
done
|
||||
$(MAKE) -f debian/Makefile.inc binary-$(DEB_BUILD_ARCH)
|
||||
|
||||
binary: binary-indep binary-arch
|
||||
|
||||
|
@ -225,7 +228,7 @@ binary: binary-indep binary-arch
|
|||
# Makes the master debian/control file by substituting
|
||||
# variable values into the template.
|
||||
#
|
||||
debian/control: debian/changelog $(wildcard debian/templates/control.*.in)
|
||||
debian/control: debian/bin/gencontrol.py debian/changelog $(wildcard debian/templates/control.*.in)
|
||||
debian/bin/gencontrol.py
|
||||
@echo
|
||||
@echo This target is made to fail intentionally, to make sure
|
||||
|
|
Loading…
Reference in New Issue