[Buildroot] [PATCH] new variable <pkg>_CONFIG_FIXUP
Arnout Vandecappelle
arnout at mind.be
Tue Jan 8 21:10:05 UTC 2013
On 01/07/13 23:01, Stefan Fröberg wrote:
> Signed-off-by: Stefan Fröberg<stefan.froberg at petroprogram.com>
> ---
> package/pkg-generic.mk | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> index a570ad7..a410ad1 100644
> --- a/package/pkg-generic.mk
> +++ b/package/pkg-generic.mk
> @@ -121,6 +121,14 @@ $(BUILD_DIR)/%/.stamp_staging_installed:
> @$(call MESSAGE,"Installing to staging directory")
> $($(PKG)_INSTALL_STAGING_CMDS)
> $(foreach hook,$($(PKG)_POST_INSTALL_STAGING_HOOKS),$(call $(hook))$(sep))
> + @$(call MESSAGE,"Fixing package configuration files")
> + for file in $($(PKG)_CONFIG_FIXUP); do \
> + if [ -e $(STAGING_DIR)/usr/bin/$${file} ]; then \
> + $(SED) "s,^prefix=.*,prefix=\'$(STAGING_DIR)/usr\',g" \
The \' are redundant, just put ' (it's already between double quotes).
> + -e "s,^exec_prefix=.*,exec_prefix=\'$(STAGING_DIR)/usr\',g" \
> + $(STAGING_DIR)/usr/bin/$${file} ;\
> + fi \
> + done
Since sed -i is used, you can actually pass all files together.
Something like:
if [ "$($(PKG)_CONFIG_FIXUP)" ]; then \
$(SED) ... \
$(addprefix $(STAGING_DIR)/usr/bin,$($(PKG)_CONFIG_FIXUP))); \
fi
Regards,
Arnout
> $(Q)touch $@
>
> # Install to images dir
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
More information about the buildroot
mailing list