Date: Sat, 3 May 1997 13:31:38 +0400 (MSD) From: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru> To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: misc/3476: Please add support for .cpp suffix to standart BSD makefiles Message-ID: <199705030931.NAA01500@tejblum.dnttm.rssi.ru> Resent-Message-ID: <199705030940.CAA21091@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 3476
>Category: misc
>Synopsis: Please add support for .cpp suffix to standart BSD makefiles
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sat May 3 02:40:01 PDT 1997
>Last-Modified:
>Originator: Dmitrij Tejblum
>Organization:
>Release: FreeBSD 3.0-CURRENT i386
>Environment:
>Description:
The '.cpp' suffix used by some compilers as standard C++ suffix. GNU CC
also knows that .cpp files are in C++. So, standard makefiles should
support the suffix.
>How-To-Repeat:
>Fix:
*** sys.mk.01 Thu Apr 24 15:15:19 1997
--- sys.mk Sat May 3 13:14:56 1997
***************
*** 15,21 ****
.if defined(%POSIX)
.SUFFIXES: .o .c .y .l .a .sh .f
.else
! .SUFFIXES: .out .a .ln .o .c .cc .cxx .C .F .f .e .r .y .l .S .s .cl .p .h .sh
.endif
.LIBS: .a
--- 15,21 ----
.if defined(%POSIX)
.SUFFIXES: .o .c .y .l .a .sh .f
.else
! .SUFFIXES: .out .a .ln .o .c .cc .cxx .cpp .C .F .f .e .r .y .l .S .s .cl .p .h .sh
.endif
.LIBS: .a
***************
*** 168,174 ****
.c.o:
${CC} ${CFLAGS} -c ${.IMPSRC}
! .cc.o .cxx.o .C.o:
${CXX} ${CXXFLAGS} -c ${.IMPSRC}
.p.o:
--- 168,174 ----
.c.o:
${CC} ${CFLAGS} -c ${.IMPSRC}
! .cc.o .cxx.o .C.o .cpp.o:
${CXX} ${CXXFLAGS} -c ${.IMPSRC}
.p.o:
*** bsd.lib.mk.01 Sun Apr 27 18:38:38 1997
--- bsd.lib.mk Sun Apr 27 18:40:31 1997
***************
*** 31,37 ****
# prefer .s to a .c, add .po, remove stuff not used in the BSD libraries
# .so used for PIC object files
.SUFFIXES:
! .SUFFIXES: .out .o .po .so .s .S .c .cc .cxx .m .C .f .y .l
.c.o:
${CC} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
--- 31,37 ----
# prefer .s to a .c, add .po, remove stuff not used in the BSD libraries
# .so used for PIC object files
.SUFFIXES:
! .SUFFIXES: .out .o .po .so .s .S .c .cc .cxx .m .C .f .y .l .cpp
.c.o:
${CC} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
***************
*** 45,59 ****
${CC} ${PICFLAG} -DPIC ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
@${LD} -O ${.TARGET} -x -r ${.TARGET}
! .cc.o .C.o .cxx.o:
${CXX} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
@${LD} -O ${.TARGET} -x -r ${.TARGET}
! .cc.po .C.po .cxx.po:
${CXX} -pg ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
@${LD} -O ${.TARGET} -X -r ${.TARGET}
! .cc.so .C.so .cxx.so:
${CXX} ${PICFLAG} -DPIC ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
@${LD} -O ${.TARGET} -x -r ${.TARGET}
--- 45,59 ----
${CC} ${PICFLAG} -DPIC ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
@${LD} -O ${.TARGET} -x -r ${.TARGET}
! .cc.o .C.o .cxx.o .cpp.o:
${CXX} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
@${LD} -O ${.TARGET} -x -r ${.TARGET}
! .cc.po .C.po .cxx.po .cpp.po:
${CXX} -pg ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
@${LD} -O ${.TARGET} -X -r ${.TARGET}
! .cc.so .C.so .cxx.so .cpp.so:
${CXX} ${PICFLAG} -DPIC ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
@${LD} -O ${.TARGET} -x -r ${.TARGET}
*** bsd.dep.mk.00 Sat May 3 13:03:16 1997
--- bsd.dep.mk Sat May 3 13:03:24 1997
***************
*** 39,45 ****
# .if defined ${SRCS:M*.[sS]} does not work
__depend_s= ${SRCS:M*.[sS]}
__depend_c= ${SRCS:M*.c}
! __depend_cc= ${SRCS:M*.cc} ${SRCS:M*.C} ${SRCS:M*.cxx}
${DEPENDFILE}: ${SRCS}
rm -f ${DEPENDFILE}
--- 39,45 ----
# .if defined ${SRCS:M*.[sS]} does not work
__depend_s= ${SRCS:M*.[sS]}
__depend_c= ${SRCS:M*.c}
! __depend_cc= ${SRCS:M*.cc} ${SRCS:M*.C} ${SRCS:M*.cxx} ${SRCS:M*.cpp}
${DEPENDFILE}: ${SRCS}
rm -f ${DEPENDFILE}
***************
*** 54,60 ****
.if defined(__depend_cc) && !empty(__depend_cc)
${MKDEPCMD} -f ${DEPENDFILE} -a ${MKDEP} \
${CXXFLAGS:M-nostd*} ${CXXFLAGS:M-[ID]*} \
! ${.ALLSRC:M*.cc} ${.ALLSRC:M*.C} ${.ALLSRC:M*.cxx}
.endif
.if target(_EXTRADEPEND)
cd ${.CURDIR}; ${MAKE} _EXTRADEPEND
--- 54,60 ----
.if defined(__depend_cc) && !empty(__depend_cc)
${MKDEPCMD} -f ${DEPENDFILE} -a ${MKDEP} \
${CXXFLAGS:M-nostd*} ${CXXFLAGS:M-[ID]*} \
! ${.ALLSRC:M*.cc} ${.ALLSRC:M*.C} ${.ALLSRC:M*.cxx} ${.ALLSRC:M*.cpp}
.endif
.if target(_EXTRADEPEND)
cd ${.CURDIR}; ${MAKE} _EXTRADEPEND
>Audit-Trail:
>Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199705030931.NAA01500>
