Module Name: src
Committed By: christos
Date: Sun Dec 9 21:48:04 UTC 2012
Modified Files:
src/tools/compat: Makefile
Log Message:
handle the list of files and directories generated dynamically by configure
To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/tools/compat/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tools/compat/Makefile
diff -u src/tools/compat/Makefile:1.64 src/tools/compat/Makefile:1.65
--- src/tools/compat/Makefile:1.64 Sun Dec 9 14:15:48 2012
+++ src/tools/compat/Makefile Sun Dec 9 16:48:04 2012
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.64 2012/12/09 19:15:48 christos Exp $
+# $NetBSD: Makefile,v 1.65 2012/12/09 21:48:04 christos Exp $
.include <bsd.own.mk>
@@ -76,7 +76,11 @@ defs.mk: config.cache
@touch ${.TARGET}
INCFILES= nbtool_config.h
-INCSUBDIRS= sys machine rpc arpa
+# Generate the list of include files generated by configure the ./ is so that
+# the list is not empty.
+_INCCONFFILES!= cd include && find . -name '*.h' && echo ./
+INCCONFFILES= ${_INCCONFFILES:S@./@@}
+INCSUBDIRS= ${INCCONFFILES:H:O:u:N.}
CLEANDIRFILES+= ${INCFILES}
# CLEANDIRFILES may not contain directory names
@@ -92,7 +96,7 @@ include/.stamp:
HOST_LIBDIR= ${TOOLDIR}/lib
HOST_INCSDIR= ${TOOLDIR}/include
-HOST_SHAREDIR= ${TOOLDIR}/share
+HOST_SHAREDIR= ${TOOLDIR}/share
install: .PHONY install.lib includes install.defs.mk
@@ -110,6 +114,13 @@ ${HOST_INCSDIR}/compat/${_f}: ${_f}
${HOST_INSTALL_FILE} ${.ALLSRC} ${.TARGET}
.endfor
+.for _f in ${INCCONFFILES}
+HOST_INCINSTFILES+= ${HOST_INCSDIR}/compat/${_f}
+${HOST_INCSDIR}/compat/${_f}: include/${_f}
+ ${_MKTARGET_INSTALL}
+ ${HOST_INSTALL_FILE} ${.ALLSRC} ${.TARGET}
+.endfor
+
.for _d in ${INCSUBDIRS}
HOST_INCINSTDIRS+= ${HOST_INCSDIR}/compat/${_d}
${HOST_INCSDIR}/compat/${_d}: