Install configuration sources

The configuration sources are installed in /usr[/local]/lib/make-it-quick
The config.local-setup.mk contains installation-dependent setup.
This commit is contained in:
Christophe de Dinechin 2018-04-03 19:10:42 +02:00
parent 198ad6420d
commit e0de7fd034
3 changed files with 14 additions and 3 deletions

View File

@ -35,10 +35,17 @@ HDR_INSTALL= \
config.unix.mk \ config.unix.mk \
config.vs2013-64.mk \ config.vs2013-64.mk \
config.vs2013.mk \ config.vs2013.mk \
rules.mk rules.mk \
config.local-setup..mk
PREFIX_LIB=$(PREFIX)lib/make-it-quick/config/
LIB_INSTALL=$(wildcard config/check*.c)
# Include the makefile rules with special BUILD path # Include the makefile rules with special BUILD path
BUILD=./ BUILD=./
include $(BUILD)rules.mk include $(BUILD)rules.mk
TESTS=example/ TESTS=example/
config.local-setup.mk:
$(PRINT_GENERATE) echo > $@ CONFIG_SOURCES=$(PREFIX_LIB)make-it-quick/

View File

@ -58,6 +58,10 @@ TO_INSTALL= $(OUTPUT_EXE:%=%.install_exe) \
$(DLL_INSTALL:%=%.install_dll) \ $(DLL_INSTALL:%=%.install_dll) \
$(HDR_INSTALL:%=%.install_hdr) $(HDR_INSTALL:%=%.install_hdr)
# Local setup - Location of configuration files, etc (tweaked at install time)
-include $(BUILD)config.local-setup.mk
CONFIG_SOURCES?=/usr/lib/make-it-quick/
# Sources to reformat # Sources to reformat
CLANG_FORMAT_SOURCES=$(SOURCES) $(HDR_INSTALL) CLANG_FORMAT_SOURCES=$(SOURCES) $(HDR_INSTALL)

View File

@ -442,11 +442,11 @@ $(OBJDIR)CFG-LIB_HAVE_lib%.c: $(PKG_DEPS)
# Check if a function is present # Check if a function is present
$(OBJDIR)CFG_HAVE_%.h: $(OBJDIR)CFG-FN_HAVE_%.c $(CONFIG_DEPS) $(OBJDIR)CFG_HAVE_%.h: $(OBJDIR)CFG-FN_HAVE_%.c $(CONFIG_DEPS)
$(PRINT_CONFIG) $(FN_CONFIG) $(PRINT_CONFIG) $(FN_CONFIG)
$(OBJDIR)CFG-FN_HAVE_%.c: $(BUILD)config/HAVE_%.c $(CONFIG_DEPS) $(OBJDIR)CFG-FN_HAVE_%.c: $(CONFIG_SOURCES)config/HAVE_%.c $(CONFIG_DEPS)
$(PRINT_COMMAND) cp $< $@ $(PRINT_COMMAND) cp $< $@
$(OBJDIR)CFG-FN_HAVE_%.c: config/HAVE_%.c $(CONFIG_DEPS) $(OBJDIR)CFG-FN_HAVE_%.c: config/HAVE_%.c $(CONFIG_DEPS)
$(PRINT_COMMAND) cp $< $@ $(PRINT_COMMAND) cp $< $@
$(OBJDIR)CFG-FN_HAVE_%.c: $(BUILD)config/check_%.c $(CONFIG_DEPS) $(OBJDIR)CFG-FN_HAVE_%.c: $(CONFIG_SOURCES)config/check_%.c $(CONFIG_DEPS)
$(PRINT_COMMAND) cp $< $@ $(PRINT_COMMAND) cp $< $@
$(OBJDIR)CFG-FN_HAVE_%.c: config/check_%.c $(CONFIG_DEPS) $(OBJDIR)CFG-FN_HAVE_%.c: config/check_%.c $(CONFIG_DEPS)
$(PRINT_COMMAND) cp $< $@ $(PRINT_COMMAND) cp $< $@