summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorThierry Reding <thierry@gilfi.de>2006-10-15 14:41:12 +0000
committerThierry Reding <thierry@gilfi.de>2006-10-15 14:41:12 +0000
commit87744f786b52b0d238efcae7f481042f219a22c9 (patch)
treebbaee7f8da13345e02f72d2a25a9bb1a86683ca5 /debian/rules
parent5bcfa4c85908474774b8537f379504fb8ad9a598 (diff)
Use STAMP_DIR consistently throughout the debian/rules file.
Make the BUILD_STAMPS targets depend on patch so that when they are built separately the patches will also be applied. Thanks to Michel Dänzer for catching this. Make symlinking the source tree idempotent by adding the -f option to cp. Thanks again Michel Dänzer.
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules23
1 files changed, 13 insertions, 10 deletions
diff --git a/debian/rules b/debian/rules
index 269e724bcee..b3b1e133ba4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,7 +9,9 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-QUILT_STAMPFN ?= debian/stamp/patch
+STAMP_DIR = debian/stamp
+
+QUILT_STAMPFN = $(STAMP_DIR)/patch
include /usr/share/quilt/quilt.make
CFLAGS = -Wall -g
@@ -28,8 +30,6 @@ DEB_BUILD_DIR ?= $(CURDIR)/obj-$(DEB_BUILD_GNU_TYPE)
export DEB_BUILD_ARCH
-STAMPDIR = debian/stamp
-
# build the following configurations
CONFIGS = debian \
debian-arch \
@@ -40,19 +40,22 @@ CONFIGS = debian \
debian-osmesa32-static \
debian-static
-STAMP = $(STAMPDIR)/$(DEB_BUILD_GNU_TYPE)
+STAMP = $(STAMP_DIR)/$(DEB_BUILD_GNU_TYPE)
BUILD_STAMPS = $(addprefix $(STAMP)-build-, $(CONFIGS))
INSTALL_STAMPS = $(addprefix $(STAMP)-install-, $(CONFIGS))
-debian/stamp:
+$(STAMP_DIR):
dh_testdir
- mkdir -p debian/stamp
+ mkdir -p $@
+
+$(QUILT_STAMPFN): $(STAMP_DIR)
-build: debian/stamp patch $(BUILD_STAMPS)
-$(STAMP)-build-%:
+build: $(BUILD_STAMPS)
+$(STAMP)-build-%: patch
dh_testdir
mkdir -p $(DEB_BUILD_DIR)/$*
- find $(CURDIR)/* -maxdepth 0 -not -path '$(DEB_BUILD_DIR)*' | xargs cp -rl -t $(DEB_BUILD_DIR)/$*
+ find $(CURDIR)/* -maxdepth 0 -not -path '$(DEB_BUILD_DIR)*' | \
+ xargs cp -rlf -t $(DEB_BUILD_DIR)/$*
ln -sf $* $(DEB_BUILD_DIR)/$*/configs/current
cd $(DEB_BUILD_DIR)/$* && $(MAKE)
touch $@
@@ -74,7 +77,7 @@ $(STAMP)-install-%: $(STAMP)-build-%
clean: unpatch
dh_testdir
dh_testroot
- rm -rf $(DEB_BUILD_DIR) debian/stamp
+ rm -rf $(DEB_BUILD_DIR) $(STAMP_DIR)
dh_clean --exclude ./Makefile.orig --exclude configs/CVS/Root.bak
# Build architecture-independent files here.