From: Thomas De Schampheleire <patrickdepinguin@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2] infra: fix autotools .la fixing when no .la files are present
Date: Sun, 06 Jul 2014 17:10:51 +0200 [thread overview]
Message-ID: <bb03ffeaa528d3c99f51.1404659451@localhost> (raw)
Commit 6f638ea9c9c7bacc646430a74ad3dd2740eae676 ("infra: /usr support:
STAGING_DIR can be outside BASE_DIR") changed a for-construct around 'sed
-i' in a 'find | xargs sed -i'. However, if the find returns no results,
sed complains with:
'/bin/sed: no input files'
This commit adds the extra parameter -r / --no-run-if-empty to the xargs
call, effectively fixing this problem case.
Reported-by: Rohit Kumar <rkthebest@gmail.com>
Fix-suggested-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
---
package/pkg-autotools.mk | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff -r c8ed6565ea09 -r bb03ffeaa528 package/pkg-autotools.mk
--- a/package/pkg-autotools.mk Thu Jul 03 12:35:57 2014 +0300
+++ b/package/pkg-autotools.mk Sun Jul 06 16:19:04 2014 +0200
@@ -281,7 +281,7 @@
ifndef $(2)_INSTALL_STAGING_CMDS
define $(2)_INSTALL_STAGING_CMDS
$$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_INSTALL_STAGING_OPT) -C $$($$(PKG)_SRCDIR)
- find $$(STAGING_DIR)/usr/lib* -name "*.la" | xargs \
+ find $$(STAGING_DIR)/usr/lib* -name "*.la" | xargs --no-run-if-empty \
$$(SED) "s:$$(BASE_DIR):@BASE_DIR@:g" \
-e "s:$$(STAGING_DIR):@STAGING_DIR@:g" \
-e "s:\(['= ]\)/usr:\\1 at STAGING_DIR@/usr:g" \
next reply other threads:[~2014-07-06 15:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-06 15:10 Thomas De Schampheleire [this message]
2014-07-06 15:21 ` [Buildroot] [PATCH v2] infra: fix autotools .la fixing when no .la files are present Thomas De Schampheleire
2014-07-06 15:28 ` Yann E. MORIN
2014-07-06 15:27 ` Yann E. MORIN
2014-07-06 20:22 ` Peter Korsgaard
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=bb03ffeaa528d3c99f51.1404659451@localhost \
--to=patrickdepinguin@gmail.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