From 6ad700dee392d1c15d8642e04f98eb4607bcb8de Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Wed, 26 Mar 2008 23:21:49 +0000 Subject: [PATCH] * debian/rules and debian/module/rules improvements: - Remove all modified generated files on debian/rules clean. - Depend on $(QUILT_STAMPFN) instead of patch. - Use touch $@ to create stamp files. - Use a stamp file for the module's install target. --- debian/changelog | 6 +++++- debian/module/rules | 20 +++++++++++--------- debian/rules | 10 +++++----- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/debian/changelog b/debian/changelog index 34e8ec45a..5513c6ef1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,7 +8,11 @@ openafs (1.4.7~pre1.dfsg1-1) UNRELEASED; urgency=low - Better fileserver host tracking. - Ubik fixes preventing database truncation on unreliable links. * Update doc-base control file sections for the new categorization. - * Remove all modified generated files on debian/rules clean. + * debian/rules and debian/module/rules improvements: + - Remove all modified generated files on debian/rules clean. + - Depend on $(QUILT_STAMPFN) instead of patch. + - Use touch $@ to create stamp files. + - Use a stamp file for the module's install target. -- Russ Allbery Mon, 03 Mar 2008 18:49:17 -0800 diff --git a/debian/module/rules b/debian/module/rules index 620210da1..99a2da166 100755 --- a/debian/module/rules +++ b/debian/module/rules @@ -59,23 +59,24 @@ configure-stamp: --with-linux-kernel-headers=$(KSRC) --prefix=`pwd`/debian/tmp \ --enable-debug --enable-lwp-debug --enable-kernel-debug \ $(DEBIAN_OPT_FLAGS) $(DEBIAN_KERN_FLAGS) - touch configure-stamp + touch $@ build: build-arch build-indep -build-arch: build-arch-stamp +build-arch: build-stamp build-indep: -build-arch-stamp: configure-stamp +build-stamp: configure-stamp make only_libafs - touch build-arch-stamp + touch $@ clean: dh_testdir dh_testroot - rm -f build-arch-stamp configure-stamp + rm -f install-stamp build-stamp configure-stamp [ ! -f Makefile ] || $(MAKE) distclean dh_clean -install: build-arch-stamp +install: install-stamp +install-stamp: build-stamp dh_testdir dh_testroot dh_clean -k @@ -86,10 +87,11 @@ install: build-arch-stamp -a ! -f $(moduledir)/openafs.mp.o ; then \ ln $(moduledir)/openafs.o $(moduledir)/openafs.mp.o || exit 1 ; \ fi + touch $@ binary: binary-arch binary-indep binary-indep: -binary-arch: install +binary-arch: install-stamp dh_testdir dh_testroot dh_installchangelogs NEWS @@ -108,11 +110,11 @@ binary-arch: install kdist_configure: configure-stamp -kdist_image: build-arch-stamp +kdist_image: build-stamp $(ROOT_CMD) $(MAKE) $(MFLAGS) -f debian/rules binary-arch $(ROOT_CMD) $(MAKE) $(MFLAGS) -f debian/rules clean -kdist: build-arch-stamp +kdist: build-stamp $(ROOT_CMD) $(MAKE) $(MFLAGS) -f debian/rules binary-arch KSRC="$(KSRC)" KMAINT="$(KMAINT)" KEMAIL="$(KEMAIL)" \ sh -v debian/genchanges diff --git a/debian/rules b/debian/rules index 35d713974..07c46e13f 100755 --- a/debian/rules +++ b/debian/rules @@ -71,7 +71,7 @@ get-orig-source: gzip -9 openafs_$(DEBVERS).orig.tar configure: configure-stamp -configure-stamp: patch +configure-stamp: $(QUILT_STAMPFN) @if test x"$(SYS_NAME)" = x"UNKNOWN" ; then exit 1 ; fi dh_testdir sh regen.sh @@ -85,8 +85,8 @@ configure-stamp: patch --enable-bos-new-config \ --enable-debug --enable-lwp-debug \ $(DEBIAN_OPT_FLAGS) $(SYSTEM) - chmod a+x src/libafs/make_kbuild_makefile.pl - touch configure-stamp + chmod a+x src/libafs/make_kbuild_makefile.pl + touch $@ build: build-arch build-indep build-arch: configure-stamp build-stamp @@ -96,7 +96,7 @@ build-stamp: mkdir -p $(CURDIR)/debian/tmp $(MAKE) install_nolibafs DESTDIR=$(CURDIR)/debian/tmp chmod +x debian/afs-rootvol debian/afs-newcell - touch build-stamp + touch $@ clean: unpatch dh_testdir @@ -146,7 +146,7 @@ install-stamp: build-stamp afs-newcell ) \ >debian/openafs-dbserver/usr/share/man/man8/afs-newcell.8 - touch install-stamp + touch $@ # Rules for building the openafs-modules-source package. binary-source: -- 2.39.5