summaryrefslogtreecommitdiff
path: root/Debian/Debhelper/Buildsystem.pm
Commit message (Collapse)AuthorAge
* remove now-unnecessary cachingJoey Hess2010-05-09
|
* Fix typo in call to abs2rel in --builddir sanitize code. Closes: #567737Joey Hess2010-01-30
|
* use foreach instead of for when looping thru arrayJoey Hess2009-11-19
|
* comment mungingJoey Hess2009-11-18
|
* Improve build system auto-selection processModestas Vainius2009-11-18
| | | | | | | | | | | | | | | This patch alters semantics of check_auto_buildable() a bit. Now it can also indicate if the source has already been partitially built with the build system and if so, such build system may be auto-selected over a less specific its parent (in the inheritance tree) even if the latter is earlier in the @BUILDSYSTEMS array. However, this still leaves a requirement that a derivative build system must not do anything that may break packages of the parent build system. Otherwise, introduction of a new derivative build system might break packages which already had that build system implemented via overrides... Signed-off-by: Modestas Vainius <modestas@vainius.eu>
* support unlimited parallel jobsJoey Hess2009-10-29
| | | | | | | | dpkg-buildpackage -j sets DEB_BUILD_OPTIONS=parallel=-1. Policy does not cover this but the intent is to allow unlimited parallel jobs. Also, there is no longer any way for parallel to be set to undef, so remove code to handle that.
* Support parallel building in makefile buildsystemModestas Vainius2009-10-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) Add routine to Dh_Lib (used by dh and makefile.pm) which is capable of detecting make jobserver and job control options from the MAKEFLAGS environment variable. It also generates and returns a clean up MAKEFLAGS from these options. 2) Add --parallel option to build system framework which allows source packages to specify that they support parallel building. Optional value for this option is the number of maximum parallel process to allow. However, the actual number of parallel process (if any) for the specific build is determined from DEB_BUILD_OPTIONS env variable as specified by Debian Policy. By default (no --parallel option) parallel is neither enabled nor disabled (depends on the external environment). However, dh may pass --parallel to dh_auto_* implicitly in case 4) described below. 3) Add parallel support for makefile buildsystem. This implementation forcefully starts a new make job server (or disables parallel) for the number of process requested. If --parallel was not passed to the build system at all, the build system will only clean up MAKEFLAGS from stale jobserver options to avoid pointless make warnings. 4) If dh detects that it is being run by dpkg-buildpackage -jX and it is NOT run with "+" prefix from debian/rules (i.e. jobserver is not reachable), it enables --parallel implicitly. This closes: #532805. Signed-off-by: Modestas Vainius <modestas@vainius.eu>
* rmdir_builddir(): use shell commands rather than perl equivalent.Modestas Vainius2009-06-30
| | | | | | | | Pass --ignore-fail-on-non-empty option to shell rmddir and later check with -d if the exists to get the same effect. Also drop no act check from rmdir_builddir(), doit() does it for us now. Signed-off-by: Modestas Vainius <modestas@vainius.eu>
* remove enforce_out_of_source_buildingJoey Hess2009-06-29
| | | | | It was only used by the test suite, and while symetrical I don't feel that justifies keeping dead code.
* layoutJoey Hess2009-06-29
|
* More verbose rmdir_builddir() and more its testsModestas Vainius2009-06-30
| | | | Signed-off-by: Modestas Vainius <modestas@vainius.eu>
* Support absolute paths for builddir.Modestas Vainius2009-06-30
| | | | | | | | If build directory is absolute or ../ path, _rel2rel falls back to absolute paths. Try even harder to convert supplied builddir to relative in _set_builddir(). Signed-off-by: Modestas Vainius <modestas@vainius.eu>
* Rename _canonpath to canonpath.Modestas Vainius2009-06-30
| | | | Signed-off-by: Modestas Vainius <modestas@vainius.eu>
* Rename enforce_out_of_source_building() to prefer_Modestas Vainius2009-06-30
| | | | | | | | Also add enforce_out_of_source_building() for clarity which does not take any parameters. Now both have a clear name and no confusing parameter combinations. Signed-off-by: Modestas Vainius <modestas@vainius.eu>
* misc minor changesJoey Hess2009-06-29
|
* Less code in the build system classes to call enforce_out_of_source_building().Modestas Vainius2009-06-18
| | | | Signed-off-by: Modestas Vainius <modestas@vainius.eu>
* Some cosmetic changes in the comments and strings.Modestas Vainius2009-06-17
| | | | | | | | * buildsystem -> build system * dh_auto build system -> debhelper build system * plugin -> class * a few rewording changes in the comments. * Enhance python_distutils::DESCRIPTION().
* First letter case fixes (should be lowercase) in error/warning messages.Modestas Vainius2009-06-15
|
* Add "only if empty" flag to rmdir_builddir().Modestas Vainius2009-06-15
| | | | Signed-off-by: Modestas Vainius <modestas@vainius.eu>
* Fix typo: missing $this.Modestas Vainius2009-06-15
| | | | Signed-off-by: Modestas Vainius <modestas@vainius.eu>
* Use another root directory in _rel2rel.Modestas Vainius2009-06-13
| | | | | | | Previous one caused test "_rel2rel no4" to fail. Also add a new test for _canonpath and two new tests for _rel2rel (related to "." handling). Signed-off-by: Modestas Vainius <modestas@vainius.eu>
* Drop special handling for build directory ./path.Modestas Vainius2009-06-13
| | | | | | | | | Now build directory is always relative to the top directory (including default build directory) regardless what source directory is. However, if the build directory is not specified, it defaults to the source directory (aka in source building). Signed-off-by: Modestas Vainius <modestas@vainius.eu>
* Get rid of is_buildable and build_step flags. Broken by design.Modestas Vainius2009-06-11
| | | | | | | | | | | | | | | | | | * Auto-setting is_buildable flag in base constructor was pointless and broken by design because: - is_buildable = check_auto_buildable() used to be called *before* constructor of the derivative class could call enforce_* methods. The result of check_auto_buildable() might change after calling enforce_* methods (in case check_auto_buildable() use get_buildpath() tests). - it isn't used widely. Refactor those a few places. * Due to above, 'build_step' does not need to be passed to the Buildsystem anymore. Remove it from code. * As a result of is_buidable removal, move warning of enforce_in_source_building() to pre_building_step(). It caused unnecessary noise when the object was constructed during test. It belongs to pre_building_step stage anyway. Signed-off-by: Modestas Vainius <modestas@vainius.eu>
* Refactor build directory setting into separate method and solve a few bugs.Modestas Vainius2009-06-11
| | | | | | | | | | | | | * Move setting of new build directory from constructor to _set_builddir() method including detection if directory (current or source) it should be relative to. * Even if a new build directory was specified, detect if it matches the source directory and unset it in such a case. * Use _set_builddir() in enforce_out_of_source_tree() methods. Previous implementation didn't handle default build directory properly (i.e. relativeness to current or source directory). Signed-off-by: Modestas Vainius <modestas@vainius.eu>
* Remove empty build directory parent dirs (up to source directory) too.Modestas Vainius2009-06-11
| | | | | | | When rmdir_building(), if build directory has 2 or more levels, empty parent dirs should also be deleted until source directory level. Signed-off-by: Modestas Vainius <modestas@vainius.eu>
* Rename {pre,post}_step to {pre,post}_building_step.Modestas Vainius2009-06-11
| | | | Signed-off-by: Modestas Vainius <modestas@vainius.eu>
* Implement source directory switching support (Closes: #530597).Modestas Vainius2009-06-09
| | | | | | | | * New optional option --sourcedirectory/-d. * New Buildsystem API methods for getting source directory/path (since sourcedir may no longer be topdir), source 2 build directory convertions, doit_in_sourcedir() etc. * clean_builddir() -> rmdir_builddir() rename.
* Use term "out of source" rather than "outside source".Modestas Vainius2009-06-08
| | | | | | * "out of source" or "out of source tree" seems to be more popular term to describe building in the builddir. * Avoid using hyphens in both "out of source" and "in source" terms.
* Use the term "build step" instead of "build action" everywhere in the source.Modestas Vainius2009-06-08
| | | | | I'm going to use this new term in documentation. I have never liked "action" in this context, just couldn't think of anything better.
* unimportant code changesJoey Hess2009-04-20
|
* rename Dh_Buildsystem to BuildsystemJoey Hess2009-04-20
This way the root of the class hierarchy has the same name as the directory holding the classes.