Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Hamish Moffatt <hamish@cloud.net.au>
To: buildroot@busybox.net
Subject: [Buildroot] Makefile.autotools.in stamp files breaks	multipleprojects
Date: Fri, 5 Sep 2008 00:35:33 +1000	[thread overview]
Message-ID: <20080904143533.GA28601@cloud.net.au> (raw)
In-Reply-To: <1D28C7EE66C2440FB30AEE54DA90C54B@aeglos>

On Thu, Sep 04, 2008 at 06:02:27AM +0200, Ulf Samuelsson wrote:
>> As previously discussed, Makefile.autotools.in creates stamp files in
>> $(BUILD_DIR)/$(PKG) such as .stamp_installed. This will prevent the
>> package being properly installed into multiple projects built out of the
>> same source tree. (The first project will build ok but subsequent
>> projects won't install the files.)
>>
>> I see a few solutions;
>>
>> 1. Each autotools-using package could (optionally?) specify the name of
>> a test target file to use, instead of using an explicit stamp file.
>> Hans-Christian sent a patch for this already.
>>
>
> That seems to be a good solution, except that if the build breaks after
> that file has been installed, other neccessary files might not be copied.
> You have to ensure that this is the last file that gets installed by the  
> package build.
> Even if this happens, then it could break if the package version gets  
> updated
> and the install order changes.

Yes it's a bit fragile. Most packages that don't use stamp files
probably just choose a random file, or the main binary - doing the same
for the autotools packages won't be any worse.

>> Obseleting (some or all of) the stamp files wouldn't be bad anyway. Many
>> of them could be replaced with actual targets, eg Makefile depends on
>> running configure (rather than using .stamp_configured).
>>
>> 2. The .stamp_install files could be put somewhere under $(TARGET_DIR)
>> instead of $(BUILD_DIR); they'd need to be stripped out by the various
>> generators in target/.. though.
>
> You can install the stamps in "project_build_<arch>/<project>/.stamps"
> as long as the make clean stuff cleans that up as well.
>
> Populating the target file system with stamps is not a good idea.

I'd prefer to use real files, but that will require us to update every
package that uses autotools in order to get the benefits. Using a stamp
file in project_build_$arch/$project/ somewhere is a good partial
solution though.

>> 3. Sharing $(BUILD_DIR) between multiple projects should be scrapped. In
>> practice, redefining BUILD_DIR = $(PROJECT_BUILD_DIR) would do it.
>
> Packages which can be configured by buildroot should remain in $(BUILD_DIR)
> while packages that can be configured should be in $(PROJECT_BUILD_DIR).
> Until this happens you should not have projects with different options or
> use a separate buildroot tree.
>
> You can have projects which have totally different set of packages.
>
>>
>> I think sharing $(BUILD_DIR) between multiple projects is quite broken.
>> The only benefit is that the packages only need to be compiled once.
>
> Which is a significant time saving, if you have to build multiple projects.

Negligible with modern hardware, IMHO. I've got about 6 projects built
in my working tree, all sharing the toolchain.. from scratch each of them 
would take under 10 minutes to build, and not long to do an incremental
build.

Longer if you're building X I suppose.

We'd be better off having separate build directories but trying to get
ccache to do its thing.

>> - different projects might be using different compilers or different
>>  compiler flags, and the right ones won't be used for each project.
>> - same for different kernel headers potentially.
>
> If you want different options for the toolchain, you need to use a 
> separate buildroot tree.

It'd be better if that was enforced in some way - right now you would
just get silent breakage.



Hamish
-- 
Hamish Moffatt VK3SB <hamish@debian.org> <hamish@cloud.net.au>

  reply	other threads:[~2008-09-04 14:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-04  2:50 [Buildroot] Makefile.autotools.in stamp files breaks multiple projects Hamish Moffatt
2008-09-04  4:02 ` [Buildroot] Makefile.autotools.in stamp files breaks multipleprojects Ulf Samuelsson
2008-09-04 14:35   ` Hamish Moffatt [this message]
2008-09-05  4:30 ` [Buildroot] Makefile.autotools.in stamp files breaks multiple projects Hamish Moffatt
2008-09-08 13:39   ` Hans-Christian Egtvedt
2008-09-08 13:43     ` Hamish Moffatt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080904143533.GA28601@cloud.net.au \
    --to=hamish@cloud.net.au \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox