diff options
author | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2012-05-21 23:48:01 +0200 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2012-05-21 23:48:01 +0200 |
commit | 68846a7ee2aa5e5f91fd8eafe7e0ede341580bca (patch) | |
tree | 4c2b72d96a25422383f18fef857ce6e500526fb7 /mk | |
parent | a0c73d3544f3fba6b395e90e99f52e1578f61e4b (diff) | |
download | embtoolkit-68846a7ee2aa5e5f91fd8eafe7e0ede341580bca.tar.gz embtoolkit-68846a7ee2aa5e5f91fd8eafe7e0ede341580bca.tar.bz2 embtoolkit-68846a7ee2aa5e5f91fd8eafe7e0ede341580bca.tar.xz |
Internal macros: take into acount {sysroot}/usr/share/pkgconfig while fixing up files
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'mk')
-rw-r--r-- | mk/macros.packages.mk | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/mk/macros.packages.mk b/mk/macros.packages.mk index 587ec6b..05b754d 100644 --- a/mk/macros.packages.mk +++ b/mk/macros.packages.mk @@ -74,14 +74,18 @@ endef libtool_files_adapt: $(Q)$(call __embtk_fix_libtool_files) -#Macro to adapt pkg-config files for cross compiling +# Macro to adapt pkg-config files for cross compiling +__pkgconfig_includedir = includedir=$(SYSROOT)/usr/include +__pkgconfig_prefix = prefix=$(SYSROOT)/usr +__pkgconfig_libdir = libdir=$(SYSROOT)/usr/$(LIBDIR) define __embtk_fix_pkgconfig_files - PKGCONFIG_FILES=`find $(SYSROOT)/usr/$(LIBDIR)/pkgconfig -name *.pc`; \ - for i in $$PKGCONFIG_FILES; do \ - sed -e 's;prefix=.*;prefix=$(SYSROOT)/usr;' \ - -e 's;includedir=$${prefix}/include;includedir=$(SYSROOT)/usr/include;' \ - -e 's;libdir=.*;libdir=$(SYSROOT)/usr/$(LIBDIR);' < $$i > $$i.new; \ - mv $$i.new $$i; \ + __conf_files0=$$(find $(SYSROOT)/usr/$(LIBDIR)/pkgconfig -name *.pc); \ + __conf_files1=$$(find $(SYSROOT)/usr/share/pkgconfig -name *.pc); \ + for i in $$__conf_files0 $$__conf_files1; do \ + sed -e 's;prefix=.*;$(__pkgconfig_prefix);' \ + -e 's;includedir=$${prefix}/include;$(__pkgconfig_includedir);' \ + -e 's;libdir=.*;$(__pkgconfig_libdir);' < $$i > $$i.new; \ + mv $$i.new $$i; \ done endef pkgconfig_files_adapt: |