diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2009-03-31 15:07:40 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2009-03-31 15:07:40 +0000 |
commit | e7c2a0e98b6ddb91ba109b53644aed4b9b89123d (patch) | |
tree | a59fd00b70db2425cec3860ebaa9bc6caee484f6 /makefiles/Makefile.top | |
parent | 0147e86cbabb8000602751c3b8deef4ad50f6374 (diff) | |
download | buildsystem-e7c2a0e98b6ddb91ba109b53644aed4b9b89123d.tar.gz buildsystem-e7c2a0e98b6ddb91ba109b53644aed4b9b89123d.tar.bz2 |
Allow required packages to be constructed based upon the build configuration
svn path=/trunk/tools/buildsystem/; revision=7014
Diffstat (limited to 'makefiles/Makefile.top')
-rw-r--r-- | makefiles/Makefile.top | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/makefiles/Makefile.top b/makefiles/Makefile.top index 34f79ad..4b4b291 100644 --- a/makefiles/Makefile.top +++ b/makefiles/Makefile.top @@ -24,6 +24,7 @@ # HOST Host platform identifier # PREFIX Absolute installation path prefix # (defaults to /usr/local) +# REQUIRED_PKGS List of required pkg-config packages # # The client may also override all toolchain settings, including: # @@ -216,9 +217,18 @@ distclean: clean # # We also permit a trailing ';' in the file list. +__comma := , +__empty := +__space := $(empty) $(empty) +__required = $(subst $(__space),$(__comma) ,$(strip $(REQUIRED_PKGS))) + # Install a pkg-config control file ($1) to the specified location ($2) define install_pkgconfig $(Q)$(SED) -e 's#PREFIX#$(PREFIX)#' $1 >$(BUILDDIR)/$(1:.in=) + $(if $(REQUIRED_PKGS), \ + $(Q)$(SED) -i -e 's#REQUIRED#Requires: $(__required)#' \ + $(BUILDDIR)/$(1:.in=), \ + $(Q)$(SED) -i -e 's#REQUIRED##' $(BUILDDIR)/$(1:.in=)) $(INSTALL) $(INSTALLFLAGS) -m 644 $(BUILDDIR)/$(1:.in=) $2 endef |