packages: use backtick instead of $(shell ...) make function

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>
This commit is contained in:
Arnout Vandecappelle 2015-07-12 16:35:26 +02:00 committed by Thomas Petazzoni
parent b4857df721
commit 7d69a79624
37 changed files with 56 additions and 57 deletions

View 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

View 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

View 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

View 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))

View 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

View 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)

View 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

View 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)

View 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

View 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)"

View 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))

View 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

View 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

View 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

View 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 \

View 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))

View 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

View 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)

View 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))

View 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)

View 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

View 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)"

View 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

View 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

View 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

View 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

View 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 = \

View 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)

View 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)

View 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)

View 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),)

View 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

View 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

View 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)" \

View 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

View 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

View 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