summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-06-15 13:31:20 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-06-15 13:31:20 -0400
commit1aa682895e9ffafdfb00154a674d376b4c431945 (patch)
tree9049e7c077f9732bb781a5d50105e3dd79926350
parent98f41f9a450d7d0e441e266a8172a53200e4a8e6 (diff)
downloaddebhelper-1aa682895e9ffafdfb00154a674d376b4c431945.tar.gz
Add stamp files to example rules targets. Closes: #486327
-rw-r--r--debian/changelog1
-rwxr-xr-xdh23
-rwxr-xr-xexamples/rules.simple8
3 files changed, 24 insertions, 8 deletions
diff --git a/debian/changelog b/debian/changelog
index 47045e7e..fb064a24 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
debhelper (7.0.11) UNRELEASED; urgency=low
* dh: Man page fix. Closes: #485116
+ * Add stamp files to example rules targets. Closes: #486327
-- Joey Hess <joeyh@debian.org> Sun, 08 Jun 2008 12:21:48 -0400
diff --git a/dh b/dh
index a07cd6b3..7a87e1e6 100755
--- a/dh
+++ b/dh
@@ -142,14 +142,17 @@ This is a simple rules file that is a good starting place for customisation.
#!/usr/bin/make -f
- build:
+ build: build-stamp
dh build
+ touch build-stamp
clean:
dh clean
- install: build
+ install: build install-stamp
+ install-stamp:
dh install
+ touch install-stamp
binary-arch: install
dh binary-arch
@@ -165,40 +168,48 @@ and then finished up by running the rest of the sequence. You could also
run ./configure by hand, instead of bothering with using dh_auto_configure.
And if necessary, you can add commands to run automake, etc here too.
- build:
+ build: build-stamp
+ build-stamp:
dh build --before configure
dh_auto_configure -- --kitchen-sink=yes
dh build --after configure
+ touch build-stamp
Here's how to skip two automated in a row (configure and build), and
instead run the commands by hand.
- build:
+ build: build-stamp
+ build-stamp:
dh build --before configure
./mondoconfig
make universe-explode-in-delight
dh build --after build
+ touch build-stamp
Another common case is wanting to run some code manually after a particular
debhelper command is run.
- install: build
+ install: build install-stamp
+ install-stamp:
dh install --until dh_fixperms
# dh_fixperms has run, now override it for one program
chmod 4755 debian/foo/usr/bin/foo
# and continue
dh install --after dh_fixperms
+ touch install-stamp
It's also fine to run debhelper commands early. Just make sure that at
least dh_prep is run from the sequence first, and be sure to use the
B<--remaining> option to ensure that commands that normally come before
those in the sequence are still run.
- install:
+ install: build install-stamp
+ install-stamp:
dh install --until dh_prep
dh_installdocs README TODO
dh_installchangelogs Changes
dh install --remaining
+ touch install-stamp
binary-arch: install
dh_strip -X foo
diff --git a/examples/rules.simple b/examples/rules.simple
index 21e1c081..ab49db98 100755
--- a/examples/rules.simple
+++ b/examples/rules.simple
@@ -1,13 +1,17 @@
#!/usr/bin/make -f
-build:
+build: build-stamp
+build-stamp:
dh build
+ touch build-stamp
clean:
dh clean
-install: build
+install: build install-stamp
+install-stamp:
dh install
+ touch install-stamp
binary-arch: install
dh binary-arch