Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] RFC: add check for post-build script existence?
Date: Thu, 31 Jan 2013 10:13:46 +0100	[thread overview]
Message-ID: <20130131101346.6572d042@skate> (raw)
In-Reply-To: <CANxTyt5O6y45yR+ZecGGi4EomVU2mm4ar56g3iK7boGpFTQDOw@mail.gmail.com>

Dear Danomi Manchego,

On Wed, 30 Jan 2013 23:09:12 -0500, Danomi Manchego wrote:

> Would there be interest in adding a -e test before invoking the
> script, similar to the -d test before the target skeleton copy?
> Something like:
> 
> 	@$(call MESSAGE,"Executing post-build script\(s\)")
> 	@$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_BUILD_SCRIPT)), \
> 		if [ -e $(s) ]; then $(s) $(TARGET_DIR); fi$(sep))
> 
> If there is positive feedback, then I'll send in a patch.

I am not sure I like that because it means that if an user makes a
small mistake in the post-build script name/path, it will be silently
ignored by Buildroot. I'd prefer if Buildroot would fail loudly if it
is given a post-build script that doesn't exist/isn't executable, or
any other problem that prevents the script from being executed.

I'm not sure where you're getting ${BOARD_NAME} from, but why don't you
handle the board differences in the script itself?

Like:

BR2_ROOTFS_POST_BUILD_SCRIPT=board/<company>/<project>/post-build.sh

and post-build.sh:

====
#!/bin/sh
if test -e ${BOARD_NAME}-fixups.sh; then
	sh ${BOARD_NAME}-fixups.sh
fi
====

No? :-)

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

  reply	other threads:[~2013-01-31  9:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-31  4:09 [Buildroot] RFC: add check for post-build script existence? Danomi Manchego
2013-01-31  9:13 ` Thomas Petazzoni [this message]
2013-02-01  1:37   ` Danomi Manchego

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=20130131101346.6572d042@skate \
    --to=thomas.petazzoni@free-electrons.com \
    --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