[BACK]Return to bsd.prog.mk CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / share / mk

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/share/mk/bsd.prog.mk between version 1.67 and 1.98

version 1.67, 1997/03/29 08:02:53 version 1.98, 1999/02/04 11:58:31
Line 1 
Line 1 
 #       $NetBSD$  #       $NetBSD$
 #       @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94  #       @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94
   
   .if !target(__initialized__)
   __initialized__:
 .if exists(${.CURDIR}/../Makefile.inc)  .if exists(${.CURDIR}/../Makefile.inc)
 .include "${.CURDIR}/../Makefile.inc"  .include "${.CURDIR}/../Makefile.inc"
 .endif  .endif
   
 .include <bsd.own.mk>  .include <bsd.own.mk>
   .include <bsd.obj.mk>
   .MAIN:          all
   .endif
   
 .SUFFIXES: .out .o .c .cc .C .y .l .s .8 .7 .6 .5 .4 .3 .2 .1 .0  .PHONY:         cleanprog proginstall scriptsinstall
   realinstall:    proginstall scriptsinstall
   clean cleandir distclean: cleanprog
   
 CFLAGS+=        ${COPTS}  CFLAGS+=        ${COPTS}
   
   # ELF platforms depend on crtbegin.o and crtend.o
   .if (${OBJECT_FMT} == "ELF")
   LIBCRTBEGIN?=   ${DESTDIR}/usr/lib/crtbegin.o
   LIBCRTEND?=     ${DESTDIR}/usr/lib/crtend.o
   .else
   LIBCRTBEGIN?=
   LIBCRTEND?=
   .endif
   
 LIBCRT0?=       ${DESTDIR}/usr/lib/crt0.o  LIBCRT0?=       ${DESTDIR}/usr/lib/crt0.o
   
   LIBBFD?=        ${DESTDIR}/usr/lib/libbfd.a
   LIBBZ2?=        ${DESTDIR}/usr/lib/libbz2.a
 LIBC?=          ${DESTDIR}/usr/lib/libc.a  LIBC?=          ${DESTDIR}/usr/lib/libc.a
 LIBC_PIC?=      ${DESTDIR}/usr/lib/libc_pic.a  LIBC_PIC?=      ${DESTDIR}/usr/lib/libc_pic.a
 LIBCOMPAT?=     ${DESTDIR}/usr/lib/libcompat.a  LIBCOMPAT?=     ${DESTDIR}/usr/lib/libcompat.a
Line 28  LIBKVM?= ${DESTDIR}/usr/lib/libkvm.a
Line 46  LIBKVM?= ${DESTDIR}/usr/lib/libkvm.a
 LIBL?=          ${DESTDIR}/usr/lib/libl.a  LIBL?=          ${DESTDIR}/usr/lib/libl.a
 LIBM?=          ${DESTDIR}/usr/lib/libm.a  LIBM?=          ${DESTDIR}/usr/lib/libm.a
 LIBMP?=         ${DESTDIR}/usr/lib/libmp.a  LIBMP?=         ${DESTDIR}/usr/lib/libmp.a
   LIBNTP?=        ${DESTDIR}/usr/lib/libntp.a
   LIBOBJC?=       ${DESTDIR}/usr/lib/libobjc.a
 LIBPC?=         ${DESTDIR}/usr/lib/libpc.a  LIBPC?=         ${DESTDIR}/usr/lib/libpc.a
 LIBPCAP?=       ${DESTDIR}/usr/lib/libpcap.a  LIBPCAP?=       ${DESTDIR}/usr/lib/libpcap.a
 LIBPLOT?=       ${DESTDIR}/usr/lib/libplot.a  LIBPLOT?=       ${DESTDIR}/usr/lib/libplot.a
   LIBPOSIX?=      ${DESTDIR}/usr/lib/libposix.a
 LIBRESOLV?=     ${DESTDIR}/usr/lib/libresolv.a  LIBRESOLV?=     ${DESTDIR}/usr/lib/libresolv.a
 LIBRPCSVC?=     ${DESTDIR}/usr/lib/librpcsvc.a  LIBRPCSVC?=     ${DESTDIR}/usr/lib/librpcsvc.a
 LIBSKEY?=       ${DESTDIR}/usr/lib/libskey.a  LIBSKEY?=       ${DESTDIR}/usr/lib/libskey.a
Line 63  CLEANFILES+=strings
Line 84  CLEANFILES+=strings
   
   
 .if defined(PROG)  .if defined(PROG)
 SRCS?=  ${PROG}.c  SRCS?=          ${PROG}.c
   
   DPSRCS+=        ${SRCS:M*.l:.l=.c} ${SRCS:M*.y:.y=.c}
   CLEANFILES+=    ${DPSRCS}
   .if defined(YHEADER)
   CLEANFILES+=    ${SRCS:M*.y:.y=.h}
   .endif
   
 .if !empty(SRCS:N*.h:N*.sh)  .if !empty(SRCS:N*.h:N*.sh)
 OBJS+=  ${SRCS:N*.h:N*.sh:R:S/$/.o/g}  OBJS+=          ${SRCS:N*.h:N*.sh:R:S/$/.o/g}
 LOBJS+= ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}  LOBJS+=         ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
 .endif  .endif
   
 .if defined(OBJS) && !empty(OBJS)  .if defined(OBJS) && !empty(OBJS)
   .NOPATH: ${OBJS}
 .if defined(DESTDIR)  .if defined(DESTDIR)
   
 ${PROG}: ${LIBCRT0} ${OBJS} ${LIBC} ${DPADD}  ${PROG}: ${LIBCRT0} ${DPSRCS} ${OBJS} ${LIBC} ${LIBCRTBEGIN} ${LIBCRTEND} ${DPADD}
         ${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} -nostdlib -L${DESTDIR}/usr/lib ${LIBCRT0} ${OBJS} ${LDADD} -lgcc -lc -lgcc          ${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} -nostdlib -L${DESTDIR}/usr/lib ${LIBCRT0} ${LIBCRTBEGIN} ${OBJS} ${LDADD} -lgcc -lc -lgcc ${LIBCRTEND}
   
 .else  .else
   
 ${PROG}: ${LIBCRT0} ${OBJS} ${LIBC} ${DPADD}  ${PROG}: ${LIBCRT0} ${DPSRCS} ${OBJS} ${LIBC} ${LIBCRTBEGIN} ${LIBCRTEND} ${DPADD}
         ${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${OBJS} ${LDADD}          ${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${OBJS} ${LDADD}
   
 .endif  # defined(DESTDIR)  .endif  # defined(DESTDIR)
Line 88  MAN= ${PROG}.1
Line 117  MAN= ${PROG}.1
 .endif  # !defined(MAN)  .endif  # !defined(MAN)
 .endif  # defined(PROG)  .endif  # defined(PROG)
   
 .if !target(all)  all: ${PROG}
 .MAIN: all  
 all: ${PROG} _SUBDIRUSE  
 .endif  
   
 .if !target(clean)  
 cleanprog:  cleanprog:
         rm -f a.out [Ee]rrs mklog core *.core \          rm -f a.out [Ee]rrs mklog core *.core \
             ${PROG} ${OBJS} ${LOBJS} ${CLEANFILES}              ${PROG} ${OBJS} ${LOBJS} ${CLEANFILES}
   
 clean: _SUBDIRUSE cleanprog  
 cleandir: _SUBDIRUSE cleanprog  
 .else  
 cleandir: _SUBDIRUSE clean  
 .endif  
   
 .if defined(SRCS)  .if defined(SRCS)
 afterdepend: .depend  afterdepend: .depend
         @(TMP=/tmp/_depend$$$$; \          @(TMP=/tmp/_depend$$$$; \
Line 112  afterdepend: .depend
Line 131  afterdepend: .depend
             mv $$TMP .depend)              mv $$TMP .depend)
 .endif  .endif
   
 .if !target(install)  .if defined(PROG) && !target(proginstall)
 .if !target(beforeinstall)  
 beforeinstall:  
 .endif  
 .if !target(afterinstall)  
 afterinstall:  
 .endif  
   
 .if !target(realinstall)  
   
 .if defined(PROG)  
 PROGNAME?= ${PROG}  PROGNAME?= ${PROG}
 proginstall:: ${DESTDIR}${BINDIR}/${PROGNAME}  proginstall:: ${DESTDIR}${BINDIR}/${PROGNAME}
 .if !defined(UPDATE)  .if !defined(UPDATE)
Line 132  proginstall:: ${DESTDIR}${BINDIR}/${PROG
Line 141  proginstall:: ${DESTDIR}${BINDIR}/${PROG
 ${DESTDIR}${BINDIR}/${PROGNAME}: .MADE  ${DESTDIR}${BINDIR}/${PROGNAME}: .MADE
 .endif  .endif
   
   .PRECIOUS: ${DESTDIR}${BINDIR}/${PROGNAME}
 ${DESTDIR}${BINDIR}/${PROGNAME}: ${PROG}  ${DESTDIR}${BINDIR}/${PROGNAME}: ${PROG}
         ${INSTALL} ${COPY} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \          ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${STRIPFLAG} -o ${BINOWN} \
             ${.ALLSRC} ${.TARGET}              -g ${BINGRP} -m ${BINMODE} ${.ALLSRC} ${.TARGET}
   .endif
   
   .if !target(proginstall)
   proginstall::
 .endif  .endif
   
 .if defined(SCRIPTS)  .if defined(SCRIPTS) && !target(scriptsinstall)
 SCRIPTSDIR?=${BINDIR}  SCRIPTSDIR?=${BINDIR}
 SCRIPTSOWN?=${BINOWN}  SCRIPTSOWN?=${BINOWN}
 SCRIPTSGRP?=${BINGRP}  SCRIPTSGRP?=${BINGRP}
Line 153  SCRIPTSNAME_${S} ?= ${SCRIPTSNAME}
Line 167  SCRIPTSNAME_${S} ?= ${SCRIPTSNAME}
 SCRIPTSNAME_${S} ?= ${S:T:R}  SCRIPTSNAME_${S} ?= ${S:T:R}
 .endif  .endif
 SCRIPTSDIR_${S} ?= ${SCRIPTSDIR}  SCRIPTSDIR_${S} ?= ${SCRIPTSDIR}
 proginstall:: ${DESTDIR}${SCRIPTSDIR_${S}}/${SCRIPTSNAME_${S}}  scriptsinstall:: ${DESTDIR}${SCRIPTSDIR_${S}}/${SCRIPTSNAME_${S}}
 .if !defined(UPDATE)  .if !defined(UPDATE)
 .PHONY: ${DESTDIR}${SCRIPTSDIR_${S}}/${SCRIPTSNAME_${S}}  .PHONY: ${DESTDIR}${SCRIPTSDIR_${S}}/${SCRIPTSNAME_${S}}
 .endif  .endif
Line 161  proginstall:: ${DESTDIR}${SCRIPTSDIR_${S
Line 175  proginstall:: ${DESTDIR}${SCRIPTSDIR_${S
 ${DESTDIR}${SCRIPTSDIR_${S}}/${SCRIPTSNAME_${S}}: .MADE  ${DESTDIR}${SCRIPTSDIR_${S}}/${SCRIPTSNAME_${S}}: .MADE
 .endif  .endif
   
   .PRECIOUS: ${DESTDIR}${SCRIPTSDIR_${S}}/${SCRIPTSNAME_${S}}
 ${DESTDIR}${SCRIPTSDIR_${S}}/${SCRIPTSNAME_${S}}: ${S}  ${DESTDIR}${SCRIPTSDIR_${S}}/${SCRIPTSNAME_${S}}: ${S}
         ${INSTALL} ${COPY} -o ${SCRIPTSOWN_${S}} -g ${SCRIPTSGRP_${S}} \          ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} -o ${SCRIPTSOWN_${S}} -g \
                 -m ${SCRIPTSMODE_${S}} ${.ALLSRC} ${.TARGET}              ${SCRIPTSGRP_${S}} -m ${SCRIPTSMODE_${S}} ${.ALLSRC} ${.TARGET}
 .endfor  .endfor
 .endif  .endif
   
 .if target(proginstall)  .if !target(scriptsinstall)
 realinstall: proginstall filesinstall  scriptsinstall::
 .else  
 realinstall: filesinstall  
 .endif  
 .endif  .endif
   
 install: ${MANINSTALL} _SUBDIRUSE linksinstall  
   
 ${MANINSTALL}: afterinstall  
 afterinstall: realinstall  
 realinstall: beforeinstall  
 .endif  
   
 .if !target(lint)  
 lint: ${LOBJS}  lint: ${LOBJS}
 .if defined(LOBJS) && !empty(LOBJS)  .if defined(LOBJS) && !empty(LOBJS)
         @${LINT} ${LINTFLAGS} ${LDFLAGS:M-L*} ${LOBJS} ${LDADD}          ${LINT} ${LINTFLAGS} ${LDFLAGS:M-L*} ${LOBJS} ${LDADD}
 .endif  
 .endif  .endif
   
 .if !defined(NOMAN)  
 .include <bsd.man.mk>  .include <bsd.man.mk>
 .endif  
   
 .if !defined(NONLS)  
 .include <bsd.nls.mk>  .include <bsd.nls.mk>
 .endif  
   
 .include <bsd.obj.mk>  
 .include <bsd.links.mk>  
 .include <bsd.files.mk>  .include <bsd.files.mk>
 .include <bsd.inc.mk>  .include <bsd.inc.mk>
   .include <bsd.links.mk>
 .include <bsd.dep.mk>  .include <bsd.dep.mk>
 .include <bsd.subdir.mk>  
 .include <bsd.sys.mk>  .include <bsd.sys.mk>
   
   # Make sure all of the standard targets are defined, even if they do nothing.
   regress:

Legend:
Removed from v.1.67  
changed lines
  Added in v.1.98

CVSweb <webmaster@jp.NetBSD.org>