Subject: bsd.dep.mk problem: mkdep vs. -nostdinc++
To: None <tech-toolchain@netbsd.org>
From: Thomas Klausner <wiz@netbsd.org>
List: tech-toolchain
Date: 05/27/2003 23:49:08
Hi!
I need bsd.dep.mk to recognize .cpp files as C++ files for
the groff update.
I committed the following patch:
Index: src/share/mk/bsd.dep.mk
diff -u src/share/mk/bsd.dep.mk:1.40 src/share/mk/bsd.dep.mk:1.41
--- src/share/mk/bsd.dep.mk:1.40 Thu May 8 20:39:00 2003
+++ src/share/mk/bsd.dep.mk Tue May 27 19:30:45 2003
@@ -42,7 +42,7 @@
${MKDEP} -a ${MKDEPFLAGS} \
${OBJCFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \
fi
- @files="${.ALLSRC:M*.cc} ${.ALLSRC:M*.C} ${.ALLSRC:M*.cxx}"; \
+ @files="${.ALLSRC:M*.cc} ${.ALLSRC:M*.cpp} ${.ALLSRC:M*.C} ${.ALLSRC:M*.cxx}"; \
if [ "$$files" != " " ]; then \
echo ${MKDEP} -a ${MKDEPFLAGS} \
${CXXFLAGS:M-[ID]*:Q} ${CPPFLAGS:Q} $$files; \
@@ -59,6 +59,7 @@
SRCS_M = ${SRCS:M*.m} ${DPSRCS:M*.m}
SRCS_X = ${SRCS:M*.C} ${DPSRCS:M*.C} \
${SRCS:M*.cc} ${DPSRCS:M*.cc} \
+ ${SRCS:M*.cpp} ${DPSRCS:M*.cpp} \
${SRCS:M*.cxx} ${DPSRCS:M*.cxx}
.depend: ${SRCS} ${DPSRCS} \
The second part is #ifdef CYGWIN, so let's ignore it for now.
updating cache config.cache
configure: creating ./config.status
config.status: creating defs.mk
config.status: creating config.h
/home/wiz/cvs/src/tools/obj.i386/tools.NetBSD-1.6L-i386/bin/nbhost-mkdep -a -I. -I./include -I/home/wiz/cvs/src/tools/compat -DHA
VE_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_NETBSD_SOURCE -D__DBINTERFACE_PRIVATE [lots of filenames]
/home/wiz/cvs/src/tools/obj.i386/tools.NetBSD-1.6L-i386/bin/nbhost-mkdep -a -I. -I./include -I/home/wiz/cvs/src/tools/compat -DHA
VE_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_NETBSD_SOURCE -D__DBINTERFACE_PRIVATE
/home/wiz/cvs/src/tools/obj.i386/tools.NetBSD-1.6L-i386/bin/nbhost-mkdep: unknown option: -nostdinc++
The -nostdinc++ line comes from this block:
@files="${.ALLSRC:M*.cc} ${.ALLSRC:M*.C} ${.ALLSRC:M*.cxx}"; \
if [ "$$files" != " " ]; then \
echo ${MKDEP} -a ${MKDEPFLAGS} \
${CXXFLAGS:M-[ID]*:Q} ${CPPFLAGS:Q} $$files; \
${MKDEP} -a ${MKDEPFLAGS} \
${CXXFLAGS:M-[ID]*} ${DESTDIR:D-nostdinc++ ${CPPFLAG_ISYSTEM} ${DESTDIR}/usr/include/g++} ${CPPFLAGS} $$files; \
fi
Why does mkdep not recognize and handle it?
Or shouldn't it be there at all?
Thomas
[I backed the patch out for now.]