[Build-common-hackers] Bug#521711: Bug#521711: Bug#521711: Looks fixed.

Jonas Smedegaard dr at jones.dk
Mon Jun 8 22:08:44 UTC 2009

Hash: RIPEMD160

On Mon, Jun 08, 2009 at 11:00:37PM +0200, Raúl Sánchez Siles wrote:
>When I read your e-mail I decided to test your solution and I did: 
>modifying the real makefile.mk file. I did a copy of the original one, 
>but after some time, when I revisited the issue, I totally forgot what 
>I had done and I understood you already applied the fix to the cdbs 
>  In short, your patch works and should be applied IMHO.

Good to hear that.  Thanks for verifying!

>When you use cmake you usually do out of tree builds which means that 
>you create a dir typically inside the source tree where are the 
>modified or created files during the build stage will be stored. Once 
>you build the package, the source tree is supposed to be in the very 
>same state as you got it, so doing:
>rm -r <build-tree>
>should be idempotent to:
>make -C <build-tree> clean
>rm -r <build-tree>
>  It's only that formally, IMHO, the latter is more correct.

Thanks for clarifying.  I believe I get it now (already knew some of it, 
but not some of the details you brought up).

>  Besides this, if the build system creates, modifies or removes files 
>from the source not restoring them after the clean, the out-of-tree 
>method is not totally implemented and I consider this a bug, probably 
>in the build system or its configuration.

Yes.  My recent experience with CMake was exactly that (if I understand 
you correctly): configuration file only worked in-tree (linker paths 
working only when sourcedir = builddir).

I ended up rewriting the CMake configuration file more or less from 
scratch.  Luckily it was a quite small project (libresample, now pending 
in NEW queue).

I guess the cmake.mk snippet should...

a) Use out-of-tree by default

b) Support overriding to build in-tree

c) Run CMake clean rule by default, even if sourcedir != builddir

d) Support overriding clean rule, including disabling it

The alternative, to dkip CMake clean rule by default if sourcepath != 
builddir, is too late to change now, as it might break existing 
packages.  But it would make sense for a future cdbs v2 IMHO.

  - Jonas

- -- 
* Jonas Smedegaard - idealist og Internet-arkitekt
* Tlf.: +45 40843136  Website: http://dr.jones.dk/

  [x] quote me freely  [ ] ask before reusing  [ ] keep private
Version: GnuPG v1.4.9 (GNU/Linux)


More information about the Build-common-hackers mailing list