From e0de7fd0344ea987bf99ffe61c8f5c30f896e3d5 Mon Sep 17 00:00:00 2001 From: Christophe de Dinechin Date: Tue, 3 Apr 2018 19:10:42 +0200 Subject: [PATCH] Install configuration sources The configuration sources are installed in /usr[/local]/lib/make-it-quick The config.local-setup.mk contains installation-dependent setup. --- Makefile | 9 ++++++++- config.mk | 4 ++++ rules.mk | 4 ++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 956d8c0..0d565fd 100644 --- a/Makefile +++ b/Makefile @@ -35,10 +35,17 @@ HDR_INSTALL= \ config.unix.mk \ config.vs2013-64.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 BUILD=./ include $(BUILD)rules.mk TESTS=example/ + +config.local-setup.mk: + $(PRINT_GENERATE) echo > $@ CONFIG_SOURCES=$(PREFIX_LIB)make-it-quick/ diff --git a/config.mk b/config.mk index 73fbb3a..4029d8d 100644 --- a/config.mk +++ b/config.mk @@ -58,6 +58,10 @@ TO_INSTALL= $(OUTPUT_EXE:%=%.install_exe) \ $(DLL_INSTALL:%=%.install_dll) \ $(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 CLANG_FORMAT_SOURCES=$(SOURCES) $(HDR_INSTALL) diff --git a/rules.mk b/rules.mk index fd414ef..3195af5 100644 --- a/rules.mk +++ b/rules.mk @@ -442,11 +442,11 @@ $(OBJDIR)CFG-LIB_HAVE_lib%.c: $(PKG_DEPS) # Check if a function is present $(OBJDIR)CFG_HAVE_%.h: $(OBJDIR)CFG-FN_HAVE_%.c $(CONFIG_DEPS) $(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 $< $@ $(OBJDIR)CFG-FN_HAVE_%.c: config/HAVE_%.c $(CONFIG_DEPS) $(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 $< $@ $(OBJDIR)CFG-FN_HAVE_%.c: config/check_%.c $(CONFIG_DEPS) $(PRINT_COMMAND) cp $< $@