packages: use backtick instead of $(shell ...) make function
authorArnout Vandecappelle <arnout@mind.be>
Sun, 12 Jul 2015 14:35:26 +0000 (16:35 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 14 Jul 2015 22:42:01 +0000 (00:42 +0200)
It is often difficult to know exactly when make will expand the
variable, and usually it can only be expanded after the dependencies
have been built (e.g. pkg-config or the .pc file). Using a backtick
instead makes it very clear that it will be expanded only while
executing the command.

This change is useful for two cases:

1. The per-package staging (and host) directory will be created as part
   of the configure step, so any $(shell ...) variable that is used in
   the configure step will fail because the directory doesn't exist
   yet.

2. 'make printvars' evaluates the variables it prints. It will therefore
   trigger a lot of errors from missing .pc files and others. The
   backticks, on the other hand, are not expanded, so with this change
   the output of 'make printvars' becomes clean again.

This commit contains only the easy changes: replace $(shell ...) with
`...`, and also replace ' with " where needed. Follow-up commits will
tackle the more complicated cases that need additional explanation.

After this change, the following instances of $(shell ...) will remain:

- All assignments that use :=
- All variables that are used in make conditionals (which don't expand
  the backticks).
- All variables that only refer to system executables and make
  variables that don't change.
- The calls to check-host-* in dependencies.mk, because it is eval'ed.

[Original patch by Fabio Porcedda, but extended quite a bit by Arnout.]

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
37 files changed:
package/aiccu/aiccu.mk
package/aircrack-ng/aircrack-ng.mk
package/bustle/bustle.mk
package/dbus-python/dbus-python.mk
package/dhcpdump/dhcpdump.mk
package/ejabberd/ejabberd.mk
package/fbv/fbv.mk
package/gdk-pixbuf/gdk-pixbuf.mk
package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk
package/iftop/iftop.mk
package/knock/knock.mk
package/kodi/kodi.mk
package/libgtk3/libgtk3.mk
package/libmicrohttpd/libmicrohttpd.mk
package/libssh2/libssh2.mk
package/libupnpp/libupnpp.mk
package/lmbench/lmbench.mk
package/logrotate/logrotate.mk
package/madplay/madplay.mk
package/mpg123/mpg123.mk
package/neardal/neardal.mk
package/ngrep/ngrep.mk
package/nmap/nmap.mk
package/openldap/openldap.mk
package/php/php.mk
package/poppler/poppler.mk
package/prboom/prboom.mk
package/ptpd2/ptpd2.mk
package/python-gobject/python-gobject.mk
package/python-pygame/python-pygame.mk
package/qt/qt.mk
package/tcpdump/tcpdump.mk
package/tcpreplay/tcpreplay.mk
package/ti-utils/ti-utils.mk
package/upmpdcli/upmpdcli.mk
package/vsftpd/vsftpd.mk
package/xl2tp/xl2tp.mk

index f2cd3dee7497b03906682af9723d25a528c44a5a..fc328fd5a6a1e1fd7210eb7564ae62ace4531b3e 100644 (file)
@@ -16,7 +16,7 @@ AICCU_LFDLAGS = $(TARGET_LDFLAGS)
 # aiccu forgets to link with gnutls' dependencies breaking the build when
 # linking statically
 ifeq ($(BR2_STATIC_LIBS),y)
-AICCU_LDFLAGS += $(shell $(PKG_CONFIG_HOST_BINARY) --static --libs gnutls)
+AICCU_LDFLAGS += `$(PKG_CONFIG_HOST_BINARY) --static --libs gnutls`
 endif
 
 # dummy RPM_OPT_FLAGS to disable stripping
index fc72c3b02bead1cb2686d800f23244254477f703..7e5464d382e66b740b211dcd29bbef3a62e4f75d 100644 (file)
@@ -27,7 +27,7 @@ endif
 ifeq ($(BR2_PACKAGE_LIBPCAP),y)
 AIRCRACK_NG_DEPENDENCIES += libpcap
 AIRCRACK_NG_MAKE_OPTS += HAVE_PCAP=yes \
-       $(if $(BR2_STATIC_LIBS),LIBPCAP="-lpcap $(shell $(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs)")
+       $(if $(BR2_STATIC_LIBS),LIBPCAP="-lpcap `$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`")
 else
 AIRCRACK_NG_MAKE_OPTS += HAVE_PCAP=no
 endif
index 1ba36e0a69c1869e950b3f7d44956141d3693dbd..0b85536ea9c1590164d538f7cb534ee6ba4290d5 100644 (file)
@@ -12,7 +12,7 @@ BUSTLE_DEPENDENCIES = libglib2 libpcap host-pkgconf
 
 BUSTLE_PCAP_FLAGS = "-lpcap"
 ifeq ($(BR2_STATIC_LIBS),y)
-BUSTLE_PCAP_FLAGS += $(shell $(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs)
+BUSTLE_PCAP_FLAGS += `$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`
 endif
 
 define BUSTLE_BUILD_CMDS
index 9bda0182acf473c1d236ed30f320ee5c424fdff8..40799678f8672b43479e5a4dda5f91fb90f088ec 100644 (file)
@@ -17,15 +17,15 @@ DBUS_PYTHON_DEPENDENCIES += python host-python
 
 DBUS_PYTHON_CONF_ENV += \
        PYTHON=$(HOST_DIR)/usr/bin/python2 \
-       PYTHON_INCLUDES="$(shell $(STAGING_DIR)/usr/bin/python2-config --includes)" \
-       PYTHON_LIBS="$(shell $(STAGING_DIR)/usr/bin/python2-config --ldflags)"
+       PYTHON_INCLUDES="`$(STAGING_DIR)/usr/bin/python2-config --includes`" \
+       PYTHON_LIBS="`$(STAGING_DIR)/usr/bin/python2-config --ldflags`"
 else
 DBUS_PYTHON_DEPENDENCIES += python3 host-python3
 
 DBUS_PYTHON_CONF_ENV += \
        PYTHON=$(HOST_DIR)/usr/bin/python3 \
-       PYTHON_INCLUDES="$(shell $(STAGING_DIR)/usr/bin/python3-config --includes)" \
-       PYTHON_LIBS="$(shell $(STAGING_DIR)/usr/bin/python3-config --ldflags)"
+       PYTHON_INCLUDES="`$(STAGING_DIR)/usr/bin/python3-config --includes`" \
+       PYTHON_LIBS="`$(STAGING_DIR)/usr/bin/python3-config --ldflags`"
 endif
 
 $(eval $(autotools-package))
index 075631950f69b40af46253752c2ddcaf0181fe5d..15fc02f845110278b02e4837720b8bd97c2d9a78 100644 (file)
@@ -12,7 +12,7 @@ DHCPDUMP_LICENSE_FILES = LICENSE
 
 DHCPDUMP_LIBS = -lpcap
 ifeq ($(BR2_STATIC_LIBS),y)
-DHCPDUMP_LIBS += $(shell $(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs)
+DHCPDUMP_LIBS += `$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`
 endif
 
 define DHCPDUMP_BUILD_CMDS
index b413c8be698d417dc6be54b4b904b370b6f90183..7e22e0cab89e0d59fb232588cb5ca1d8e594e901 100644 (file)
@@ -26,7 +26,7 @@ EJABBERD_ERLANG_LIBS = sasl crypto public_key ssl mnesia inets compiler
 EJABBERD_CONF_ENV = \
        ac_cv_erlang_root_dir="$(HOST_DIR)/usr/lib/erlang" \
        $(foreach lib,$(EJABBERD_ERLANG_LIBS), \
-               ac_cv_erlang_lib_dir_$(lib)="$(shell package/ejabberd/check-erlang-lib $(lib))")
+               ac_cv_erlang_lib_dir_$(lib)="`package/ejabberd/check-erlang-lib $(lib)`")
 
 define EJABBERD_INSTALL_TARGET_CMDS
        $(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) install -C $(@D)
index 8788b0ec540bbc6e26fb9f3d03d1f4d2c69da397..5f7dc8c63e4970c703656661b76bf58a756e745d 100644 (file)
@@ -18,7 +18,7 @@ FBV_DEPENDENCIES += libpng
 
 # libpng in turn depends on other libraries
 ifeq ($(BR2_STATIC_LIBS),y)
-FBV_CONFIGURE_OPTS += "--libs=$(shell $(PKG_CONFIG_HOST_BINARY) --libs libpng --static)"
+FBV_CONFIGURE_OPTS += "--libs=`$(PKG_CONFIG_HOST_BINARY) --libs libpng --static`"
 endif
 
 else
index eb30215d7936ef1514b85f1de7bbc6ba5e56b646..3a66e61c73c870c0f84c4b3188bf6232009fdc6f 100644 (file)
@@ -35,7 +35,7 @@ GDK_PIXBUF_CONF_OPTS += --without-libtiff
 else
 GDK_PIXBUF_DEPENDENCIES += tiff host-pkgconf
 GDK_PIXBUF_CONF_ENV += \
-       LIBS='$(shell $(PKG_CONFIG_HOST_BINARY) --libs libtiff-4)'
+       LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libtiff-4`"
 endif
 
 ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y)
index faf0e2ae0323850ce47c354c621399ca6209baf3..ee936fe7038c7b025481229fa6c7ea9ffb915b75 100644 (file)
@@ -119,8 +119,8 @@ ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_EGL),y)
 GST1_PLUGINS_BAD_CONF_OPTS += --enable-egl
 GST1_PLUGINS_BAD_DEPENDENCIES += libegl
 GST1_PLUGINS_BAD_CONF_ENV += \
-       CPPFLAGS="$(TARGET_CPPFLAGS) $(shell $(PKG_CONFIG_HOST_BINARY) --cflags egl)" \
-       LIBS="$(shell $(PKG_CONFIG_HOST_BINARY) --libs egl)"
+       CPPFLAGS="$(TARGET_CPPFLAGS) `$(PKG_CONFIG_HOST_BINARY) --cflags egl`" \
+       LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs egl`"
 else
 GST1_PLUGINS_BAD_CONF_OPTS += --disable-egl
 endif
index bea05ba3b32701601d3701c1df616b9fd3c897c7..042f2b28eb759d7f74a60aaac4ec0445c7dd5663 100644 (file)
@@ -12,7 +12,7 @@ IFTOP_LICENSE_FILES = COPYING
 
 IFTOP_LIBS = -lpcap
 ifeq ($(BR2_STATIC_LIBS),y)
-IFTOP_LIBS += $(shell $(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs)
+IFTOP_LIBS += `$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`
 endif
 IFTOP_CONF_ENV += LIBS+="$(IFTOP_LIBS)"
 
index 2c0adb1e0401f6fe813a4870a10525f5ebab6cdb..28db1eb722070b1474021e90b16585915c5800a9 100644 (file)
@@ -11,7 +11,7 @@ KNOCK_LICENSE_FILES = COPYING
 KNOCK_DEPENDENCIES = libpcap
 
 ifeq ($(BR2_STATIC_LIBS),y)
-KNOCK_CONF_OPTS = LIBS="$(shell $(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs)"
+KNOCK_CONF_OPTS = LIBS="`$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`"
 endif
 
 $(eval $(autotools-package))
index cc42df40aaeb3232a0f7fc8bbfe9a7dce73ef25a..ad61f0de640eea638a676631cc0206044b23dc13 100644 (file)
@@ -112,7 +112,7 @@ else
 KODI_CONF_OPTS += --disable-gl --disable-rsxs --disable-sdl --disable-x11 --disable-xrandr
 ifeq ($(BR2_PACKAGE_KODI_EGL_GLES),y)
 KODI_DEPENDENCIES += libegl libgles
-KODI_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) $(shell $(PKG_CONFIG_HOST_BINARY) --cflags egl)"
+KODI_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) `$(PKG_CONFIG_HOST_BINARY) --cflags egl`"
 KODI_CONF_OPTS += --enable-gles
 else
 KODI_CONF_OPTS += --disable-gles
index ee7329140ed7127548ee8fa9a09abbee7c2c30e4..80dbf947caf3e80308218d4b700d226fa483d5df 100644 (file)
@@ -149,8 +149,7 @@ HOST_LIBGTK3_DEPENDENCIES = \
        host-pkgconf
 
 HOST_LIBGTK3_CFLAGS = \
-       $(shell $(HOST_DIR)/usr/bin/pkgconf \
-       --cflags --libs gdk-pixbuf-2.0)
+       `$(HOST_DIR)/usr/bin/pkgconf --cflags --libs gdk-pixbuf-2.0`
 
 define HOST_LIBGTK3_CONFIGURE_CMDS
        echo "#define GETTEXT_PACKAGE \"gtk30\"" >> $(@D)/gtk/config.h
index a6662a73adc31a26f372dc3167a3a4fd35ff36f0..f8a9d22f4edbbf758369cae1e9443fe86d230ff9 100644 (file)
@@ -13,7 +13,7 @@ LIBMICROHTTPD_CONF_OPTS = --disable-curl --disable-spdy --disable-examples
 ifeq ($(BR2_PACKAGE_LIBMICROHTTPD_SSL),y)
 LIBMICROHTTPD_LICENSE = LGPLv2.1+
 LIBMICROHTTPD_DEPENDENCIES += host-pkgconf gnutls libgcrypt
-LIBMICROHTTPD_CONF_ENV += LIBS="$(shell $(PKG_CONFIG_HOST_BINARY) --libs gnutls)"
+LIBMICROHTTPD_CONF_ENV += LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs gnutls`"
 LIBMICROHTTPD_CONF_OPTS += --enable-https --with-gnutls=$(STAGING_DIR)/usr \
        --with-libgcrypt-prefix=$(STAGING_DIR)/usr
 else
index 3b4df3755ebd353a67017a8023508dc6035dfa31..bf040a836e1a2fb3fab0fda5a49e667a4637c8ac 100644 (file)
@@ -20,7 +20,7 @@ LIBSSH2_CONF_OPTS += --with-libgcrypt \
        --without-openssl
 # configure.ac forgets to link to dependent libraries of gcrypt breaking static
 # linking
-LIBSSH2_CONF_ENV += LIBS="$(shell $(STAGING_DIR)/usr/bin/libgcrypt-config --libs)"
+LIBSSH2_CONF_ENV += LIBS="`$(STAGING_DIR)/usr/bin/libgcrypt-config --libs`"
 else
 LIBSSH2_DEPENDENCIES += openssl
 LIBSSH2_CONF_OPTS += --with-openssl \
index caf61afecf04509bd1178d9047bfad0accf6f918..1075ff90f4d2922b38f87f3204efeaa394b23c34 100644 (file)
@@ -16,7 +16,7 @@ LIBUPNPP_DEPENDENCIES = expat libcurl libupnp
 ifeq ($(BR2_STATIC_LIBS),y)
 LIBUPNPP_DEPENDENCIES += host-pkgconf
 LIBUPNPP_CONF_ENV += \
-       LIBS='$(shell $(PKG_CONFIG_HOST_BINARY) --libs libupnp libcurl)'
+       LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libupnp libcurl`"
 endif
 
 $(eval $(autotools-package))
index f593428ac1c8c8ced50d438f03c7b2790430519f..dc758c6faf7d843f602d7dbc62b0e189702b8977 100644 (file)
@@ -14,8 +14,8 @@ LMBENCH_CFLAGS = $(TARGET_CFLAGS)
 
 ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
 LMBENCH_DEPENDENCIES += host-pkgconf libtirpc
-LMBENCH_CFLAGS += $(shell $(PKG_CONFIG_HOST_BINARY) --cflags libtirpc)
-LMBENCH_LDLIBS = $(shell $(PKG_CONFIG_HOST_BINARY) --libs libtirpc)
+LMBENCH_CFLAGS += `$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc`
+LMBENCH_LDLIBS = `$(PKG_CONFIG_HOST_BINARY) --libs libtirpc`
 endif
 
 define LMBENCH_CONFIGURE_CMDS
index 0af7f4aa3e7cad3deb8105a0cb5f91c2badec0f2..4a70040279aae35ebed59271623c8251ee343319 100644 (file)
@@ -11,7 +11,7 @@ LOGROTATE_LICENSE_FILES = COPYING
 LOGROTATE_DEPENDENCIES = popt host-pkgconf
 # tarball does not have a generated configure script
 LOGROTATE_AUTORECONF = YES
-LOGROTATE_CONF_ENV = LIBS="$(shell $(PKG_CONFIG_HOST_BINARY) --libs popt)"
+LOGROTATE_CONF_ENV = LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs popt`"
 LOGROTATE_CONF_OPTS = --without-selinux
 
 ifeq ($(BR2_PACKAGE_ACL),y)
index ff12aa111c04f59c04cf07470bf12718d00fe8ad..2606ac8d6634e4f54e5faa618aa837fa8aba2631 100644 (file)
@@ -16,7 +16,7 @@ MADPLAY_DEPENDENCIES = libmad libid3tag $(if $(BR2_PACKAGE_GETTEXT),gettext)
 ifeq ($(BR2_PACKAGE_MADPLAY_ALSA),y)
 MADPLAY_CONF_OPTS += --with-alsa
 MADPLAY_DEPENDENCIES += host-pkgconf alsa-lib
-MADPLAY_CONF_ENV += LIBS="$(shell $(PKG_CONFIG_HOST_BINARY) --libs alsa)"
+MADPLAY_CONF_ENV += LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs alsa`"
 endif
 
 $(eval $(autotools-package))
index a16e4002ad5aa8b827da286ba89d3265aa290eed..4c534e2b1a982cd3a8d03082ce5067127172b13f 100644 (file)
@@ -54,7 +54,7 @@ MPG123_CONF_OPTS += --with-default-audio=portaudio
 MPG123_DEPENDENCIES += portaudio
 # configure script does NOT use pkg-config to figure out how to link
 # with portaudio, breaking static linking as portaudio uses pthreads
-MPG123_CONF_ENV += LIBS='$(shell $(PKG_CONFIG_HOST_BINARY) --libs portaudio-2.0)'
+MPG123_CONF_ENV += LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs portaudio-2.0`"
 endif
 
 ifeq ($(BR2_PACKAGE_SDL),y)
index ddaecbeb1252c6046c35a54cbfd7720fe24e2ad5..c3164ef0dae65bbea50b8d56d61c6153a3c8c4da 100644 (file)
@@ -25,7 +25,7 @@ endif
 # forgets to take that into account, causing the detection to fail
 # when linking statically
 ifeq ($(BR2_STATIC_LIBS),y)
-NEARDAL_CONF_ENV += LIBS='$(shell $(PKG_CONFIG_HOST_BINARY) --libs ncurses)'
+NEARDAL_CONF_ENV += LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs ncurses`"
 endif
 
 define NEARDAL_INSTALL_NCL
index f2fcb73c0a749090730f161c6ee8ff00d4d0a10e..c4ad528292d76d6ab88b9f15460f0ab5d84c5805 100644 (file)
@@ -13,7 +13,7 @@ NGREP_INSTALL_STAGING = YES
 
 NGREP_LIBS = -lpcap -lpcre
 ifeq ($(BR2_STATIC_LIBS),y)
-NGREP_LIBS += $(shell $(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs)
+NGREP_LIBS += `$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`
 endif
 NGREP_CONF_ENV += LIBS+="$(NGREP_LIBS)"
 
index d46d58b4ec8725ec3ccd2adf1116393ecdc4b810..d450f5e99b46f9ad0f446e318f312bf9cd6f1138 100644 (file)
@@ -15,10 +15,10 @@ NMAP_LICENSE = GPLv2
 NMAP_LICENSE_FILES = COPYING
 
 # needed by libpcap
-NMAP_LIBS_FOR_STATIC_LINK += $(shell $(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs)
+NMAP_LIBS_FOR_STATIC_LINK += `$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`
 
 ifeq ($(BR2_STATIC_LIBS),y)
-NMAP_CONF_ENV += LIBS='$(NMAP_LIBS_FOR_STATIC_LINK)'
+NMAP_CONF_ENV += LIBS="$(NMAP_LIBS_FOR_STATIC_LINK)"
 endif
 
 # for 0001-libdnet-wrapper-configure.patch
index ecb1bcec68f796db71a6b1a8c34287b7762e0cba..4c3a71ab62f2cae36fd4243deedb11ead5c89799 100644 (file)
@@ -31,7 +31,7 @@ endif
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 OPENLDAP_MP = bignum
 OPENLDAP_DEPENDENCIES += openssl
-OPENLDAP_CONF_ENV = LIBS="$(shell $(PKG_CONFIG_HOST_BINARY) --libs libssl libcrypto)"
+OPENLDAP_CONF_ENV = LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libssl libcrypto`"
 else ifeq ($(BR2_PACKAGE_GMP),y)
 OPENLDAP_MP = gmp
 OPENLDAP_DEPENDENCIES += gmp
index 53aaecf06dc0d6772b31547916d0040290eb662d..39f4e2a8ef20020b77cd9daa6dbefcb138923474 100644 (file)
@@ -116,7 +116,7 @@ PHP_CONF_OPTS += --with-openssl=$(STAGING_DIR)/usr
 PHP_DEPENDENCIES += openssl
 # openssl needs zlib, but the configure script forgets to link against
 # it causing detection failures with static linking
-PHP_STATIC_LIBS += $(shell $(PKG_CONFIG_HOST_BINARY) --libs --static openssl)
+PHP_STATIC_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs --static openssl`
 endif
 
 ifeq ($(BR2_PACKAGE_PHP_EXT_LIBXML2),y)
@@ -187,7 +187,7 @@ endif
 ifeq ($(BR2_PACKAGE_PHP_EXT_SQLITE),y)
 PHP_CONF_OPTS += --with-sqlite3=$(STAGING_DIR)/usr
 PHP_DEPENDENCIES += sqlite
-PHP_STATIC_LIBS += $(shell $(PKG_CONFIG_HOST_BINARY) --libs --static sqlite3)
+PHP_STATIC_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs --static sqlite3`
 endif
 
 ### PDO
index 234b7ccd16ebe1af1c9f92ce8294384bcfee3ccf..6142cbaf90dc401830178dc2589465b27c0be6b5 100644 (file)
@@ -24,7 +24,7 @@ ifeq ($(BR2_PACKAGE_TIFF),y)
 POPPLER_CONF_OPTS += --enable-libtiff
 # Help poppler to find libtiff in static linking scenarios
 POPPLER_CONF_ENV += \
-       LIBTIFF_LIBS="$(shell $(PKG_CONFIG_HOST_BINARY) --libs libtiff-4)"
+       LIBTIFF_LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libtiff-4`"
 POPPLER_DEPENDENCIES += tiff
 else
 POPPLER_CONF_OPTS += --disable-libtiff
index 3d131cdd46d7186f0873dc04a41531ef1d222729..5f5e7fb677f5c29c4aad46658cb7e2d1c39eb9c2 100644 (file)
@@ -18,7 +18,7 @@ endif
 ifeq ($(BR2_STATIC_LIBS),y)
 # SDL_mixer uses symbols from SDL, but ends up after it on the link
 # cmdline. Fix it by forcing the SDL libs at the very end
-PRBOOM_CONF_ENV += LIBS="$(shell $(STAGING_DIR)/usr/bin/sdl-config --static-libs)"
+PRBOOM_CONF_ENV += LIBS="`$(STAGING_DIR)/usr/bin/sdl-config --static-libs`"
 endif
 
 PRBOOM_CONF_OPTS = \
index 6b2e6bcaca04025dc405e3f0f3eb74c5a850090c..cd49fe563bb8c5cf78dae4a70aeae04608534d99 100644 (file)
@@ -14,7 +14,7 @@ PTPD2_LICENSE = BSD-2c
 PTPD2_LICENSE_FILES = COPYRIGHT
 
 ifeq ($(BR2_STATIC_LIBS),y)
-PTPD2_CONF_OPTS += LIBS="$(shell $(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs)"
+PTPD2_CONF_OPTS += LIBS="`$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`"
 endif
 
 ifeq ($(BR2_PACKAGE_NETSNMP),y)
index c47954cfc03529a158579d5c2936b4973f9e4fa8..74cb0540cced3a7699f3a3b87d8739137721be7f 100644 (file)
@@ -20,13 +20,13 @@ PYTHON_GOBJECT_DEPENDENCIES += python host-python
 
 PYTHON_GOBJECT_CONF_ENV = \
        PYTHON=$(HOST_DIR)/usr/bin/python2 \
-       PYTHON_INCLUDES="$(shell $(STAGING_DIR)/usr/bin/python2-config --includes)"
+       PYTHON_INCLUDES="`$(STAGING_DIR)/usr/bin/python2-config --includes`"
 else
 PYTHON_GOBJECT_DEPENDENCIES += python3 host-python3
 
 PYTHON_GOBJECT_CONF_ENV = \
        PYTHON=$(HOST_DIR)/usr/bin/python3 \
-       PYTHON_INCLUDES="$(shell $(STAGING_DIR)/usr/bin/python3-config --includes)"
+       PYTHON_INCLUDES="`$(STAGING_DIR)/usr/bin/python3-config --includes`"
 endif
 
 ifeq ($(BR2_PACKAGE_LIBFFI),y)
index 51f1c20d13a1bf874e36b3eac5253c4beb78c78a..995f80ad79ddaa98c3efa0c1fdb1807d631fe3cc 100644 (file)
@@ -66,14 +66,14 @@ define PYTHON_PYGAME_UNCONFIGURE_SCRAP
 endef
 endif
 
-PYTHON_PYGAME_SDL_FLAGS = $(shell $(STAGING_DIR)/usr/bin/sdl-config --cflags)
-PYTHON_PYGAME_SDL_FLAGS += $(shell $(STAGING_DIR)/usr/bin/sdl-config --libs)
+PYTHON_PYGAME_SDL_FLAGS = `$(STAGING_DIR)/usr/bin/sdl-config --cflags`
+PYTHON_PYGAME_SDL_FLAGS += `$(STAGING_DIR)/usr/bin/sdl-config --libs`
 
 # Pygame needs a Setup file where options should be commented out if
 # dependencies are not available
 define PYTHON_PYGAME_CONFIGURE_CMDS
        cp -f $(@D)/Setup.in $(@D)/Setup
-       $(SED) 's~^SDL = ~SDL = $(PYTHON_PYGAME_SDL_FLAGS) \n#~' $(@D)/Setup
+       $(SED) "s~^SDL = ~SDL = $(PYTHON_PYGAME_SDL_FLAGS) \n#~" $(@D)/Setup
        $(SED) 's/^pypm/#pypm/' $(@D)/Setup
        $(PYTHON_PYGAME_UNCONFIGURE_IMAGE)
        $(PYTHON_PYGAME_UNCONFIGURE_FONT)
index 02b6db778ac9522ea35eb6a745584026eb1b9a93..e0e5d22bdec518e5ff25117c50cb21419175a04f 100644 (file)
@@ -230,9 +230,9 @@ QT_DEPENDENCIES += fontconfig xlib_libXi xlib_libX11 xlib_libXrender \
        xlib_libXcursor xlib_libXrandr xlib_libXext xlib_libXv
 # Using pkg-config avoids us some logic to redefine and sed again mkspecs files
 # to add X11 include path and link options
-QT_CFLAGS += $(shell $(PKG_CONFIG_HOST_BINARY) --cflags x11)
-QT_CXXFLAGS += $(shell $(PKG_CONFIG_HOST_BINARY) --cflags x11)
-QT_LDFLAGS += $(shell $(PKG_CONFIG_HOST_BINARY) --libs x11 xext)
+QT_CFLAGS += `$(PKG_CONFIG_HOST_BINARY) --cflags x11`
+QT_CXXFLAGS += `$(PKG_CONFIG_HOST_BINARY) --cflags x11`
+QT_LDFLAGS += `$(PKG_CONFIG_HOST_BINARY) --libs x11 xext`
 QT_CONFIGURE_OPTS += -arch $(QT_EMB_PLATFORM) \
                -xplatform qws/linux-$(QT_EMB_PLATFORM)-g++ -x11 -no-gtkstyle -no-sm \
                -no-openvg
@@ -329,9 +329,9 @@ endif
 ifeq ($(BR2_PACKAGE_QT_OPENGL_ES),y)
 QT_CONFIGURE_OPTS += -opengl es2 -egl
 QT_DEPENDENCIES += libgles libegl
-QT_CFLAGS += $(shell $(PKG_CONFIG_HOST_BINARY) --cflags egl)
-QT_CXXFLAGS += $(shell $(PKG_CONFIG_HOST_BINARY) --cflags egl)
-QT_LDFLAGS += $(shell $(PKG_CONFIG_HOST_BINARY) --libs egl)
+QT_CFLAGS += `$(PKG_CONFIG_HOST_BINARY) --cflags egl`
+QT_CXXFLAGS += `$(PKG_CONFIG_HOST_BINARY) --cflags egl`
+QT_LDFLAGS += `$(PKG_CONFIG_HOST_BINARY) --libs egl`
 else
 QT_CONFIGURE_OPTS += -no-opengl
 endif
@@ -473,7 +473,7 @@ QT_QMAKE = $(HOST_DIR)/usr/bin/qmake -spec qws/linux-$(QT_EMB_PLATFORM)-g++
 ################################################################################
 define QT_QMAKE_SET
        $(SED) '/$(1)/d' $(3)/mkspecs/qws/linux-$(QT_EMB_PLATFORM)-g++/qmake.conf
-       $(SED) '/include.*qws.conf/a$(1) = $(2)' $(3)/mkspecs/qws/linux-$(QT_EMB_PLATFORM)-g++/qmake.conf
+       $(SED) "/include.*qws.conf/a$(1) = $(2)" $(3)/mkspecs/qws/linux-$(QT_EMB_PLATFORM)-g++/qmake.conf
 endef
 
 ifneq ($(QT_CONFIG_FILE),)
index 6a88305a15227f960a80728272994c2e07cdf133..14b3503937732bf6f87ce50293346561fba836b0 100644 (file)
@@ -19,7 +19,7 @@ TCPDUMP_CONF_OPTS = \
 TCPDUMP_DEPENDENCIES = zlib libpcap
 
 ifeq ($(BR2_STATIC_LIBS),y)
-TCPDUMP_CONF_OPTS += LIBS="$(shell $(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs)"
+TCPDUMP_CONF_OPTS += LIBS="`$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`"
 endif
 
 # make install installs an unneeded extra copy of the tcpdump binary
index 1dbe453f4d6395f12cb054a0a2b2c3f79ebd37ff..f6bd08f14b9ca5bc9483cc699ebc327ac1b7ca15 100644 (file)
@@ -16,9 +16,9 @@ TCPREPLAY_CONF_OPTS = --with-libpcap=$(STAGING_DIR)/usr
 TCPREPLAY_DEPENDENCIES = libpcap
 
 # libpcap may depend on symbols in other libs
-TCPREPLAY_LIBS = $(shell $(STAGING_DIR)/usr/bin/pcap-config --static --libs)
-TCPREPLAY_CONF_ENV += ac_cv_search_pcap_close='$(TCPREPLAY_LIBS)' \
-       LIBS="$(TCPREPLAY_LIBS)"
+TCPREPLAY_LIBS = $(STAGING_DIR)/usr/bin/pcap-config --static --libs
+TCPREPLAY_CONF_ENV += ac_cv_search_pcap_close="`$(TCPREPLAY_LIBS)`" \
+       LIBS="`$(TCPREPLAY_LIBS)`"
 
 ifeq ($(BR2_PACKAGE_TCPDUMP),y)
 TCPREPLAY_CONF_ENV += ac_cv_path_tcpdump_path=/usr/sbin/tcpdump
index 3141219f9f56bf2bbb886b37b21477a8d0134562..06aca6d409ca2dfebc777fb3a06a38c23ca33dd6 100644 (file)
@@ -10,8 +10,8 @@ TI_UTILS_DEPENDENCIES = libnl host-pkgconf
 TI_UTILS_LICENSE = BSD-3c
 TI_UTILS_LICENSE_FILES = COPYING
 
-TI_UTILS_CFLAGS = $(shell $(PKG_CONFIG_HOST_BINARY) --cflags libnl-genl-3.0)
-TI_UTILS_LIBS = $(shell $(PKG_CONFIG_HOST_BINARY) --libs libnl-genl-3.0)
+TI_UTILS_CFLAGS = `$(PKG_CONFIG_HOST_BINARY) --cflags libnl-genl-3.0`
+TI_UTILS_LIBS = `$(PKG_CONFIG_HOST_BINARY) --libs libnl-genl-3.0`
 
 define TI_UTILS_BUILD_CMDS
        $(MAKE1) NFSROOT="$(STAGING_DIR)" \
index 9531b61afca26dc1a2d499bbf8a4d4583351df38..8dde87dc72f17aed959c2ced87e49700090905a8 100644 (file)
@@ -19,7 +19,7 @@ ifeq ($(BR2_STATIC_LIBS),y)
 # manually pass it to make.
 UPMPDCLI_DEPENDENCIES += host-pkgconf
 UPMPDCLI_MAKE_OPTS = \
-       LIBS='$(shell $(PKG_CONFIG_HOST_BINARY) --libs expat libcurl libupnp)'
+       LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs expat libcurl libupnp`"
 endif
 
 # Upmpdcli only runs if user upmpdcli exists
index 3091f06d4edc99d41f7f1319ba235e844758b6a6..e5b505dcc5d3d9ddd656d4ecd8b8539abb0b1a98 100644 (file)
@@ -24,7 +24,7 @@ endif
 
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 VSFTPD_DEPENDENCIES += openssl host-pkgconf
-VSFTPD_LIBS += $(shell $(PKG_CONFIG_HOST_BINARY) --libs libssl libcrypto)
+VSFTPD_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs libssl libcrypto`
 VSFTPD_POST_CONFIGURE_HOOKS += VSFTPD_ENABLE_SSL
 endif
 
index d6b849a1c9b05bbf8e72982f374de3f451717134..a8237164a251ae1529c8fb8be3834456099f885d 100644 (file)
@@ -11,7 +11,7 @@ XL2TP_LICENSE = GPLv2
 XL2TP_LICENSE_FILES = LICENSE
 
 ifeq ($(BR2_STATIC_LIBS),y)
-XL2TP_LDLIBS = LDLIBS="$(shell $(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs)"
+XL2TP_LDLIBS = LDLIBS="`$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`"
 endif
 
 define XL2TP_BUILD_CMDS