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.lib.mk,v rcsdiff: /ftp/cvs/cvsroot/src/share/mk/bsd.lib.mk,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.99 retrieving revision 1.105 diff -u -p -r1.99 -r1.105 --- src/share/mk/bsd.lib.mk 1997/05/09 05:17:30 1.99 +++ src/share/mk/bsd.lib.mk 1997/05/17 02:01:08 1.105 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.lib.mk,v 1.99 1997/05/09 05:17:30 mycroft Exp $ +# $NetBSD: bsd.lib.mk,v 1.105 1997/05/17 02:01:08 mycroft Exp $ # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 .if exists(${.CURDIR}/../Makefile.inc) @@ -9,7 +9,7 @@ .MAIN: all .PHONY: cleanlib libinstall -install: libinstall +realinstall: libinstall clean cleandir: cleanlib .if exists(${.CURDIR}/shlib_version) @@ -17,10 +17,10 @@ SHLIB_MAJOR != . ${.CURDIR}/shlib_versio SHLIB_MINOR != . ${.CURDIR}/shlib_version ; echo $$minor .endif -# prefer .S to a .c, add .po, remove stuff not used in the BSD libraries. -# .so used for PIC object files. .ln used for lint output files. -.SUFFIXES: -.SUFFIXES: .out .o .po .so .S .s .c .cc .C .f .y .l .ln .m4 +# add additional suffixes not exported. +# .po is used for profiling object files. +# .so is used for PIC object files. +.SUFFIXES: .out .a .ln .so .po .o .s .S .c .cc .C .F .f .r .y .l .cl .p .h .sh .m4 # Set PICFLAGS to cc flags for producing position-independent code, @@ -155,9 +155,7 @@ _LIBS+=lib${LIB}.so.${SHLIB_MAJOR}.${SHL _LIBS+=llib-l${LIB}.ln .endif -all: ${_LIBS} - -OBJS+= ${SRCS:N*.h:R:S/$/.o/g} +all: ${SRCS} ${_LIBS} __archivebuild: .USE @rm -f ${.TARGET} @@ -170,14 +168,18 @@ __archiveinstall: .USE ${RANLIB} -t ${.TARGET} chmod ${LIBMODE} ${.TARGET} +DPSRCS+= ${SRCS:M*.l:.l=.c} ${SRCS:M*.y:.y=.c} +CLEANFILES+= ${DPSRCS} + +OBJS+= ${SRCS:N*.h:N*.sh:R:S/$/.o/g} lib${LIB}.a:: ${OBJS} __archivebuild @echo building standard ${LIB} library -POBJS+= ${OBJS:.o=.po} +POBJS+= ${OBJS:.o=.po} lib${LIB}_p.a:: ${POBJS} __archivebuild @echo building profiled ${LIB} library -SOBJS+= ${OBJS:.o=.so} +SOBJS+= ${OBJS:.o=.so} lib${LIB}_pic.a:: ${SOBJS} __archivebuild @echo building shared object ${LIB} library @@ -195,8 +197,8 @@ lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINO ${SHLIB_LDENDFILE} .endif -LOBJS+= ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln} -LLIBS?= -lc +LOBJS+= ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln} +LLIBS?= -lc llib-l${LIB}.ln: ${LOBJS} @echo building llib-l${LIB}.ln @rm -f llib-l${LIB}.ln @@ -210,7 +212,6 @@ cleanlib: rm -f llib-l${LIB}.ln ${LOBJS} .if defined(SRCS) -depend all: ${SRCS} afterdepend: .depend @(TMP=/tmp/_depend$$$$; \ sed -e 's/^\([^\.]*\).o[ ]*:/\1.o \1.po \1.so \1.ln:/' \