Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/share/mk/bsd.prog.mk,v rcsdiff: /ftp/cvs/cvsroot/src/share/mk/bsd.prog.mk,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.25 retrieving revision 1.26 diff -u -p -r1.25 -r1.26 --- src/share/mk/bsd.prog.mk 1993/08/15 19:37:10 1.25 +++ src/share/mk/bsd.prog.mk 1993/08/15 20:42:43 1.26 @@ -1,5 +1,5 @@ # from: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91 -# $Id: bsd.prog.mk,v 1.25 1993/08/15 19:37:10 mycroft Exp $ +# $Id: bsd.prog.mk,v 1.26 1993/08/15 20:42:43 mycroft Exp $ .if exists(${.CURDIR}/../Makefile.inc) .include "${.CURDIR}/../Makefile.inc" @@ -7,17 +7,8 @@ .SUFFIXES: .out .o .c .cc .C .y .l .s .8 .7 .6 .5 .4 .3 .2 .1 .0 -.8.0 .7.0 .6.0 .5.0 .4.0 .3.0 .2.0 .1.0: - nroff -mandoc ${.IMPSRC} > ${.TARGET} - CFLAGS+= ${COPTS} -STRIP?= -s - -BINGRP?= bin -BINOWN?= bin -BINMODE?= 555 - LIBCRT0?= /usr/lib/crt0.o LIBC?= /usr/lib/libc.a LIBCOMPAT?= /usr/lib/libcompat.a @@ -51,11 +42,13 @@ CLEANFILES+=strings ${CXX} -E ${CXXFLAGS} ${.IMPSRC} | xstr -c - @mv -f x.c x.cc @${CXX} ${CXXFLAGS} -c x.cc -o ${.TARGET} + @rm -f x.cc .C.o: ${CXX} -E ${CXXFLAGS} ${.IMPSRC} | xstr -c - @mv -f x.c x.C @${CXX} ${CXXFLAGS} -c x.C -o ${.TARGET} + @rm -f x.C .endif .if defined(PROG) @@ -65,19 +58,19 @@ OBJS+= ${SRCS:N*.h:R:S/$/.o/g} .if defined(LDONLY) -${PROG}: ${LIBCRT0} ${LIBC} ${OBJS} ${DPADD} +${PROG}: ${LIBCRT0} ${OBJS} ${LIBC} ${DPADD} ${LD} ${LDFLAGS} -o ${.TARGET} ${LIBCRT0} ${OBJS} ${LIBC} ${LDADD} .else defined(LDONLY) -${PROG}: ${OBJS} ${LIBC} ${DPADD} +${PROG}: ${LIBCRT0} ${OBJS} ${LIBC} ${DPADD} ${CC} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} .endif -.else defined(PROG) +.else -SRCS= ${PROG}.c +SRCS= ${PROG}.c ${PROG}: ${SRCS} ${LIBC} ${DPADD} ${CC} ${LDFLAGS} ${CFLAGS} -o ${.TARGET} ${.CURDIR}/${SRCS} ${LDADD} @@ -93,41 +86,14 @@ MAN1= ${PROG}.0 .endif .endif -.if !defined(NOMAN) -MANALL= ${MAN1} ${MAN2} ${MAN3} ${MAN4} ${MAN5} ${MAN6} ${MAN7} ${MAN8} -.endif - -_PROGSUBDIR: .USE -.if defined(SUBDIR) && !empty(SUBDIR) - @for entry in ${SUBDIR}; do \ - (echo "===> $$entry"; \ - if test -d ${.CURDIR}/$${entry}.${MACHINE}; then \ - cd ${.CURDIR}/$${entry}.${MACHINE}; \ - else \ - cd ${.CURDIR}/$${entry}; \ - fi; \ - ${MAKE} ${.TARGET:S/realinstall/install/:S/.depend/depend/}); \ - done -.endif - .MAIN: all -all: ${PROG} ${MANALL} _PROGSUBDIR +all: ${PROG} .if !target(clean) -clean: _PROGSUBDIR +clean: rm -f a.out [Ee]rrs mklog core ${PROG} ${OBJS} ${CLEANFILES} .endif -.if !target(cleandir) -cleandir: _PROGSUBDIR - rm -f a.out [Ee]rrs mklog core ${PROG} ${OBJS} ${CLEANFILES} - rm -f .depend ${MANALL} -.endif - -# some of the rules involve .h sources, so remove them from mkdep line -.include -depend: _PROGSUBDIR - .if !target(install) .if !target(beforeinstall) beforeinstall: @@ -140,7 +106,7 @@ afterinstall: .endif .if !target(realinstall) -realinstall: _PROGSUBDIR +realinstall: .if defined(PROG) install ${COPY} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ ${PROG} ${DESTDIR}${BINDIR} @@ -171,23 +137,18 @@ realinstall: beforeinstall .endif .if !target(lint) -lint: ${SRCS} _PROGSUBDIR +lint: ${SRCS} .if defined(PROG) @${LINT} ${LINTFLAGS} ${CFLAGS} ${.ALLSRC} | more 2>&1 .endif .endif -.if !target(tags) -tags: ${SRCS} _PROGSUBDIR -.if defined(PROG) - -cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC} | \ - sed "s;\${.CURDIR}/;;" > tags -.endif -.endif +cleandir: clean .if !defined(NOMAN) .include .endif .include -obj: _PROGSUBDIR +.include +.include