From: Alan T. DeKok Date: Fri, 25 Dec 2020 16:42:40 +0000 (-0500) Subject: clean up and fix build rules X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16d9a84404083adeb47e0b1fc095d7f04b91fb0c;p=thirdparty%2Ffreeradius-server.git clean up and fix build rules --- diff --git a/src/include/all.mk b/src/include/all.mk index c03b3b2e89a..f332f74cd87 100644 --- a/src/include/all.mk +++ b/src/include/all.mk @@ -133,20 +133,18 @@ SRC_INCLUDE_DIR := ${R}${includedir}/freeradius # # install the headers by re-writing the local files # -# install-sh function for creating directories gets confused -# if there's a trailing slash, tries to create a directory -# it already created, and fails... +# You would like the order dependency on the directory to work. But +# GNU Make is stupid, and doesn't pay attention to either its' +# documentation, or what we want. # -${SRC_INCLUDE_DIR}/%.h: src/include/%.h | $(SRC_INCLUDE_DIR) +${SRC_INCLUDE_DIR}/%.h: src/include/%.h | $(patsubst %/,%,$(dir $@)) + @$(PROGRAM_INSTALL) -d -m 755 $(patsubst %/,%,$(dir $@)) @echo INSTALL $(subst src/include,freeradius-server,$<) - ${Q}$(INSTALL) -d -m 755 `echo $(dir $@) | sed 's/\/$$//'` # Expression must deal with indentation after the hash and copy it to the substitution string. # Hash not anchored to allow substitution in function documentation. ${Q}sed -e 's/#\([\\t ]*\)include ]*\)>/#\1include /g' < $< > $@ ${Q}chmod 644 $@ -all: $(addprefix src/include/,$(HEADERS_DY)) - install.src.include: $(addprefix ${SRC_INCLUDE_DIR}/,${HEADERS}) install: install.src.include