[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.84 and 1.116

version 1.84, 1997/05/18 20:21:54 version 1.116, 2000/06/10 14:12:04
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>
   .include <bsd.depall.mk>
 .MAIN:          all  .MAIN:          all
   .endif
   
 .PHONY:         cleanprog proginstall scriptsinstall  .PHONY:         cleanprog proginstall scriptsinstall
 realinstall:    proginstall scriptsinstall  realinstall:    proginstall scriptsinstall
 clean cleandir: cleanprog  clean cleandir distclean: cleanprog
   
 CFLAGS+=        ${COPTS}  CFLAGS+=        ${COPTS}
   
 # ELF platforms depend on crtbegin.o and crtend.o  # ELF platforms depend on crtbegin.o and crtend.o
 .if (${MACHINE_ARCH} == "alpha")   || \  .if ${OBJECT_FMT} == "ELF"
     (${MACHINE_ARCH} == "powerpc")  
 LIBCRTBEGIN?=   ${DESTDIR}/usr/lib/crtbegin.o  LIBCRTBEGIN?=   ${DESTDIR}/usr/lib/crtbegin.o
 LIBCRTEND?=     ${DESTDIR}/usr/lib/crtend.o  LIBCRTEND?=     ${DESTDIR}/usr/lib/crtend.o
 .else  .else
Line 25  LIBCRTEND?=
Line 28  LIBCRTEND?=
 .endif  .endif
   
 LIBCRT0?=       ${DESTDIR}/usr/lib/crt0.o  LIBCRT0?=       ${DESTDIR}/usr/lib/crt0.o
   
   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 35  LIBDES?= ${DESTDIR}/usr/lib/libdes.a
Line 40  LIBDES?= ${DESTDIR}/usr/lib/libdes.a
 LIBEDIT?=       ${DESTDIR}/usr/lib/libedit.a  LIBEDIT?=       ${DESTDIR}/usr/lib/libedit.a
 LIBGCC?=        ${DESTDIR}/usr/lib/libgcc.a  LIBGCC?=        ${DESTDIR}/usr/lib/libgcc.a
 LIBGNUMALLOC?=  ${DESTDIR}/usr/lib/libgnumalloc.a  LIBGNUMALLOC?=  ${DESTDIR}/usr/lib/libgnumalloc.a
   LIBIPSEC?=      ${DESTDIR}/usr/lib/libipsec.a
 LIBKDB?=        ${DESTDIR}/usr/lib/libkdb.a  LIBKDB?=        ${DESTDIR}/usr/lib/libkdb.a
 LIBKRB?=        ${DESTDIR}/usr/lib/libkrb.a  LIBKRB?=        ${DESTDIR}/usr/lib/libkrb.a
 LIBKVM?=        ${DESTDIR}/usr/lib/libkvm.a  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
   LIBMENU?=       ${DESTDIR}/usr/lib/libmenu.a
 LIBMP?=         ${DESTDIR}/usr/lib/libmp.a  LIBMP?=         ${DESTDIR}/usr/lib/libmp.a
 LIBNTP?=        ${DESTDIR}/usr/lib/libntp.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
Line 82  SRCS?=  ${PROG}.c
Line 90  SRCS?=  ${PROG}.c
   
 DPSRCS+=        ${SRCS:M*.l:.l=.c} ${SRCS:M*.y:.y=.c}  DPSRCS+=        ${SRCS:M*.l:.l=.c} ${SRCS:M*.y:.y=.c}
 CLEANFILES+=    ${DPSRCS}  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:N*.fth)
 OBJS+=          ${SRCS:N*.h:N*.sh:R:S/$/.o/g}  OBJS+=          ${SRCS:N*.h:N*.sh:N*.fth:R:S/$/.o/g}
 LOBJS+=         ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}  LOBJS+=         ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
 .endif  .endif
   
Line 93  LOBJS+=  ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=
Line 104  LOBJS+=  ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=
 .if defined(DESTDIR)  .if defined(DESTDIR)
   
 ${PROG}: ${LIBCRT0} ${DPSRCS} ${OBJS} ${LIBC} ${LIBCRTBEGIN} ${LIBCRTEND} ${DPADD}  ${PROG}: ${LIBCRT0} ${DPSRCS} ${OBJS} ${LIBC} ${LIBCRTBEGIN} ${LIBCRTEND} ${DPADD}
         ${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} -nostdlib -L${DESTDIR}/usr/lib ${LIBCRT0} ${LIBCRTBEGIN} ${OBJS} ${LDADD} -lgcc -lc -lgcc ${LIBCRTEND}          ${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} -nostdlib -L${DESTDIR}/usr/lib -Wl,-rpath-link,${DESTDIR}/usr/lib ${LIBCRT0} ${LIBCRTBEGIN} ${OBJS} ${LDADD} -lgcc -lc -lgcc ${LIBCRTEND}
   
 .else  .else
   
Line 103  ${PROG}: ${LIBCRT0} ${DPSRCS} ${OBJS} ${
Line 114  ${PROG}: ${LIBCRT0} ${DPSRCS} ${OBJS} ${
 .endif  # defined(DESTDIR)  .endif  # defined(DESTDIR)
 .endif  # defined(OBJS) && !empty(OBJS)  .endif  # defined(OBJS) && !empty(OBJS)
   
 .if     !defined(MAN)  .if !defined(MAN)
 MAN=    ${PROG}.1  MAN=    ${PROG}.1
 .endif  # !defined(MAN)  .endif  # !defined(MAN)
 .endif  # defined(PROG)  .endif  # defined(PROG)
   
 all: ${PROG}  realall: ${PROG} ${SCRIPTS}
   
 cleanprog:  cleanprog:
         rm -f a.out [Ee]rrs mklog core *.core \          rm -f a.out [Ee]rrs mklog core *.core \
Line 123  afterdepend: .depend
Line 134  afterdepend: .depend
 .endif  .endif
   
 .if defined(PROG) && !target(proginstall)  .if defined(PROG) && !target(proginstall)
 PROGNAME?= ${PROG}  PROGNAME?=${PROG}
   
 proginstall:: ${DESTDIR}${BINDIR}/${PROGNAME}  proginstall:: ${DESTDIR}${BINDIR}/${PROGNAME}
   .PRECIOUS: ${DESTDIR}${BINDIR}/${PROGNAME}
 .if !defined(UPDATE)  .if !defined(UPDATE)
 .PHONY: ${DESTDIR}${BINDIR}/${PROGNAME}  .PHONY: ${DESTDIR}${BINDIR}/${PROGNAME}
 .endif  .endif
 .if !defined(BUILD)  
   __proginstall: .USE
           ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${STRIPFLAG} ${INSTPRIV} \
               -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} ${.ALLSRC} ${.TARGET}
   
   .if !defined(BUILD) && !make(all) && !make(${PROG})
 ${DESTDIR}${BINDIR}/${PROGNAME}: .MADE  ${DESTDIR}${BINDIR}/${PROGNAME}: .MADE
 .endif  .endif
   ${DESTDIR}${BINDIR}/${PROGNAME}: ${PROG} __proginstall
 .PRECIOUS: ${DESTDIR}${BINDIR}/${PROGNAME}  
 ${DESTDIR}${BINDIR}/${PROGNAME}: ${PROG}  
         ${INSTALL} ${COPY} ${STRIPFLAG} -o ${BINOWN} -g ${BINGRP} \  
             -m ${BINMODE} ${.ALLSRC} ${.TARGET}  
 .endif  .endif
   
 .if !target(proginstall)  .if !target(proginstall)
Line 147  SCRIPTSDIR?=${BINDIR}
Line 161  SCRIPTSDIR?=${BINDIR}
 SCRIPTSOWN?=${BINOWN}  SCRIPTSOWN?=${BINOWN}
 SCRIPTSGRP?=${BINGRP}  SCRIPTSGRP?=${BINGRP}
 SCRIPTSMODE?=${BINMODE}  SCRIPTSMODE?=${BINMODE}
 .for S in ${SCRIPTS}  
 SCRIPTSDIR_${S}?=${SCRIPTSDIR}  scriptsinstall:: ${SCRIPTS:@S@${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}@}
 SCRIPTSOWN_${S}?=${SCRIPTSOWN}  .PRECIOUS: ${SCRIPTS:@S@${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}@}
 SCRIPTSGRP_${S}?=${SCRIPTSGRP}  
 SCRIPTSMODE_${S}?=${SCRIPTSMODE}  
 .if defined(SCRIPTSNAME)  
 SCRIPTSNAME_${S} ?= ${SCRIPTSNAME}  
 .else  
 SCRIPTSNAME_${S} ?= ${S:T:R}  
 .endif  
 SCRIPTSDIR_${S} ?= ${SCRIPTSDIR}  
 scriptsinstall:: ${DESTDIR}${SCRIPTSDIR_${S}}/${SCRIPTSNAME_${S}}  
 .if !defined(UPDATE)  .if !defined(UPDATE)
 .PHONY: ${DESTDIR}${SCRIPTSDIR_${S}}/${SCRIPTSNAME_${S}}  .PHONY: ${SCRIPTS:@S@${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}@}
 .endif  
 .if !defined(BUILD)  
 ${DESTDIR}${SCRIPTSDIR_${S}}/${SCRIPTSNAME_${S}}: .MADE  
 .endif  .endif
   
 .PRECIOUS: ${DESTDIR}${SCRIPTSDIR_${S}}/${SCRIPTSNAME_${S}}  __scriptinstall: .USE
 ${DESTDIR}${SCRIPTSDIR_${S}}/${SCRIPTSNAME_${S}}: ${S}          ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} \
         ${INSTALL} ${COPY} -o ${SCRIPTSOWN_${S}} -g ${SCRIPTSGRP_${S}} \              -o ${SCRIPTSOWN_${.ALLSRC:T}:U${SCRIPTSOWN}} \
                 -m ${SCRIPTSMODE_${S}} ${.ALLSRC} ${.TARGET}              -g ${SCRIPTSGRP_${.ALLSRC:T}:U${SCRIPTSGRP}} \
               -m ${SCRIPTSMODE_${.ALLSRC:T}:U${SCRIPTSMODE}} \
               ${.ALLSRC} ${.TARGET}
   
   .for S in ${SCRIPTS}
   .if !defined(BUILD) && !make(all) && !make(${S})
   ${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}: .MADE
   .endif
   ${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}: ${S} __scriptinstall
 .endfor  .endfor
 .endif  .endif
   
Line 179  scriptsinstall::
Line 189  scriptsinstall::
   
 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
   
 .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.files.mk>  .include <bsd.files.mk>
 .include <bsd.inc.mk>  .include <bsd.inc.mk>
 .include <bsd.links.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.84  
changed lines
  Added in v.1.116

CVSweb <webmaster@jp.NetBSD.org>