summaryrefslogtreecommitdiff
path: root/dh
Commit message (Collapse)AuthorAge
* Always respect DEB_${flag}_{APPEND,SET} envvars.Modestas Vainius2011-06-19
| | | | | | Do that even when dpkg-buildpackage modifies environment variables. Also document DEB_${flag}_{APPEND,SET} as recommended way to override standard build flags.
* Merge branch 'master' into smarter-targetsJoey Hess2011-06-14
|\ | | | | | | | | Conflicts: dh
| * dpkg-buildflags supportJoey Hess2011-06-14
| | | | | | | | | | | | | | | | * dh_auto_build, dh_auto_configure, dh: Set environment variables listed by dpkg-buildflags --export. Any environment variables that are already set to other values will not be changed. Closes: #544844 * Also, support DEB_BUILD_OPTIONS=noopt, by changing -O2 to -O0.
* | dh: rules function joins array argumentRoger Leigh2011-06-14
| | | | | | | | | | Appending @_ to a string appends the array length rather than the array contents, so join with separating whitespace.
* | remove internal rules:target stuffJoey Hess2011-06-14
| |
* | avoid infinite recursionJoey Hess2011-06-14
| | | | | | | | | | | | | | | | The makefile parse causes dh to be run recursively. Before, dh would just immediatly fail with "unknown sequence", but now it has to run the makefile parse to calculate the sequences, so an earlier bailout is needed.
* | honor empty targetsJoey Hess2011-06-13
| | | | | | | | | | | | An empty explicit target in debian/rules should still be run, to run its dependencies, and allow defining empty targets in order to skip running what's nornally done by a sequence.
* | make standard targets support a v9 featureJoey Hess2011-06-13
| |
* | inline sequences to optimize away recursive calls to make/dh for implicit ↵Joey Hess2011-06-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | targets This assumes that all implicit rules file targets are owned by dh, so it can just assume an implicit target can be optimized away to the commands in its sequence. I suppose this would break: build: dh build install: build dh install binary-%: install my-binary-builder-$@ my-binary-builder-arch: echo "whee! I did something pointlessly complicated with make!" dh binary-arch my-binary-builder-indep: dh binary-indep But I can't imagine anyone does this, at least with a probability of 1 in ten thousand, so hopefully it doesn't break any existing packages. :)
* | improve sequence logicJoey Hess2011-06-13
| | | | | | | | | | | | | | Reorder code so sequences can all be built before addons are loaded, so addon interface can always affect all commands in any sequences. This fixes a bug in the previous patch, where addons could not influence dh_testdir and dh_testroot.
* | doc updates for recent changesJoey Hess2011-06-13
| |
* | move dh_auto_configure out of @bd_minimalJoey Hess2011-06-13
| | | | | | | | | | | | | | | | Callers overriding build targets will need to configure by hand or by calling dh_auto_configure, which should be the status quo. And moving dh_auto_configure to build (and build-arch and build-indep) will not make it run twice AFAICS (except for the edge case when it already did: debian/rules build-arch build-indep)
* | remove calls to build-arch, install-arch, etcJoey Hess2011-06-13
| | | | | | | | | | These calls are no-ops, unless explicit targets exist, and in that case later code rewrites the build and install sequences to include them.
* | minor cleanups, no substantial code changesJoey Hess2011-06-13
| |
* | dh: Use minimal sequences if delegating workRoger Leigh2011-06-13
| | | | | | | | | | | | | | | | | | | | The build and install rules run a minimal sequence if the build-arch or build-indep, or install-arch or install-indep targets, respectively, are present in debian/rules. The purpose is to not do work ahead of time, such as building before the build-arch or build-indep targets are built, which could potentially lead to misbuilds. If the targets are not defined, the sequences may be run directly which is faster due to being able to run the arch and indep commands together.
* | dh: Add sequence dependency supportRoger Leigh2011-06-13
|/ | | | | | | | | Rather than dh sequences containing dependent sequences within themselves, invoke the sub-sequence via debian/rules to permit overriding and customisation using the policy-defined debian/rules targets. Signed-off-by: Roger Leigh <rleigh@debian.org>
* Fix example. Closes: #627534Joey Hess2011-05-21
|
* update for dh_ucfJoey Hess2011-04-25
|
* dh_installgsettings: New command to handle gsettings schema files. Closes: ↵Joey Hess2011-04-01
| | | | #604727
* Fix logging at end of an override target that never actually runs the ↵Joey Hess2011-02-14
| | | | overridden command. Closes: #613418
* Improve handling of logging in override targetsJoey Hess2011-02-10
| | | | | | | | | | | | | | | Changes in 76ef1cbd64829ee4a5156a5fc4b887bcba6b974f broke --remaining-packages in override target. Now all debhelper commands run in the override target are marked as running as part of the override, and when the whole target is run, the log is updated to indicate that commands run during the override have finished. So, inside the override target, --remaining-packages will see the commands run as part of the target as having been run. Outside, if the target fails, dh won't see the commands run it it as having been run. Closes: #612828
* Revert "dh: Add sequence dependencies and satisfy dependencies prior to ↵Joey Hess2010-12-07
| | | | | | | | running sequence" This reverts commit c685546d18606fafee2ad9d3a1cb3d90dd7e9d5e. Caused extra work, and possible FTBFS conditions.
* dh: Add sequence dependencies and satisfy dependencies prior to running sequenceRoger Leigh2010-12-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add %sequence_deps and invoke recursively prior to examining logs and running commands in sequence. The supplied dependencies are equivalent to the following make rules: build: build-arch build-indep install: install-arch install-indep install-arch: build-arch install-indep: build-indep binary: binary-arch binary-indep binary-arch: install-arch binary-indep: install-indep In the existing dh command sequences, the binary sequences all included the corresponding install sequence commands, and in turn the install sequences all included the corresponding build commands. While this works, it has a major deficiency. If the "binary" sequence is run, it will not run the "build" target in debian/rules. This leads to a situation where building with dpkg-buildpackge, which would typically invoke "debian/rules build" followed by "debian/rules binary-arch" and/or "debian/rules debian-indep" may do something different than just invoking "debian/rules binary" or "dh binary" because the build target in debian/rules is effectively bypassed. This applies equally to the -arch and -indep sequence variants. This change eliminates the duplicated sequence commands, and instead invokes the appropriate target(s) in debian/rules, as specified in the %sequence_deps hash. In the common case, the dh sequence by the same name will be called, so the behaviour is identical. However, this provides a means to utilise all of the policy-specified targets, plus the install targets and extend them with additional dependencies and commands, while still allowing full use of dh and giving identical behaviour whether dh or debian/rules targets are used. Signed-off-by: Roger Leigh <rleigh@debian.org>
* dh: Use "architecture independent" rather than "binary independent" for ↵Roger Leigh2010-12-05
| | | | | | consistency Signed-off-by: Roger Leigh <rleigh@debian.org>
* dh: Add support for build-arch, build-indep, install-arch and install-indep ↵Roger Leigh2010-11-22
| | | | | | | | | | | | | | | | | sequences The existing binary-arch and binary-indep sequences depend upon these new sequences, leading to the following possible orders: binary → install → build binary-arch → install-arch → build-arch binary-indep → install-indep → build-indep This is the logical dependency ordering of the sequences; the actual order is of course in reverse so that build is followed by install and binary. Signed-off-by: Roger Leigh <rleigh@debian.org>
* dh: Use $(filter) rather than $(findstring)Roger Leigh2010-11-22
| | | | | | | | | | | | | | $(findstring) can match partial strings and so is unreliable when a package builds several binary packages and one package contains the name of another package within its name. In these cases, $(findstring) can return a partial match which leads to problems (performing unwanted actions which could lead to build failure, for example). $(filter) matches the entire string in the wordlist, so is a reliable replacement for $(findstring). Signed-off-by: Roger Leigh <rleigh@debian.org>
* dh: Inhibit logging for commands run inside override targetsJoey Hess2010-11-02
| | | | | | | Note that only the overridden command is inhibited. I wanted to avoid a behavior change if a rules file runs other debhelper commands inside the target, and relies on the logging preventing them being run later on in the sequence.
* Apply manual pages conventionsDavid Prévot2010-11-02
| | | | | | | | | As advised in man(1), always use: B<bold text> type exactly as shown. I<italic text> replace with appropriate argument. s/debian/Debian/ if needed. s/ / / also. s/perl/Perl/ s/python/Python/ and s/emacs/Emacs/ too.
* add autotools_dev exampleJoey Hess2010-06-06
|
* In v8 mode, dh expects the sequence to run is always its first parameter.Joey Hess2010-05-27
| | | | | | | | | | | | | | This avoids ambiguities when parsing options to be passed on to debhelper commands. (See #570039) In the end, the idea of putting the debhelper command options after -- seemed to need too much knowledge about whether an option like --buildsystem is a dh option or a command option. I did consider making no change.. The ambiguities this eliminates are small. But it seemed worth simplifying dh's option parser, and only about 1/6th of calls to dh in the archive don't put the sequence first already. (Docs have shown that as the right thing to do for some time.)
* In v8 mode, do not allow directly passing unknown options to debhelper ↵Joey Hess2010-05-23
| | | | commands. (Unknown options in DH_OPTIONS still only result in warnings.)
* add semicolon after build targets to avoid implicit target runningJoey Hess2010-04-08
|
* dh: Improve documentation.Joey Hess2010-04-06
| | | | | | | joeyh: debhelper has an undocumented variable with INTERNAL in its name. People keep trying to use it. Why? liw: debhelper is magic. magic is power derived from secrets. secrets are desireable. solution: document it. :)
* dh: Allow --list-addons to be used when not in a source package. Closes: #574351Joey Hess2010-03-31
|
* add parallel optionJoey Hess2010-03-04
|
* dh: Disable option bundling to avoid mis-parsing bundled options such as ↵Joey Hess2010-02-16
| | | | "-Bpython-support". Closes: #570039
* add --builddirectory exampleJoey Hess2010-01-27
|
* Fix typo: s/notmally/normallyJoachim Breitner2010-01-10
|
* solve the dh -Bbuild problemJoey Hess2010-01-04
| | | | | | | | | * Add -O option, which can be used to pass options to commands, ignoring options that they do not support. * dh: Use -O to pass user-specified options to the commands it runs. This solves the problem with passing "-Bbuild" to dh, where commands that do not support -B would see a bogus -u option. Closes: #541773 (It also ensures that the commands dh prints out can really be run.)
* Fix warning about unknown options passed to commands in override targets.Joey Hess2010-01-04
| | | | | | | | | dh used DH_OVERRIDE_UNKNOWN_OPTIONS, which was too broad as it affected commands run via override targets and caused there to be no warning about unknown options. Now unknown options are only ignored when parsing DH_INTERNAL_OPTIONS and dh's own options.
* simplifyJoey Hess2009-12-30
|
* whitespaceJoey Hess2009-12-30
|
* Do not call make for noop overrides.Modestas Vainius2009-12-30
| | | | | 1) Detect if target is noop when parsing debian/rules. 2) If override target is noop, do not call make for it.
* dh(1): Add an example of using an override target to avoid dh running ↵Joey Hess2009-12-14
| | | | several commands. Closes: #560600
* dh(1): Minor rewording of documentation of override commands. Closes: #560421Joey Hess2009-12-14
|
* dh: Document --no-act. Closes: #557505Joey Hess2009-11-22
|
* implement the other option: parallel enabled implicitly by DEB_BUILD_OPTIONSJoey Hess2009-10-29
| | | | | I renamed --parallel to --max-parallel to clarify that it doesn't enable parallelism, but only controls how much of it is allowed.
* remove implicit --parallel setting by dhJoey Hess2009-10-28
|
* logic simplificationJoey Hess2009-10-28
|
* reduce amount of MAKEFLAGS cleaningJoey Hess2009-10-28
| | | | | | | | | | | Now clean_jobserver_makeflags will only remove --jobserver settings from MAKEFLAGS. This is simpler and easier to understand than the old behavior, which, if there was no --jobserver, removed all -j and --jobs, while leaving those when removing --jobserver. This relies on -j options passed to make overriding -j settings in MAKEFLAGS. So we don't need to clean those out, we can just override them.