Patrick Wildt <[email protected]> writes:

> Hi,
>
> the LLVM project apparently uses the .cpp extension for all their C++
> files.  We already handle .cpp in sys.mk, but make depend does not
> handle .cpp at all.  This means that on "make depend" no .depend file
> will be generated if there are only .cpp source files.  But as SRCS is
> set it will still expect an .depend file and throw an error.  Simply
> pick up .cpp files to fix this.

ok

> Patrick
>
> diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk
> index 55f75b0..16280a9 100644
> --- a/share/mk/bsd.dep.mk
> +++ b/share/mk/bsd.dep.mk
> @@ -20,8 +20,8 @@ realdepend: _SUBDIRUSE
>         echo mkdep -a ${MKDEP} ${CFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \
>         mkdep -a ${MKDEP} ${CFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \
>       fi
> -     @files="${.ALLSRC:M*.cc} ${.ALLSRC:M*.C} ${.ALLSRC:M*.cxx}"; \
> -     if [ "$$files" != "  " ]; then \
> +     @files="${.ALLSRC:M*.cc} ${.ALLSRC:M*.C} ${.ALLSRC:M*.cpp} 
> ${.ALLSRC:M*.cxx}"; \
> +     if [ "$$files" != "   " ]; then \
>         echo mkdep -a ${MKDEP} ${CXXFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \
>         mkdep -a ${MKDEP} ${CXXFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \
>       fi
>

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to