From: Alan T. DeKok Date: Fri, 17 Aug 2018 16:08:50 +0000 (-0400) Subject: better way to install headers X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dd2b33714f010735a2a4b124f4e059928f7edf5a;p=thirdparty%2Ffreeradius-server.git better way to install headers --- diff --git a/scripts/boiler.mk b/scripts/boiler.mk index c18fa94778f..2efabe51393 100644 --- a/scripts/boiler.mk +++ b/scripts/boiler.mk @@ -340,6 +340,7 @@ define INCLUDE_SUBMAKEFILE TGT_CHECK_LIBS := SOURCES := + HEADERS := SRC_CFLAGS := SRC_CXXFLAGS := SRC_DEFS := @@ -435,6 +436,7 @@ define INCLUDE_SUBMAKEFILE # Save the list of source files for this target. $${TGT}_SOURCES += $${SOURCES} + $${TGT}_HEADERS += $${HEADERS} # Convert the source file names to their corresponding object file # names. @@ -506,6 +508,12 @@ define INCLUDE_SUBMAKEFILE # add rules to build the target $$(eval $$(call ADD_TARGET_RULE$${$${TGT}_SUFFIX},$${TGT})) + # add rules to install the header files + ifneq "${HEADERS}" "" + $(foreach h, ${HEADERS},\ + $(eval $(call ADD_INSTALL_RULE.h,${h},src/include/${h}))) + endif + # generate the clean rule for this target. $$(eval $$(call ADD_CLEAN_RULE,$${TGT})) @@ -674,10 +682,6 @@ endif $(foreach D,$(patsubst %/,%,$(sort $(dir ${ALL_INSTALL}))),\ $(eval $(call ADD_INSTALL_RULE.dir,${D}))) -# Install all of the header files -$(foreach h, $(ALL_HEADERS),\ - $(eval $(call ADD_INSTALL_RULE.h,${h},src/include/${h}))) - scan: ${ALL_PLISTS} .PHONY: clean.scan diff --git a/src/include/all.mk b/src/include/all.mk index 1b1cc70d0d5..20a15e72128 100644 --- a/src/include/all.mk +++ b/src/include/all.mk @@ -108,11 +108,6 @@ src/freeradius-devel: BOOTSTRAP_BUILD += src/freeradius-devel $(addprefix src/include/,$(HEADERS_DY)) $(HEADERS_RFC) scan: $(BOOTSTRAP_BUILD) -###################################################################### -# -# Installation -ALL_HEADERS += $(HEADERS) - # # Regenerate the headers if we re-run autoconf. # This is to that changes to the build rules (e.g. PW_FOO -> FR_FOO)