Modestas Vainius [Mon, 29 Jun 2009 16:11:42 +0000 (19:11 +0300)]
Rename enforce_out_of_source_building() to prefer_
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.
Joey Hess [Mon, 29 Jun 2009 01:47:52 +0000 (21:47 -0400)]
clean up --sourcedir/--sourcedirectory conflict
* Move two move command-specific options to only be accepted by the commands
that use them. The options are:
--sourcedir, --destdir
* If any third-party debhelper commands use either of the above options,
they will be broken, and need to be changed to pass options to init().
This was done because of a conflict with the --sourcedirectory options
used by dh_auto_*. I originally wanted to make dh_auto_* and dh_install
both use --sourcedir, but that didn't work out.
Joey Hess [Fri, 26 Jun 2009 13:01:20 +0000 (09:01 -0400)]
dh_installinfo: No longer inserts install-info calls into maintainer scripts
as that is now triggerized. Adds a dependency via misc:Depends to handle
partial upgrades. Note that while dh_installinfo already required that info
files had a INFO-DIR-SECTION, the new system also requires they have
START-INFO-DIR-ENTRY and END-INFO-DIR-ENTRY for proper registration. I
assume there will be some mass bug filing for any packages that do not have
that. Closes: #528864
Modestas Vainius [Sun, 21 Jun 2009 19:35:30 +0000 (22:35 +0300)]
Terminology change.
I previously used "built-in debhelper build system" or "default debhelper build
system" for those shipped with debhelper. Now it is "standard debhelper build
system".
Modestas Vainius [Wed, 17 Jun 2009 23:19:40 +0000 (02:19 +0300)]
Generate and install dh_auto docs when building debhelper.
Since dh_auto_* PODs and dh_auto.pod contain placeholders and final versions
are generated with the use of podselect, they are not directly translatable.
However, the final postprocessed PODs (with man/dh_auto_pod) are translatable.
So these temporary PODs are written to the man/ subdir and they could be added
to po4a as needed. However, I do not add those PODs for translation in this
commit (neither previous versions of dh_auto_* were there).
Modestas Vainius [Wed, 17 Jun 2009 23:11:45 +0000 (02:11 +0300)]
Update dh_auto documentation.
* dh_auto.pod -> dh_auto.7 - contains general information about dh_auto,
its features, build systems supported by default (the latter is injected by
man/dh_auto_pod script from Debian/Debhelper/Buildsystem/*.pm PODs via
placeholders (#PLACEHOLDER#))
* POD in Debian/Debhelper/Buildsystem/*.pm -> dh_auto_<buildsystem>.7 - build
system specific information.
* dh_auto_* -> dh_auto_*.1 - relatively shorty description of the specific
dh_auto_* program and build system specific info for that step injected from
Debian/Debhelper/Buildsystem/*.pm with man/dh_auto_pod script.
* man/dh_auto_pod $step - generates full dh_auto_$step POD (replaces
placeholders).
* man/dh_auto_pod - generates full dh_auto.pod (replaces placeholders).
Modestas Vainius [Wed, 17 Jun 2009 22:16:33 +0000 (01:16 +0300)]
Do not explicitly repass env. variables {C,CXX,LD}FLAGS to cmake.
Apparently, cmake itself reads values of those environment variables and uses
them accordingly. There is no need to repass them via -DCMAKE_{C,CXX,LD}_FLAGS.
Modestas Vainius [Mon, 15 Jun 2009 13:20:11 +0000 (16:20 +0300)]
Some cosmetic changes in the comments and strings.
* buildsystem -> build system
* dh_auto build system -> debhelper build system
* plugin -> class
* a few rewording changes in the comments.
* Enhance python_distutils::DESCRIPTION().
Modestas Vainius [Tue, 16 Jun 2009 00:44:43 +0000 (03:44 +0300)]
Add --help-buildsystem option to dh_auto.
Displays POD of the (auto)selected build system. It should be useful to get
more information about third party build systems. Implementation uses
perldoc whenever possible.
Modestas Vainius [Mon, 15 Jun 2009 12:58:31 +0000 (15:58 +0300)]
Fix build directory handling in python_distutils build system.
* Apparently, Distutils does out of source tree building by default.
* Default build directory is "$srcdir/build".
* --build-base command line option is ineffective (some even fail)
unless it is passed to the "build" command. However, if build-base is set in
the config file, all setup.py commands use it (build, install and clean).
That's a big flaw in Distutils design but it has been like this for a long
time. Therefore write a custom distutils cfg file in the build directory
to make build-base work. The best choice for config file path is
$HOME/.pydistutils.cfg (one of the paths Distutils reads) and setting $HOME
to the build directory.
Modestas Vainius [Fri, 12 Jun 2009 17:05:20 +0000 (20:05 +0300)]
Enforce out of source building in soft mode for cmake.
Technically, cmake supports in source builds, they are simply not
recommended. However, if the user insists and explicitly specifies
the build directory that is equal to the source directory, allow
this (aka soft mode).
Modestas Vainius [Fri, 12 Jun 2009 16:57:35 +0000 (19:57 +0300)]
Drop special handling for build directory ./path.
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).
Modestas Vainius [Thu, 11 Jun 2009 15:17:36 +0000 (18:17 +0300)]
Ensure make doesn't print directories when checking for target existance.
Whenever make is run with --print-directory option, make -C sometimes print
Entering/Leaving directory messages to stdout even with -s in effects This
breakes a check for target existance as it relies on make printing nothing when
target does not do anything. Hence explicitly pass --no-print-directory to make
to avoid it.
Modestas Vainius [Thu, 11 Jun 2009 00:01:58 +0000 (03:01 +0300)]
Add a test suite for build systems.
* Tests for core Buildsystem API (mostly path API).
* Tests for check_auto_configure() for each buildsystem.
* Build system autoselection tests under "typical" conditions for each buildsystem.
* DH_AUTO_OPTIONS and command line argument parsing tests.
* Real dh_auto_* tests for autoconf/makefile build systems with emulated.
autoconf behaviour under in both in source and out of source tree scenarios.
Modestas Vainius [Thu, 11 Jun 2009 08:58:56 +0000 (11:58 +0300)]
Reorder load_buildsystem arguments and pass @_ through it.
* Reorder $system and $step arguments to match create_buildsystem_instance()
order (less confusion).
* Pass arbitrary @_ from load_buildsystem() to create_buildsystem_instance().
Modestas Vainius [Thu, 11 Jun 2009 08:47:20 +0000 (11:47 +0300)]
Make perl_makemaker work properly when in source building is enforced.
This is backwards compatible (with << 7.3) until build, test and clean steps
are not reimplemented in the backwards compatibility breaking way. However,
this is absolutely necessary for enforce_in_source_building() to work in corner
cases (when build directory is set) in build, test and clean steps as the next
class (makefile) does not enforce it. makefile will fail as it will look for
Makefile in the build directory rather than the source directory.
Modestas Vainius [Thu, 11 Jun 2009 08:18:55 +0000 (11:18 +0300)]
Get rid of is_buildable and build_step flags. Broken by design.
* 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.
Modestas Vainius [Thu, 11 Jun 2009 07:54:55 +0000 (10:54 +0300)]
Refactor build directory setting into separate method and solve a few bugs.
* 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).
Implement source directory switching support (Closes: #530597).
* 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.
--list all buildsystems (including all 3rd party ones) dynamically.
* Implement a new sub in Dh_Buildsystems (load_all_buildsystems()) which
dynamically tries to find all buildsystem class files in perl module
directories (@INC) and clearly marks third party buildsystems as such.
* Use this sub for listing buildsystems so now --list easily helps a user
discover *all* buildsystem classes installed on his/her system clearly
separating built-in ones from third party ones.
Improvements in DH_OPTIONS handling and DH_AUTO_OPTIONS envvar support.
* DH_AUTO_OPTIONS is like existing DH_OPTIONS, just only for dh_auto
stuff. This also avoids "explosion" of separate DH_AUTO_* environment
variables (i.e. exports in debian/rules) and encourages usage of dh_auto
command line option names. DH_AUTO_OPTIONS is passed via "extra_args" to
Dh_Lib::init() (API addition).
* When splitting options from DH_OPTIONS and its flavours, allow arguments
to include whitespaces if they are escaped with backslash (\) (see
split_options_string()). Document this in debhelper.pod.
* Short option for --buildsystem is -c (aka class).
* Provide API to cancel option specs from default debhelper options.
It will be used in the feature.
Use term "out of source" rather than "outside source".
* "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.
Joey Hess [Wed, 27 May 2009 18:45:03 +0000 (14:45 -0400)]
dh_compress: Avoid compressing .svg and .sgvz files, since these might be used as images on a html page, and also to avoid needing to special case the .svgz extention when compressing svg. Closes: #530253
Joey Hess [Sun, 10 May 2009 17:07:06 +0000 (13:07 -0400)]
dh_auto_configure: Pass packlist=0 when running Makefile.PL, in case it is a Build.PL passthru, to avoid it creating the .packlist file. Closes: #527990