-# $DragonFly: src/sys/conf/kern.fwd.mk,v 1.7 2007/01/10 16:41:37 corecode Exp $
-
# Create forwarding headers for ${SYSDIR}/cpu/${MACHINE_ARCH}/*.h in
# ${_MACHINE_FWD}/include/machine and share the directory among module build
# directories.
@touch ${.TARGET}
${_FWDHDRS}:
+.if defined(.PARSEDIR)
+ @(echo "creating machine/ forwarding header ${.TARGET}" 1>&2; \
+ echo "/*" ; \
+ echo " * CONFIG-GENERATED FILE, DO NOT EDIT" ; \
+ echo " */" ; \
+ echo ; \
+ echo "#ifndef _MACHINE_${.TARGET:T:S/./_/g:tu}_" ; \
+ echo "#define _MACHINE_${.TARGET:T:S/./_/g:tu}_" ; \
+ echo "#include <cpu/${.TARGET:T}>" ; \
+ echo "#endif" ; \
+ echo) > ${.TARGET}
+.else
+ # LEGACY MAKE - REMOVE FOR DFLY 3.6
@(echo "creating machine/ forwarding header ${.TARGET}" 1>&2; \
echo "/*" ; \
echo " * CONFIG-GENERATED FILE, DO NOT EDIT" ; \
echo "#include <cpu/${.TARGET:T}>" ; \
echo "#endif" ; \
echo) > ${.TARGET}
+.endif
${_LHDRS}:
+.if defined(.PARSEDIR)
+ @(echo "creating sys/ forwarding header ${.TARGET}" 1>&2; \
+ echo "/*" ; \
+ echo " * CONFIG-GENERATED FILE, DO NOT EDIT" ; \
+ echo " */" ; \
+ echo ; \
+ echo "#ifndef _${.TARGET:T:S/./_/g:tu}_" ; \
+ echo "#define _${.TARGET:T:S/./_/g:tu}_" ; \
+ echo "#include <sys/${.TARGET:T}>" ; \
+ echo "#endif" ; \
+ echo) > ${.TARGET}
+.else
+ # LEGACY MAKE - REMOVE FOR DFLY 3.6
@(echo "creating sys/ forwarding header ${.TARGET}" 1>&2; \
echo "/*" ; \
echo " * CONFIG-GENERATED FILE, DO NOT EDIT" ; \
echo "#include <sys/${.TARGET:T}>" ; \
echo "#endif" ; \
echo) > ${.TARGET}
+.endif