install: Select which kind of files go in package subdirectory
By default, headers, share, doc, license, config and var go into a per-package subdirectory, i.e. install in `/usr/include/my-package` or `/usr/local/share/my-ackage`. Binaries and libraries go at the top of the corresponding directory by default. Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
This commit is contained in:
parent
91591b99f8
commit
bdf6542c8b
11
config.mk
11
config.mk
|
@ -122,6 +122,14 @@ PACKAGE_DIR?=$(PACKAGE_NAME:%=%/)
|
|||
PACKAGE_LIBS=$(MIQ_PRODLIB)
|
||||
PACKAGE_DLLS=$(MIQ_PRODDLL)
|
||||
|
||||
# Install headers, docs and var items in package subdirectory by default
|
||||
PACKAGE_DIR.header?=$(PACKAGE_DIR)
|
||||
PACKAGE_DIR.share?=$(PACKAGE_DIR)
|
||||
PACKAGE_DIR.doc?=$(PACKAGE_DIR)
|
||||
PACKAGE_DIR.license?=$(PACKAGE_DIR)
|
||||
PACKAGE_DIR.config?=$(PACKAGE_DIR)
|
||||
PACKAGE_DIR.var?=$(PACKAGE_DIR)
|
||||
|
||||
# Location of configuration files, etc (tweaked at install time)
|
||||
CONFIG_SOURCES?=$(MIQ)config/
|
||||
|
||||
|
@ -158,12 +166,13 @@ PREFIX.pkgconfig=$(PREFIX.share)pkgconfig/
|
|||
# but to install headers and data items under a directory named after project
|
||||
define package-install
|
||||
|
||||
PACKAGE_INSTALL.$1?=$$(DESTDIR)$$(PREFIX.$1)
|
||||
PACKAGE_INSTALL.$1?=$$(DESTDIR)$$(PREFIX.$1)$$(PACKAGE_DIR.$1)
|
||||
|
||||
endef
|
||||
$(eval $(foreach i,$(INSTALLABLE),$(call package-install,$i)))
|
||||
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Compilation flags
|
||||
#------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue