Commands in the B<build-indep>, B<install-indep> and B<binary-indep>
sequences are passed the B<-i> option to ensure they only work on
-binary independent packages, and commands in the B<build-arch>,
+architecture independent packages, and commands in the B<build-arch>,
B<install-arch> and B<binary-arch> sequences are passed the B<-a>
option to ensure they only work on architecture dependent packages.
endif
Finally, remember that you are not limited to using override targets in the
-rules file when using B<dh>. You can also explicitly define any of the regular
+rules file when using B<dh>. You can also explicitly define the regular
rules file targets when it makes sense to do so. A common reason to do this
-is if your package needs different B<build-arch> and B<build-indep> targets. For
-example, a package with a long document build process can put it in
-B<build-indep> to avoid build daemons redundantly building the documentation.
+is if your package needs different B<build-arch> and B<build-indep> targets.
+For example, a package with a long document build process can put it in
+B<build-indep>.
#!/usr/bin/make -f
%:
dh $@
+ binary: binary-arch binary-indep ;
+ binary-arch:: build-arch
+ binary-indep:: build-indep
build: build-arch build-indep ;
build-indep:
$(MAKE) docs
dh_installudev
dh_installwm
dh_installxfonts
+ dh_installgsettings
dh_bugfiles
+ dh_ucf
dh_lintian
dh_gconf
dh_icons
# This passes the options through to commands called
# inside the target.
$ENV{DH_INTERNAL_OPTIONS}=join("\x1e", @options);
- # Prevent commands called inside the target from
- # logging.
- $ENV{DH_INHIBIT_LOG}=$command;
+ $ENV{DH_INTERNAL_OVERRIDE}=$command;
$command="debian/rules";
@options="override_".$override_command;
}
else {
print " ", "# Skipping ", $override_command, " - empty override", "\n";
}
-
+
if (! $dh{NO_ACT}) {
if (defined $command) {
my $ret=system($command, @options);
+
if ($ret >> 8 != 0) {
exit $ret >> 8;
}
}
if (defined $override_command) {
- delete $ENV{DH_INTERNAL_OPTIONS};
- delete $ENV{DH_INHIBIT_LOG};
# Update log for overridden command now that it has
# finished successfully.
# (But avoid logging for dh_clean since it removes
my %packages=map { $_ => 1 } @packages;
map { delete $packages{$_} } @exclude;
write_log($override_command, keys %packages);
+ commit_override_log(keys %packages);
}
+
+ delete $ENV{DH_INTERNAL_OPTIONS};
+ delete $ENV{DH_INTERNAL_OVERRIDE};
}
}
}