7d69a79624
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>
83 lines
2.0 KiB
Makefile
83 lines
2.0 KiB
Makefile
################################################################################
|
|
#
|
|
# poppler
|
|
#
|
|
################################################################################
|
|
|
|
POPPLER_VERSION = 0.32.0
|
|
POPPLER_SOURCE = poppler-$(POPPLER_VERSION).tar.xz
|
|
POPPLER_SITE = http://poppler.freedesktop.org
|
|
POPPLER_DEPENDENCIES = fontconfig host-pkgconf
|
|
POPPLER_LICENSE = GPLv2+
|
|
POPPLER_LICENSE_FILES = COPYING
|
|
POPPLER_INSTALL_STAGING = YES
|
|
POPPLER_CONF_OPTS = --with-font-configuration=fontconfig
|
|
|
|
ifeq ($(BR2_PACKAGE_LCMS2),y)
|
|
POPPLER_CONF_OPTS += --enable-cms=lcms2
|
|
POPPLER_DEPENDENCIES += lcms2
|
|
else
|
|
POPPLER_CONF_OPTS += --enable-cms=none
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_TIFF),y)
|
|
POPPLER_CONF_OPTS += --enable-libtiff
|
|
# Help poppler to find libtiff in static linking scenarios
|
|
POPPLER_CONF_ENV += \
|
|
LIBTIFF_LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libtiff-4`"
|
|
POPPLER_DEPENDENCIES += tiff
|
|
else
|
|
POPPLER_CONF_OPTS += --disable-libtiff
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_JPEG),y)
|
|
POPPLER_CONF_OPTS += --enable-libjpeg
|
|
POPPLER_DEPENDENCIES += jpeg
|
|
else
|
|
POPPLER_CONF_OPTS += --disable-libjpeg
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBPNG),y)
|
|
POPPLER_CONF_OPTS += --enable-libpng
|
|
POPPLER_DEPENDENCIES += libpng
|
|
else
|
|
POPPLER_CONF_OPTS += --disable-libpng
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
|
POPPLER_CONF_OPTS += --enable-zlib
|
|
POPPLER_DEPENDENCIES += zlib
|
|
else
|
|
POPPLER_CONF_OPTS += --disable-zlib
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_POPPLER_LIBCURL),y)
|
|
POPPLER_CONF_OPTS += --enable-libcurl
|
|
POPPLER_DEPENDENCIES += libcurl
|
|
else
|
|
POPPLER_CONF_OPTS += --disable-libcurl
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_XORG7),y)
|
|
POPPLER_CONF_OPTS += --with-x
|
|
POPPLER_DEPENDENCIES += xlib_libX11 xlib_libXext
|
|
else
|
|
POPPLER_CONF_OPTS += --without-x
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_POPPLER_QT),y)
|
|
POPPLER_DEPENDENCIES += qt
|
|
POPPLER_CONF_OPTS += --enable-poppler-qt4
|
|
else
|
|
POPPLER_CONF_OPTS += --disable-poppler-qt4
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_OPENJPEG),y)
|
|
POPPLER_DEPENDENCIES += openjpeg
|
|
POPPLER_CONF_OPTS += --enable-libopenjpeg=openjpeg1
|
|
else
|
|
POPPLER_CONF_OPTS += --enable-libopenjpeg=none
|
|
endif
|
|
|
|
$(eval $(autotools-package))
|