Add ability to put different package headers than install path

The SPICE protocol package installs headers in /usr/include/spice-1/spice,
but then returns -I/usr/include/spice-1, the code using #include <spice/blah.h>
So adding one level of indirection to deal with that case.
This commit is contained in:
Christophe de Dinechin 2018-06-19 18:19:44 +02:00
parent a71249c34d
commit b42abcf3cc
2 changed files with 8 additions and 3 deletions

View File

@ -69,6 +69,11 @@ PACKAGE_DIR?=$(PACKAGE_NAME:%=%/)
PACKAGE_LIBS=$(MIQ_PRODLIB) PACKAGE_LIBS=$(MIQ_PRODLIB)
PACKAGE_DLLS=$(MIQ_PRODDLL) PACKAGE_DLLS=$(MIQ_PRODDLL)
# Package configuration directories by default
PACKAGE_PREFIX?=$(PREFIX)
PACKAGE_PREFIX_LIB?=$(PREFIX_LIB)
PACKAGE_PREFIX_HDR?=$(PREFIX_HDR)
# Local setup - Location of configuration files, etc (tweaked at install time) # Local setup - Location of configuration files, etc (tweaked at install time)
-include $(MIQ)config.local-setup.mk -include $(MIQ)config.local-setup.mk
CONFIG_SOURCES?=$(MIQ)config/ CONFIG_SOURCES?=$(MIQ)config/

View File

@ -596,10 +596,10 @@ benchmark: $(BENCHMARKS:%=%.benchmark)
MIQ_PACKAGELIBS=$(PACKAGE_LIBS:%.lib=$(LINK_LIB_OPT)%) \ MIQ_PACKAGELIBS=$(PACKAGE_LIBS:%.lib=$(LINK_LIB_OPT)%) \
$(PACKAGE_DLLS:%.dll=$(LINK_DLL_OPT)%) $(PACKAGE_DLLS:%.dll=$(LINK_DLL_OPT)%)
MIQ_GENPC= \ MIQ_GENPC= \
(echo 'prefix=$(PREFIX:%/=%)' ;\ (echo 'prefix=$(PACKAGE_PREFIX:%/=%)' ;\
echo 'exec_prefix=$${prefix}' ;\ echo 'exec_prefix=$${prefix}' ;\
echo 'libdir=$(PREFIX_LIB:%/=%)' ;\ echo 'libdir=$(PACKAGE_PREFIX_LIB:%/=%)' ;\
echo 'includedir=$(PREFIX_HDR:%/=%)' ;\ echo 'includedir=$(PACKAGE_PREFIX_HDR:%/=%)' ;\
echo 'Name: $(PACKAGE_NAME)' ;\ echo 'Name: $(PACKAGE_NAME)' ;\
echo 'Description: $(PACKAGE_DESCRIPTION)' ;\ echo 'Description: $(PACKAGE_DESCRIPTION)' ;\
echo 'Version: $(PACKAGE_VERSION)' ;\ echo 'Version: $(PACKAGE_VERSION)' ;\