diff options
author | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2014-07-17 23:06:17 +0200 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2014-07-17 23:06:17 +0200 |
commit | 50e5565dc9fa37602a9be80738f8d51108232682 (patch) | |
tree | f8304b4a6aae60e04dac101285edefef69b058ad /core/mk | |
parent | e1b18a98b943a3867b86e8bad667bf3dae2eea28 (diff) | |
download | embtoolkit-50e5565dc9fa37602a9be80738f8d51108232682.tar.gz embtoolkit-50e5565dc9fa37602a9be80738f8d51108232682.tar.bz2 embtoolkit-50e5565dc9fa37602a9be80738f8d51108232682.tar.xz |
Add build system new macros: embtk_autoreconf_{,host}pkg for autotooled packages
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'core/mk')
-rw-r--r-- | core/mk/pkg-macros/configure.mk | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/core/mk/pkg-macros/configure.mk b/core/mk/pkg-macros/configure.mk index ee822c9..b1611b0 100644 --- a/core/mk/pkg-macros/configure.mk +++ b/core/mk/pkg-macros/configure.mk @@ -49,13 +49,26 @@ endef # Usage: # $(call embtk_configure_pkg,PACKAGE) # -define __embtk_configure_autoreconfpkg -if [ "x$(CONFIG_EMBTK_$(PKGV)_NEED_AUTORECONF)" = "xy" ]; then \ +__embtk_pkg_autoreconf-y = $(CONFIG_EMBTK_$(PKGV)_NEED_AUTORECONF) +define embtk_autoreconf_pkg + $(if $(__embtk_pkg_autoreconf-y),$(call __embtk_autoreconf_pkg,$(1))) +endef +define __embtk_autoreconf_pkg + test -e $(__embtk_pkg_srcdir)/configure.ac || \ + test -e $(__embtk_pkg_srcdir)/configure.in || \ + ($(call embtk_perror,"Can not autoreconf $(__embtk_pkg_name)"); exit 1) + cd $(__embtk_pkg_srcdir); $(AUTORECONF) \ + --install -f --include=$(embtk_sysroot)/usr/share/aclocal +endef + +define embtk_autoreconf_hostpkg + $(if $(__embtk_pkg_autoreconf-y),$(call __embtk_autoreconf_pkg,$(1))) +endef +define __embtk_autoreconf_hostpkg test -e $(__embtk_pkg_srcdir)/configure.ac || \ - test -e $(__embtk_pkg_srcdir)/configure.in || exit 1; \ - cd $(__embtk_pkg_srcdir); \ - $(AUTORECONF) --install -f; \ -fi + test -e $(__embtk_pkg_srcdir)/configure.in || \ + ($(call embtk_perror,"Can not autoreconf $(__embtk_pkg_name)"); exit 1) + cd $(__embtk_pkg_srcdir); $(AUTORECONF) --install -f endef __embtk_parse_configure_opts = $(subst $(embtk_space),"\\n\\t",$(strip $(1))) @@ -75,7 +88,7 @@ __embtk_pkg_cxx = $(if $(CONFIG_EMBTK_GCC_LANGUAGE_CPP),$(___embtk_pkg_cxx)) define embtk_configure_pkg $(if $(EMBTK_BUILDSYS_DEBUG), $(call embtk_pinfo,"Configure $(__embtk_pkg_package)...")) - $(call __embtk_configure_autoreconfpkg,$(1)) + $(call embtk_autoreconf_pkg,$(1)) $(Q)test -e $(__embtk_pkg_configurescript) || exit 1 $(call __embtk_print_configure_opts,$(__embtk_pkg_configureopts)) $(if $(CONFIG_EMBTK_CLIB_MUSL),$(call __embtk_fixgconfigsfor_pkg,$(1))) @@ -125,7 +138,7 @@ __embtk_hostpkg_cppflags = -I$(embtk_htools)/usr/include define embtk_configure_hostpkg $(if $(EMBTK_BUILDSYS_DEBUG), $(call embtk_pinfo,"Configure $(__embtk_pkg_package) for host...")) - $(call __embtk_configure_autoreconfpkg,$(1)) + $(call embtk_autoreconf_hostpkg,$(1)) $(if $(CONFIG_EMBTK_CLIB_MUSL),$(call __embtk_fixgconfigsfor_pkg,$(1))) $(Q)test -e $(__embtk_pkg_configurescript) || exit 1 $(call __embtk_print_configure_opts,$(__embtk_pkg_configureopts)) |