]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh
Fix typo in French translation, about debian/package.README.Debian files.
[debhelper.git] / dh
diff --git a/dh b/dh
index a116e3a0e35dccefa898d018d07da5972c367a8d..289e7fc253fc9b3e3f37a484c4127f18c53f97b1 100755 (executable)
--- a/dh
+++ b/dh
@@ -91,6 +91,10 @@ Insert I<new_command> in sequences before I<existing_command>.
 
 Insert I<new_command> in sequences after I<existing_command>.
 
+=item Debian::Debhelper::Dh_Lib::remove_command(existing_command)
+
+Remove I<existing_command> from the list of commands to run.
+
 =back
 
 =cut
@@ -138,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
@@ -161,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_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
@@ -278,7 +293,7 @@ $sequences{binary} = [@{$sequences{install}}, qw{
 $sequences{'binary-arch'} = [@{$sequences{binary}}];
 
 # --with python-support is enabled by default, at least for now
-push @{$dh{WITH}}, "python-support";
+unshift @{$dh{WITH}}, "python-support";
 
 # sequence addon interface
 sub _insert {
@@ -308,6 +323,13 @@ sub insert_before {
 sub insert_after {
        _insert(1, @_);
 }
+sub remove_command {
+       my $command=shift;
+       foreach my $sequence (keys %sequences) {
+               $sequences{$sequence}=[grep { $_ ne $command } @{$sequences{$sequence}}];
+       }
+       
+}
 foreach my $addon (@{$dh{WITH}}) {
        my $mod="Debian::Debhelper::Sequence::$addon";
        $mod=~s/-/_/g;
@@ -350,11 +372,11 @@ elsif ($sequence eq 'binary-indep') {
 while (@ARGV_orig) {
        my $opt=shift @ARGV_orig;
        next if $opt eq $sequence;
-       if ($opt =~ /^--?(after|until|before)$/) {
+       if ($opt =~ /^--?(after|until|before|with)$/) {
                shift @ARGV_orig;
                next;
        }
-       elsif ($opt =~ /^--?(no-act|remaining|(after|until|before)=)/) {
+       elsif ($opt =~ /^--?(no-act|remaining|(after|until|before|with)=)/) {
                next;
        }
        push @options, $opt;