debian/rules

- Cleanup variables.
- Remove usage of directory creations rules.

svn path=/dists/trunk/linux-2.6/; revision=14008
This commit is contained in:
Bastian Blank 2009-07-25 10:05:31 +00:00
parent 03d055abfc
commit 77e9d16753
1 changed files with 16 additions and 20 deletions

36
debian/rules vendored
View File

@ -1,24 +1,23 @@
#!/usr/bin/make -f
#
# Generally nothing needs to be modified below this line
#
SHELL := sh -e
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
SOURCE := $(shell dpkg-parsechangelog | sed -ne 's,^Source: *\(.*\)$$,\1,p')
VERSION_DEBIAN := $(shell dpkg-parsechangelog | sed -ne 's,^Version: *\(.*\)$$,\1,p')
VERSION := $(shell echo "$(VERSION_DEBIAN)" | sed -e 's,-[^-]*$$,,')
VERSION_DEBIAN_BINNMU := $(shell echo "$(VERSION_DEBIAN)" | sed -ne 's,.*\+b\(.*\)$$,\1,p')
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
SOURCE := $(shell dpkg-parsechangelog | sed -ne 's,^Source: *\(.*\)$$,\1,p')
VERSION := $(shell dpkg-parsechangelog | sed -ne 's,^Version: *\(.*\)$$,\1,p')
VERSION_UPSTREAM := $(shell echo "$(VERSION)" | sed -e 's,-[^-]*$$,,')
VERSION_BINNMU := $(shell echo "$(VERSION)" | sed -ne 's,.*\+b\(.*\)$$,\1,p')
include debian/rules.defs
stamp = [ -d $(dir $@) ] || mkdir $(dir $@); touch $@
source: debian/control $(STAMPS_DIR)/source-base
$(STAMPS_DIR)/source-base: $(BUILD_DIR) $(STAMPS_DIR)
$(STAMPS_DIR)/source-base:
dh_testdir
$(MAKE) -f debian/rules.gen source_$(DEB_HOST_ARCH)
touch $@
@$(stamp)
source-all: debian/control $(BUILD_DIR) $(STAMPS_DIR)
source-all: debian/control
dh_testdir
$(MAKE) -f debian/rules.gen source
@ -26,19 +25,16 @@ setup: debian/control $(STAMPS_DIR)/setup-base
$(STAMPS_DIR)/setup-base: $(STAMPS_DIR)/source-base
dh_testdir
$(MAKE) -f debian/rules.gen setup_$(DEB_HOST_ARCH)
touch $@
@$(stamp)
build: debian/control $(STAMPS_DIR)/build-base
$(STAMPS_DIR)/build-base: $(STAMPS_DIR)/setup-base
dh_testdir
$(MAKE) -f debian/rules.gen build_$(DEB_HOST_ARCH)
touch $@
@$(stamp)
$(BUILD_DIR) $(STAMPS_DIR):
@[ -d $@ ] || mkdir $@
DIR_ORIG = ../orig/$(SOURCE)-$(VERSION)
TAR_ORIG_NAME = $(SOURCE)_$(VERSION).orig.tar.gz
DIR_ORIG = ../orig/$(SOURCE)-$(VERSION_UPSTREAM)
TAR_ORIG_NAME = $(SOURCE)_$(VERSION_UPSTREAM).orig.tar.gz
TAR_ORIG = $(firstword $(wildcard ../$(TAR_ORIG_NAME)) $(wildcard ../orig/$(TAR_ORIG_NAME)))
orig: $(DIR_ORIG)
@ -76,7 +72,7 @@ CONTROL_FILES += debian/config/defines $(wildcard debian/config/*/defines) $(wil
debian/control debian/rules.gen: debian/bin/gencontrol.py $(CONTROL_FILES)
ifeq ($(wildcard debian/control.md5sum),)
$(MAKE) -f debian/rules debian/control-real
else ifeq ($(VERSION_DEBIAN_BINNMU),)
else ifeq ($(VERSION_BINNMU),)
md5sum --check debian/control.md5sum --status || \
$(MAKE) -f debian/rules debian/control-real
else