Modestas Vainius wrote:
> 1) Find the first (in @BUILDSYSTEMS order) auto-buildable build system in
> the current build step. If found, it becomes the base one. Otherwise,
> auto-selection process fails.
> 
> 2) Look for a more specific (i.e. deeper in the inheritance tree) build system
> that is both auto-selectable in any build step coming before the current one
> and auto-buildable in current one. If such a build system is found, 
> auto-select
> it for current step as well. Otherwise, auto-select the base build system 
> found
> in 1). Auto-selection process succeeds.

If a packaxge has both a CMakeLists.txt and a GNUmakefile,
dh_auto_configure will currently use the makefile build system, do
nothing, and futher steps will build and install using the GNUmakefile.

With this change, dh_auto_configure will: 

1. Find the first auto-buildable build system, which is still makefile.
2. Hmm, based on your description above, it would find cmake, and use
   it, which is a behavior change. However, the code actually skips
   doing so, because there is no build step before configure;
   makefile is still used.

Then dh_auto_build will:

1. Find the first auto-buildable build system, which is still makefile.
2. Find the more specific build system cmake, and use it.

So it seems this only works because cmake.pm currently inherits the
build step from makefile.

Slightly different story for dh_auto_test:

1. First is still makefile.
2. More specific is again cmake; which is used.

So, this only works because cmake.pm's test method calls SUPER and
does not do anything that is really cmake specific. 

If cmake had a  "cmake-test" program that the test method ran, it could
in this situation break, because the configure step did not use cmake.


I think this works for cmake only through a certian measure of luck.
But, it does currently work.

So the risk of making this change is that we have to beware the above
scenario when making changes to cmake.pm, or when adding future build
systems after cmake that similarly derive from makefile.

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature

Reply via email to