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

version 1.37, 1994/04/06 06:37:38 version 1.116, 2000/06/10 14:12:04
Line 1 
Line 1 
 #       from: @(#)bsd.prog.mk   5.26 (Berkeley) 6/25/91  #       $NetBSD$
 #       $Id$  #       @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94
   .if !target(__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.obj.mk>
   .include <bsd.depall.mk>
   .MAIN:          all
 .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}
 LIBCRT0?=       /usr/lib/crt0.o  # ELF platforms depend on crtbegin.o and crtend.o
 LIBC?=          /usr/lib/libc.a  .if ${OBJECT_FMT} == "ELF"
 LIBCOMPAT?=     /usr/lib/libcompat.a  LIBCRTBEGIN?=   ${DESTDIR}/usr/lib/crtbegin.o
 LIBCRYPT?=      /usr/lib/libcrypt.a  LIBCRTEND?=     ${DESTDIR}/usr/lib/crtend.o
 LIBCURSES?=     /usr/lib/libcurses.a  .else
 LIBDBM?=        /usr/lib/libdbm.a  LIBCRTBEGIN?=
 LIBDES?=        /usr/lib/libdes.a  LIBCRTEND?=
 LIBL?=          /usr/lib/libl.a  .endif
 LIBKDB?=        /usr/lib/libkdb.a  
 LIBKRB?=        /usr/lib/libkrb.a  LIBCRT0?=       ${DESTDIR}/usr/lib/crt0.o
 LIBKVM?=        /usr/lib/libkvm.a  
 LIBM?=          /usr/lib/libm.a  LIBBZ2?=        ${DESTDIR}/usr/lib/libbz2.a
 LIBMP?=         /usr/lib/libmp.a  LIBC?=          ${DESTDIR}/usr/lib/libc.a
 LIBPC?=         /usr/lib/libpc.a  LIBC_PIC?=      ${DESTDIR}/usr/lib/libc_pic.a
 LIBPLOT?=       /usr/lib/libplot.a  LIBCOMPAT?=     ${DESTDIR}/usr/lib/libcompat.a
 LIBRESOLV?=     /usr/lib/libresolv.a  LIBCRYPT?=      ${DESTDIR}/usr/lib/libcrypt.a
 LIBRPCSVC?=     /usr/lib/librpcsvc.a  LIBCURSES?=     ${DESTDIR}/usr/lib/libcurses.a
 LIBTERMCAP?=    /usr/lib/libtermcap.a  LIBDBM?=        ${DESTDIR}/usr/lib/libdbm.a
 LIBUTIL?=       /usr/lib/libutil.a  LIBDES?=        ${DESTDIR}/usr/lib/libdes.a
   LIBEDIT?=       ${DESTDIR}/usr/lib/libedit.a
   LIBGCC?=        ${DESTDIR}/usr/lib/libgcc.a
   LIBGNUMALLOC?=  ${DESTDIR}/usr/lib/libgnumalloc.a
   LIBIPSEC?=      ${DESTDIR}/usr/lib/libipsec.a
   LIBKDB?=        ${DESTDIR}/usr/lib/libkdb.a
   LIBKRB?=        ${DESTDIR}/usr/lib/libkrb.a
   LIBKVM?=        ${DESTDIR}/usr/lib/libkvm.a
   LIBL?=          ${DESTDIR}/usr/lib/libl.a
   LIBM?=          ${DESTDIR}/usr/lib/libm.a
   LIBMENU?=       ${DESTDIR}/usr/lib/libmenu.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
   LIBPCAP?=       ${DESTDIR}/usr/lib/libpcap.a
   LIBPLOT?=       ${DESTDIR}/usr/lib/libplot.a
   LIBPOSIX?=      ${DESTDIR}/usr/lib/libposix.a
   LIBRESOLV?=     ${DESTDIR}/usr/lib/libresolv.a
   LIBRPCSVC?=     ${DESTDIR}/usr/lib/librpcsvc.a
   LIBSKEY?=       ${DESTDIR}/usr/lib/libskey.a
   LIBTERMCAP?=    ${DESTDIR}/usr/lib/libtermcap.a
   LIBTELNET?=     ${DESTDIR}/usr/lib/libtelnet.a
   LIBUTIL?=       ${DESTDIR}/usr/lib/libutil.a
   LIBWRAP?=       ${DESTDIR}/usr/lib/libwrap.a
   LIBY?=          ${DESTDIR}/usr/lib/liby.a
   LIBZ?=          ${DESTDIR}/usr/lib/libz.a
 .if defined(SHAREDSTRINGS)  .if defined(SHAREDSTRINGS)
 CLEANFILES+=strings  CLEANFILES+=strings
Line 49  CLEANFILES+=strings
Line 84  CLEANFILES+=strings
         @rm -f x.C          @rm -f x.C
 .endif  .endif
 .if defined(PROG)  
 .if defined(SRCS)  
 OBJS+=  ${SRCS:N*.h:R:S/$/.o/g}  
 .if defined(LDONLY)  .if defined(PROG)
   SRCS?=          ${PROG}.c
 ${PROG}: ${LIBCRT0} ${OBJS} ${LIBC} ${DPADD}  DPSRCS+=        ${SRCS:M*.l:.l=.c} ${SRCS:M*.y:.y=.c}
   .if defined(YHEADER)
   CLEANFILES+=    ${SRCS:M*.y:.y=.h}
 .else defined(LDONLY)  .if !empty(SRCS:N*.h:N*.sh:N*.fth)
   OBJS+=          ${SRCS:N*.h:N*.sh:N*.fth:R:S/$/.o/g}
   LOBJS+=         ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
 ${PROG}: ${LIBCRT0} ${OBJS} ${LIBC} ${DPADD}  .if defined(OBJS) && !empty(OBJS)
         ${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${OBJS} ${LDADD}  .NOPATH: ${OBJS}
   .if defined(DESTDIR)
           ${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
           ${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${OBJS} ${LDADD}
 ${PROG}: ${LIBCRT0} ${SRCS} ${LIBC} ${DPADD}  .endif  # defined(DESTDIR)
         ${CC} ${LDFLAGS} ${LDSTATIC} ${CFLAGS} -o ${.TARGET} ${.CURDIR}/${SRCS} ${LDADD}  .endif  # defined(OBJS) && !empty(OBJS)
 MKDEP=  -p  .if !defined(MAN)
   MAN=    ${PROG}.1
   .endif  # !defined(MAN)
   .endif  # defined(PROG)
   realall: ${PROG} ${SCRIPTS}
           rm -f a.out [Ee]rrs mklog core *.core \
               ${PROG} ${OBJS} ${LOBJS} ${CLEANFILES}
   .if defined(SRCS)
   afterdepend: .depend
           @(TMP=/tmp/_depend$$$$; \
               sed -e 's/^\([^\.]*\).o[ ]*:/\1.o \1.ln:/' \
                 < .depend > $$TMP; \
               mv $$TMP .depend)
 .endif  .endif
 .if     !defined(MAN1) && !defined(MAN2) && !defined(MAN3) && \  .if defined(PROG) && !target(proginstall)
         !defined(MAN4) && !defined(MAN5) && !defined(MAN6) && \  PROGNAME?=${PROG}
         !defined(MAN7) && !defined(MAN8)  
 MAN1=   ${PROG}.0  
 .MAIN: all  
 all: ${PROG}  
 .if !target(clean)  proginstall:: ${DESTDIR}${BINDIR}/${PROGNAME}
         rm -f a.out [Ee]rrs mklog core *.core ${PROG} ${OBJS} ${CLEANFILES}  .if !defined(UPDATE)
 .endif  .endif
 cleandir: clean  __proginstall: .USE
               -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} ${.ALLSRC} ${.TARGET}
 .if !target(install)  .if !defined(BUILD) && !make(all) && !make(${PROG})
 .if !target(beforeinstall)  ${DESTDIR}${BINDIR}/${PROGNAME}: .MADE
 .endif  .endif
 .if !target(afterinstall)  ${DESTDIR}${BINDIR}/${PROGNAME}: ${PROG} __proginstall
 .endif  .endif
 .if !target(realinstall)  .if !target(proginstall)
 realinstall:  proginstall::
 .if defined(PROG)  
         install ${COPY} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \  
             ${PROG} ${DESTDIR}${BINDIR}  
 .if defined(HIDEGAME)  
         (cd ${DESTDIR}/usr/games; rm -f ${PROG}; ln -s dm ${PROG}; \  
             chown games.bin ${PROG})  
 .endif  .endif
 install: maninstall _SUBDIRUSE  .if defined(SCRIPTS) && !target(scriptsinstall)
 .if defined(LINKS) && !empty(LINKS)  SCRIPTSDIR?=${BINDIR}
         @set ${LINKS}; \  SCRIPTSOWN?=${BINOWN}
         while test $$# -ge 2; do \  SCRIPTSGRP?=${BINGRP}
                 l=${DESTDIR}$$1; \  SCRIPTSMODE?=${BINMODE}
                 shift; \  
                 t=${DESTDIR}$$1; \  
                 shift; \  
                 echo $$t -\> $$l; \  
                 rm -f $$t; \  
                 ln $$l $$t; \  
         done; true  
 maninstall: afterinstall  scriptsinstall:: ${SCRIPTS:@S@${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}@}
 realinstall: beforeinstall  .if !defined(UPDATE)
 .endif  .endif
 .if !target(lint)  __scriptinstall: .USE
 lint: ${SRCS}          ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} ${INSTPRIV} \
 .if defined(PROG)              -o ${SCRIPTSOWN_${.ALLSRC:T}:U${SCRIPTSOWN}} \
         @${LINT} ${LINTFLAGS} ${CFLAGS} ${.ALLSRC} | more 2>&1              -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})
 .endif  .endif
 .endif  .endif
 .if !defined(NOMAN)  .if !target(scriptsinstall)
 .include <bsd.man.mk>  scriptsinstall::
 .endif  .endif
 .include <bsd.obj.mk>  lint: ${LOBJS}
   .if defined(LOBJS) && !empty(LOBJS)
           ${LINT} ${LINTFLAGS} ${LDFLAGS:M-L*} ${LOBJS} ${LDADD}
   .include <bsd.man.mk>
   .include <bsd.nls.mk>
   .include <bsd.files.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>
   # Make sure all of the standard targets are defined, even if they do nothing.

Removed from v.1.37  
changed lines
  Added in v.1.116

CVSweb <webmaster@jp.NetBSD.org>