[digraphanalysis-cvs] digraphanalysis/mk bsd.dep.mk, bsd.doc.mk, bsd.lib.mk, bsd.lkm.mk, bsd.man.mk,
Status: Planning
Brought to you by:
jbreker
Update of /cvsroot/digraphanalysis/digraphanalysis/mk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26429/mk Added Files: bsd.dep.mk bsd.doc.mk bsd.lib.mk bsd.lkm.mk bsd.man.mk bsd.nls.mk bsd.obj.mk bsd.own.mk bsd.port.mk bsd.port.subdir.mk bsd.prog.mk bsd.regress.mk bsd.subdir.mk bsd.sys.mk Log Message: commit the openbsd build system into our repository in order to utilize it while building on other platforms --- NEW FILE: bsd.own.mk --- # $OpenBSD: bsd.own.mk,v 1.93 2005/08/08 05:53:01 espie Exp $ # $NetBSD: bsd.own.mk,v 1.24 1996/04/13 02:08:09 thorpej Exp $ # Host-specific overrides .if defined(MAKECONF) && exists(${MAKECONF}) .include "${MAKECONF}" .elif exists(/etc/mk.conf) .include "/etc/mk.conf" .endif # Set `WARNINGS' to `yes' to add appropriate warnings to each compilation WARNINGS?= no # Set `SKEY' to `yes' to build with support for S/key authentication. SKEY?= yes # Set `KERBEROS5' to `yes' to build with support for Kerberos5 authentication. KERBEROS5?= yes # Set `YP' to `yes' to build with support for NIS/YP. YP?= yes # Set `TCP_WRAPPERS' to `yes' to build certain networking daemons with # integrated support for libwrap. TCP_WRAPPERS?= yes # Set `AFS` to `yes' to build with AFS support. AFS?= yes # Set `DEBUGLIBS' to `yes' to build libraries with debugging symbols DEBUGLIBS?= no # Set toolchain to be able to know differences. .if ${MACHINE_ARCH} == "m68k" || ${MACHINE_ARCH} == "m88k" || \ ${MACHINE_ARCH} == "vax" ELF_TOOLCHAIN?= no .else ELF_TOOLCHAIN?= yes .endif # gcc3 .if ${MACHINE_ARCH} == "alpha" || \ ${MACHINE_ARCH} == "m68k" || ${MACHINE_ARCH} == "m88k" || \ ${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "vax" USE_GCC3?=no .else USE_GCC3?=yes .endif # where the system object and source trees are kept; can be configurable # by the user in case they want them in ~/foosrc and ~/fooobj, for example BSDSRCDIR?= /usr/src BSDOBJDIR?= /usr/obj BINGRP?= bin BINOWN?= root BINMODE?= 555 NONBINMODE?= 444 DIRMODE?= 755 # Define MANZ to have the man pages compressed (gzip) #MANZ= 1 # Define MANPS to have PostScript manual pages generated #MANPS= 1 SHAREDIR?= /usr/share SHAREGRP?= bin SHAREOWN?= root SHAREMODE?= ${NONBINMODE} MANDIR?= /usr/share/man/cat MANGRP?= bin MANOWN?= root MANMODE?= ${NONBINMODE} PSDIR?= /usr/share/man/ps PSGRP?= bin PSOWN?= root PSMODE?= ${NONBINMODE} LIBDIR?= /usr/lib LINTLIBDIR?= /usr/libdata/lint LIBGRP?= ${BINGRP} LIBOWN?= ${BINOWN} LIBMODE?= ${NONBINMODE} DOCDIR?= /usr/share/doc DOCGRP?= bin DOCOWN?= root DOCMODE?= ${NONBINMODE} LKMDIR?= /usr/lkm LKMGRP?= ${BINGRP} LKMOWN?= ${BINOWN} LKMMODE?= ${NONBINMODE} NLSDIR?= /usr/share/nls NLSGRP?= bin NLSOWN?= root NLSMODE?= ${NONBINMODE} LOCALEDIR?= /usr/share/locale LOCALEGRP?= wheel LOCALEOWN?= root LOCALEMODE?= ${NONBINMODE} # Shared files for system gnu configure, not used yet GNUSYSTEM_AUX_DIR?=${BSDSRCDIR}/share/gnu INSTALL_COPY?= -c .ifndef DEBUG INSTALL_STRIP?= -s .endif # This may be changed for _single filesystem_ configurations (such as # routers and other embedded systems); normal systems should leave it alone! STATIC?= -static # Define SYS_INCLUDE to indicate whether you want symbolic links to the system # source (``symlinks''), or a separate copy (``copies''); (latter useful # in environments where it's not possible to keep /sys publicly readable) #SYS_INCLUDE= symlinks # don't try to generate PIC versions of libraries on machines # which don't support PIC. .if (${MACHINE_ARCH} == "vax") || (${MACHINE_ARCH} == "m88k") NOPIC= .endif # pic relocation flags. .if (${MACHINE_ARCH} == "sparc64") PICFLAG=-fPIC .else PICFLAG=-fpic . if ${MACHINE_ARCH} == "m68k" # Function CSE makes gas -k not recognize external function calls as lazily # resolvable symbols, thus sometimes making ld.so report undefined symbol # errors on symbols found in shared library members that would never be # called. Ask ni...@op... for details. PICFLAG+=-fno-function-cse . endif .endif .if (${MACHINE_ARCH} == "sparc64") || (${MACHINE_ARCH} == "sparc") ASPICFLAG=-KPIC .elif (${ELF_TOOLCHAIN:L} == "no") ASPICFLAG=-k .endif # don't try to generate PROFILED versions of libraries on machines # which don't support profiling. .if 0 NOPROFILE= .endif # No lint, for now. NOLINT= BSD_OWN_MK=Done .PHONY: spell clean cleandir obj manpages print all \ depend beforedepend afterdepend cleandepend \ all lint cleanman nlsinstall cleannls includes \ beforeinstall realinstall maninstall afterinstall install --- NEW FILE: bsd.prog.mk --- # $OpenBSD: bsd.prog.mk,v 1.44 2005/04/15 17:18:57 espie Exp $ # $NetBSD: bsd.prog.mk,v 1.55 1996/04/08 21:19:26 jtc Exp $ # @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91 .if exists(${.CURDIR}/../Makefile.inc) .include "${.CURDIR}/../Makefile.inc" .endif .include <bsd.own.mk> .SUFFIXES: .out .o .c .cc .C .cxx .y .l .s .8 .7 .6 .5 .4 .3 .2 .1 .0 .if ${WARNINGS:L} == "yes" CFLAGS+= ${CDIAGFLAGS} CXXFLAGS+= ${CXXDIAGFLAGS} .endif CFLAGS+= ${COPTS} CXXFLAGS+= ${CXXOPTS} .if (${ELF_TOOLCHAIN:L} == "yes") CRTBEGIN?= ${DESTDIR}/usr/lib/crtbegin.o CRTEND?= ${DESTDIR}/usr/lib/crtend.o .endif LIBCRT0?= ${DESTDIR}/usr/lib/crt0.o LIB45?= ${DESTDIR}/usr/lib/lib45.a LIBACL?= ${DESTDIR}/usr/lib/libacl.a LIBASN1?= ${DESTDIR}/usr/lib/libasn1.a LIBC?= ${DESTDIR}/usr/lib/libc.a LIBCOMPAT?= ${DESTDIR}/usr/lib/libcompat.a LIBCRYPTO?= ${DESTDIR}/usr/lib/libcrypto.a LIBCURSES?= ${DESTDIR}/usr/lib/libcurses.a LIBDES?= ${DESTDIR}/usr/lib/libdes.a LIBEDIT?= ${DESTDIR}/usr/lib/libedit.a LIBEVENT?= ${DESTDIR}/usr/lib/libevent.a LIBGCC?= ${DESTDIR}/usr/lib/libgcc.a LIBGSSAPI?= ${DESTDIR}/usr/lib/libgssapi.a LIBHDB?= ${DESTDIR}/usr/lib/libhdb.a LIBKADM?= ${DESTDIR}/usr/lib/libkadm.a LIBKADM5CLNT?= ${DESTDIR}/usr/lib/libkadm5clnt.a LIBKADM5SRV?= ${DESTDIR}/usr/lib/libkadm5srv.a LIBKAFS?= ${DESTDIR}/usr/lib/libkafs.a LIBKDB?= ${DESTDIR}/usr/lib/libkdb.a LIBKEYNOTE?= ${DESTDIR}/usr/lib/libkeynote.a LIBKRB?= ${DESTDIR}/usr/lib/libkrb.a LIBKRB5?= ${DESTDIR}/usr/lib/libkrb5.a LIBKVM?= ${DESTDIR}/usr/lib/libkvm.a LIBL?= ${DESTDIR}/usr/lib/libl.a LIBM?= ${DESTDIR}/usr/lib/libm.a LIBOLDCURSES?= ${DESTDIR}/usr/lib/libocurses.a LIBPCAP?= ${DESTDIR}/usr/lib/libpcap.a LIBPERL?= ${DESTDIR}/usr/lib/libperl.a LIBRPCSVC?= ${DESTDIR}/usr/lib/librpcsvc.a LIBSECTOK?= ${DESTDIR}/usr/lib/libsectok.a LIBSKEY?= ${DESTDIR}/usr/lib/libskey.a LIBSSL?= ${DESTDIR}/usr/lib/libssl.a LIBTELNET?= ${DESTDIR}/usr/lib/libtelnet.a LIBTERMCAP?= ${DESTDIR}/usr/lib/libtermcap.a LIBTERMLIB?= ${DESTDIR}/usr/lib/libtermlib.a LIBUSB?= ${DESTDIR}/usr/lib/libusbhid.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 (${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "amd64" || \ ${MACHINE_ARCH} == "i386") LIBARCH?= ${DESTDIR}/usr/lib/lib${MACHINE_ARCH}.a .else LIBARCH?= .endif # old stuff LIBDBM?= ${DESTDIR}/usr/lib/libdbm.a LIBMP?= ${DESTDIR}/usr/lib/libmp.a LIBPC?= ${DESTDIR}/usr/lib/libpc.a LIBPLOT?= ${DESTDIR}/usr/lib/libplot.a LIBRESOLV?= ${DESTDIR}/usr/lib/libresolv.a .if defined(PROG) SRCS?= ${PROG}.c . if !empty(SRCS:N*.h:N*.sh) OBJS+= ${SRCS:N*.h:N*.sh:R:S/$/.o/g} LOBJS+= ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln} . endif . if defined(OBJS) && !empty(OBJS) . if !empty(SRCS:M*.C) || !empty(SRCS:M*.cc) || !empty(SRCS:M*.cxx) ${PROG}: ${LIBCRT0} ${OBJS} ${LIBC} ${CRTBEGIN} ${CRTEND} ${DPADD} ${CXX} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${OBJS} ${LDADD} . else ${PROG}: ${LIBCRT0} ${OBJS} ${LIBC} ${CRTBEGIN} ${CRTEND} ${DPADD} ${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${OBJS} ${LDADD} . endif . endif # defined(OBJS) && !empty(OBJS) . if !defined(MAN) MAN= ${PROG}.1 . endif # !defined(MAN) .endif # defined(PROG) .MAIN: all all: ${PROG} _SUBDIRUSE .if !target(clean) clean: _SUBDIRUSE rm -f a.out [Ee]rrs mklog core *.core \ ${PROG} ${OBJS} ${LOBJS} ${CLEANFILES} .endif cleandir: _SUBDIRUSE clean .if !target(install) .if !target(beforeinstall) beforeinstall: .endif .if !target(afterinstall) afterinstall: .endif .if !target(realinstall) realinstall: .if defined(PROG) ${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP} -o ${BINOWN} -g ${BINGRP} \ -m ${BINMODE} ${PROG} ${DESTDIR}${BINDIR}/${PROG} .endif .endif install: maninstall _SUBDIRUSE .if defined(LINKS) && !empty(LINKS) . for lnk file in ${LINKS} @l=${DESTDIR}${lnk}; \ t=${DESTDIR}${file}; \ echo $$t -\> $$l; \ rm -f $$t; ln $$l $$t . endfor .endif maninstall: afterinstall afterinstall: realinstall realinstall: beforeinstall .endif .if !target(lint) lint: ${LOBJS} .if defined(LOBJS) && !empty(LOBJS) @${LINT} ${LINTFLAGS} ${LDFLAGS:M-L*} ${LOBJS} ${LDADD} .endif .endif .if !defined(NOMAN) .include <bsd.man.mk> .endif .if !defined(NONLS) .include <bsd.nls.mk> .endif .include <bsd.obj.mk> .include <bsd.dep.mk> .include <bsd.subdir.mk> .include <bsd.sys.mk> --- NEW FILE: bsd.lkm.mk --- # $OpenBSD: bsd.lkm.mk,v 1.19 2003/05/20 22:49:13 millert Exp $ .if exists(${.CURDIR}/../Makefile.inc) .include "${.CURDIR}/../Makefile.inc" .endif .include <bsd.own.mk> .SUFFIXES: .out .o .c .cc .C .y .l .s .8 .7 .6 .5 .4 .3 .2 .1 .0 # XXX In order to at least diminish the brokenness of trusting /sys to point # to the tree we're actually belonging to we check BSDSRCDIR. On multi-tree # machines /sys isn't always a link to the correct tree. .if defined(BSDSRCDIR) CFLAGS+= ${COPTS} -D_KERNEL -D_LKM -I${BSDSRCDIR}/sys -I${BSDSRCDIR}/sys/arch .else CFLAGS+= ${COPTS} -D_KERNEL -D_LKM -I/sys -I/sys/arch .endif .if ${WARNINGS:L} == "yes" CFLAGS+= ${CDIAGFLAGS} .endif LDFLAGS+= -r .if defined(LKM) SRCS?= ${LKM}.c .if !empty(SRCS:N*.h:N*.sh) OBJS+= ${SRCS:N*.h:N*.sh:R:S/$/.o/g} LOBJS+= ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln} .endif COMBINED?=combined.o .if !defined(POSTINSTALL) POSTINSTALL= ${LKM}install .endif .if defined(OBJS) && !empty(OBJS) ${COMBINED}: ${OBJS} ${DPADD} ${LD} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} .endif # defined(OBJS) && !empty(OBJS) .if !defined(MAN) MAN= ${LKM}.1 .endif # !defined(MAN) .endif # defined(LKM) .MAIN: all all: ${COMBINED} _SUBDIRUSE .if !target(clean) clean: _SUBDIRUSE rm -f a.out [Ee]rrs mklog core *.core \ ${LKM} ${COMBINED} ${OBJS} ${LOBJS} ${CLEANFILES} .endif cleandir: _SUBDIRUSE clean .if !target(install) .if !target(beforeinstall) beforeinstall: .endif .if !target(afterinstall) afterinstall: .endif .if !target(realinstall) realinstall: .if defined(LKM) ${INSTALL} ${INSTALL_COPY} -o ${LKMOWN} -g ${LKMGRP} -m ${LKMMODE} \ ${COMBINED} ${DESTDIR}${LKMDIR}/${LKM}.o .if exists(${.CURDIR}/${POSTINSTALL}) ${INSTALL} ${INSTALL_COPY} -o ${LKMOWN} -g ${LKMGRP} -m 555 \ ${.CURDIR}/${POSTINSTALL} ${DESTDIR}${LKMDIR} .endif .endif .endif load: ${COMBINED} if [ -x ${.CURDIR}/${POSTINSTALL} ]; then \ modload -d -o $(LKM) -e$(LKM) -p${.CURDIR}/${POSTINSTALL} $(COMBINED); \ else \ modload -d -o $(LKM) -e$(LKM) $(COMBINED); \ fi unload: modunload -n $(LKM) install: maninstall _SUBDIRUSE .if defined(LINKS) && !empty(LINKS) @set ${LINKS}; \ while test $$# -ge 2; do \ l=${DESTDIR}${LKMDIR}/$$1; \ shift; \ t=${DESTDIR}${LKMDIR}/$$1; \ shift; \ echo $$t -\> $$l; \ rm -f $$t; \ ln $$l $$t; \ done; true .endif maninstall: afterinstall afterinstall: realinstall realinstall: beforeinstall .endif .if !target(lint) lint: ${LOBJS} .if defined(LOBJS) && !empty(LOBJS) @${LINT} ${LINTFLAGS} ${LDFLAGS:M-L*} ${LOBJS} ${LDADD} .endif .endif .if !defined(NOMAN) .include <bsd.man.mk> .endif .if !defined(NONLS) .include <bsd.nls.mk> .endif .include <bsd.obj.mk> .include <bsd.dep.mk> .include <bsd.subdir.mk> .include <bsd.sys.mk> .PHONY: load unload --- NEW FILE: bsd.dep.mk --- # $OpenBSD: bsd.dep.mk,v 1.5 2003/08/07 11:24:03 espie Exp $ # $NetBSD: bsd.dep.mk,v 1.12 1995/09/27 01:15:09 christos Exp $ # some of the rules involve .h sources, so remove them from mkdep line .if !target(depend) depend: beforedepend .depend _SUBDIRUSE afterdepend . if defined(SRCS) .depend: ${SRCS} @rm -f .depend @files="${.ALLSRC:M*.s} ${.ALLSRC:M*.S}"; \ if [ "$$files" != " " ]; then \ echo mkdep -a ${MKDEP} ${CFLAGS:M-[ID]*} ${CPPFLAGS} ${AINC} $$files;\ mkdep -a ${MKDEP} ${CFLAGS:M-[ID]*} ${CPPFLAGS} ${AINC} $$files; \ fi @files="${.ALLSRC:M*.c}"; \ if [ "$$files" != "" ]; then \ echo mkdep -a ${MKDEP} ${CFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ mkdep -a ${MKDEP} ${CFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ fi @files="${.ALLSRC:M*.cc} ${.ALLSRC:M*.C} ${.ALLSRC:M*.cxx}"; \ if [ "$$files" != " " ]; then \ echo mkdep -a ${MKDEP} ${CXXFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ mkdep -a ${MKDEP} ${CXXFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ fi . else .depend: . endif . if !target(beforedepend) beforedepend: . endif . if !target(afterdepend) afterdepend: . endif .endif .if !target(tags) . if defined(SRCS) tags: ${SRCS} _SUBDIRUSE -cd ${.CURDIR}; ${CTAGS} -f /dev/stdout ${.ALLSRC:N*.h} | \ sed "s;\${.CURDIR}/;;" > tags . else tags: . endif .endif .if defined(SRCS) cleandir: cleandepend cleandepend: rm -f .depend ${.CURDIR}/tags .endif .PHONY: beforedepend depend afterdepend cleandepend --- NEW FILE: bsd.regress.mk --- # $OpenBSD: bsd.regress.mk,v 1.10 2002/09/02 19:56:55 avsm Exp $ # Documented in bsd.regress.mk(5) # No man pages for regression tests. NOMAN= # No installation. install: # If REGRESS_TARGETS is defined and PROG is not defined, set NOPROG .if defined(REGRESS_TARGETS) && !defined(PROG) NOPROG= .endif .include <bsd.prog.mk> .MAIN: all all: regress # Check for deprecated REGRESS* variables and assign them to the # new versions if the new version is not already defined. _REGRESS_DEPRECATED=LOG:LOG SKIPTARGETS:SKIP_TARGETS SKIPSLOW:SKIP_SLOW \ SKIP:SKIP TARGETS:TARGETS MAXTIME:MAXTIME ROOTTARGETS:ROOT_TARGETS .for _I in ${_REGRESS_DEPRECATED} _REGRESS_OLD=REGRESS${_I:C/\:.*//} _REGRESS_NEW=REGRESS_${_I:C/.*\://} . if defined(${_REGRESS_OLD}) ERRORS:= ${ERRORS} "Warning: ${_REGRESS_OLD} is deprecated, use ${_REGRESS_NEW} instead." . if !defined(${_REGRESS_NEW}) ${_REGRESS_NEW}:=${${_REGRESS_OLD}} . endif . endif .endfor # XXX - Need full path to REGRESS_LOG, otherwise there will be much pain. REGRESS_LOG?=/dev/null REGRESS_SKIP_TARGETS?= REGRESS_SKIP_SLOW?=no _REGRESS_NAME=${.CURDIR:S/${BSDSRCDIR}\/regress\///} _REGRESS_TMP?=/dev/null _REGRESS_OUT= | tee -a ${REGRESS_LOG} ${_REGRESS_TMP} 2>&1 > /dev/null .if defined(PROG) && !empty(PROG) run-regress-${PROG}: ${PROG} ./${PROG} .endif .if !defined(REGRESS_TARGETS) REGRESS_TARGETS=run-regress-${PROG} . if defined(REGRESS_SKIP) REGRESS_SKIP_TARGETS=run-regress-${PROG} . endif .endif .if defined(REGRESS_SLOW_TARGETS) && !empty(REGRESS_SKIP_SLOW) REGRESS_SKIP_TARGETS+=${REGRESS_SLOW_TARGETS} .endif .if defined(REGRESS_ROOT_TARGETS) _ROOTUSER!=id -g SUDO?= . if (${_ROOTUSER} != 0) && empty(SUDO) REGRESS_SKIP_TARGETS+=${REGRESS_ROOT_TARGETS} . endif .endif .if defined(ERRORS) .BEGIN: . for _m in ${ERRORS} @echo 1>&2 ${_m} . endfor . if !empty(ERRORS:M"Fatal\:*") || !empty(ERRORS:M'Fatal\:*') @exit 1 . endif .endif regress: .SILENT .if ! ${REGRESS_LOG:M/*} echo ========================================================= echo REGRESS_LOG must contain an absolute path to the log-file. echo It currently points to: ${REGRESS_LOG} echo ========================================================= exit 1 .endif .for RT in ${REGRESS_TARGETS} . if ${REGRESS_SKIP_TARGETS:M${RT}} @echo -n "SKIP " ${_REGRESS_OUT} . else # XXX - we need a better method to see if a test fails due to timeout or just # normal failure. . if !defined(REGRESS_MAXTIME) -if cd ${.CURDIR} && ${MAKE} ${RT}; then \ echo -n "SUCCESS " ${_REGRESS_OUT} ; \ else \ echo -n "FAIL " ${_REGRESS_OUT} ; \ echo FAILED ; \ fi . else -if cd ${.CURDIR} && (ulimit -t ${REGRESS_MAXTIME} ; ${MAKE} ${RT}); then \ echo -n "SUCCESS " ${_REGRESS_OUT} ; \ else \ echo -n "FAIL (possible timeout) " ${_REGRESS_OUT} ; \ echo FAILED ; \ fi . endif . endif @echo ${_REGRESS_NAME}/${RT:S/^run-regress-//} ${_REGRESS_OUT} .endfor .PHONY: regress --- NEW FILE: bsd.subdir.mk --- # $OpenBSD: bsd.subdir.mk,v 1.14 2005/02/05 10:39:50 espie Exp $ # $NetBSD: bsd.subdir.mk,v 1.11 1996/04/04 02:05:06 jtc Exp $ # @(#)bsd.subdir.mk 5.9 (Berkeley) 2/1/91 .if !target(.MAIN) .MAIN: all .endif # Make sure this is defined SKIPDIR?= _SUBDIRUSE: .USE .if defined(SUBDIR) @for entry in ${SUBDIR}; do \ (set -e; if test -d ${.CURDIR}/$${entry}.${MACHINE}; then \ _newdir_="$${entry}.${MACHINE}"; \ else \ _newdir_="$${entry}"; \ fi; \ if test X"${_THISDIR_}" = X""; then \ _nextdir_="$${_newdir_}"; \ else \ _nextdir_="$${_THISDIR_}/$${_newdir_}"; \ fi; \ _makefile_spec_=""; \ if [ -e ${.CURDIR}/$${_newdir_}/Makefile.bsd-wrapper ]; then \ _makefile_spec_="-f Makefile.bsd-wrapper"; \ fi; \ subskipdir=''; \ for skipdir in ${SKIPDIR}; do \ subentry=$${skipdir#$${entry}}; \ if [ X$${subentry} != X$${skipdir} ]; then \ if [ X$${subentry} = X ]; then \ echo "($${_nextdir_} skipped)"; \ break; \ fi; \ subskipdir="$${subskipdir} $${subentry#/}"; \ fi; \ done; \ if [ X$${skipdir} = X -o X$${subentry} != X ]; then \ echo "===> $${_nextdir_}"; \ cd ${.CURDIR}/$${_newdir_}; \ ${MAKE} SKIPDIR="$${subskipdir}" \ $${_makefile_spec_} _THISDIR_="$${_nextdir_}" \ ${MAKE_FLAGS} \ ${.TARGET:S/realinstall/install/:S/.depend/depend/}; \ fi); \ done ${SUBDIR}:: @set -e; if test -d ${.CURDIR}/${.TARGET}.${MACHINE}; then \ _newdir_=${.TARGET}.${MACHINE}; \ else \ _newdir_=${.TARGET}; \ fi; \ _makefile_spec_=""; \ if [ -f ${.CURDIR}/$${_newdir_}/Makefile.bsd-wrapper ]; then \ _makefile_spec_="-f Makefile.bsd-wrapper"; \ fi; \ echo "===> $${_newdir_}"; \ cd ${.CURDIR}/$${_newdir_}; \ ${MAKE} ${MAKE_FLAGS} $${_makefile_spec_} _THISDIR_="$${_newdir_}" all .endif .if !target(install) . if !target(beforeinstall) beforeinstall: . endif . if !target(afterinstall) afterinstall: . endif install: maninstall maninstall: afterinstall afterinstall: realinstall realinstall: beforeinstall _SUBDIRUSE .endif .for t in all clean cleandir includes depend lint obj tags regress . if !target($t) $t: _SUBDIRUSE . endif .endfor .if !defined(BSD_OWN_MK) . include <bsd.own.mk> .endif --- NEW FILE: bsd.doc.mk --- # $OpenBSD: bsd.doc.mk,v 1.8 2001/04/03 23:00:09 espie Exp $ # $NetBSD: bsd.doc.mk,v 1.20 1994/07/26 19:42:37 mycroft Exp $ # @(#)bsd.doc.mk 8.1 (Berkeley) 8/14/93 BIB?= bib EQN?= eqn GREMLIN?= grn GRIND?= vgrind -f INDXBIB?= indxbib PIC?= pic REFER?= refer ROFF?= groff -M/usr/share/tmac ${MACROS} ${PAGES} SOELIM?= soelim TBL?= tbl .PATH: ${.CURDIR} .if !target(all) .MAIN: all all: paper.ps .endif .if !target(paper.ps) paper.ps: ${SRCS} ${ROFF} ${SRCS} > ${.TARGET} .endif .if !target(print) print: paper.ps lpr -P${PRINTER} paper.ps .endif .if !target(manpages) manpages: .endif .if !target(obj) obj: .endif clean cleandir: rm -f paper.* [eE]rrs mklog ${CLEANFILES} FILES?= ${SRCS} install: ${INSTALL} ${INSTALL_COPY} -o ${DOCOWN} -g ${DOCGRP} -m ${DOCMODE} \ Makefile ${FILES} ${EXTRA} ${DESTDIR}${DOCDIR}/${DIR} spell: paper.spell paper.spell: ${SRCS} spell ${SRCS} | sort | comm -23 - spell.ok > paper.spell .include <bsd.own.mk> --- NEW FILE: bsd.port.subdir.mk --- .include <bsd.own.mk> PORTSDIR?= /usr/ports .include "${PORTSDIR}/infrastructure/mk/bsd.port.subdir.mk" # if you can't find this file, cvs update your ports tree as well. --- NEW FILE: bsd.man.mk --- # $OpenBSD: bsd.man.mk,v 1.28 2004/02/08 01:19:54 espie Exp $ # $NetBSD: bsd.man.mk,v 1.23 1996/02/10 07:49:33 jtc Exp $ # @(#)bsd.man.mk 5.2 (Berkeley) 5/11/90 MANTARGET?= cat NROFF?= nroff -Tascii TBL?= tbl MANLINT?= \# .if !target(.MAIN) . if exists(${.CURDIR}/../Makefile.inc) . include "${.CURDIR}/../Makefile.inc" . endif .MAIN: all .endif .SUFFIXES: .1 .2 .3 .3p .4 .5 .6 .7 .8 .9 \ .1tbl .2tbl .3tbl .4tbl .5tbl .6tbl .7tbl .8tbl .9tbl \ .cat1 .cat2 .cat3 .cat3p .cat4 .cat5 .cat6 .cat7 .cat8 .cat9 \ .ps1 .ps2 .ps3 .ps3p .ps4 .ps5 .ps6 .ps7 .ps8 .ps9 .9.cat9 .8.cat8 .7.cat7 .6.cat6 .5.cat5 .4.cat4 .3p.cat3p .3.cat3 .2.cat2 .1.cat1: @echo "${NROFF} -mandoc ${.IMPSRC} > ${.TARGET}" @${MANLINT} ${.IMPSRC} @${NROFF} -mandoc ${.IMPSRC} > ${.TARGET} || (rm -f ${.TARGET}; false) .9tbl.cat9 .8tbl.cat8 .7tbl.cat7 .6tbl.cat6 .5tbl.cat5 .4tbl.cat4 .3tbl.cat3 \ .2tbl.cat2 .1tbl.cat1: @echo "${TBL} ${.IMPSRC} | ${NROFF} -mandoc > ${.TARGET}" @${MANLINT} -tbl ${.IMPSRC} @${TBL} ${.IMPSRC} | ${NROFF} -mandoc > ${.TARGET} || \ (rm -f ${.TARGET}; false) .9.ps9 .8.ps8 .7.ps7 .6.ps6 .5.ps5 .4.ps4 .3p.ps3p .3.ps3 .2.ps2 .1.ps1: @echo "nroff -Tps -mandoc ${.IMPSRC} > ${.TARGET}" @nroff -Tps -mandoc ${.IMPSRC} > ${.TARGET} || (rm -f ${.TARGET}; false) .9tbl.ps9 .8tbl.ps8 .7tbl.ps7 .6tbl.ps6 .5tbl.ps5 .4tbl.ps4 .3tbl.ps3 \ .2tbl.ps2 .1tbl.ps1: @echo "${TBL} ${.IMPSRC} | nroff -Tps -mandoc > ${.TARGET}" @${TBL} ${.IMPSRC} | nroff -Tps -mandoc > ${.TARGET} || (rm -f ${.TARGET}; false) .if defined(MAN) && !empty(MAN) && !defined(MANALL) . for v s in MANALL .cat PS2ALL .ps $v= ${MAN:S/.1$/$s1/g:S/.2$/$s2/g:S/.3$/$s3/g:S/.3p$/$s3p/g:S/.4$/$s4/g:S/.5$/$s5/g:S/.6$/$s6/g:S/.7$/$s7/g:S/.8$/$s8/g:S/.9$/$s9/g:S/.1tbl$/$s1/g:S/.2tbl$/$s2/g:S/.3tbl$/$s3/g:S/.4tbl$/$s4/g:S/.5tbl$/$s5/g:S/.6tbl$/$s6/g:S/.7tbl$/$s7/g:S/.8tbl$/$s8/g:S/.9tbl$/$s9/g} . endfor . if defined(MANPS) PSALL=${PS2ALL} . endif .endif MINSTALL= ${INSTALL} ${INSTALL_COPY} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} .if defined(MANZ) # chown and chmod are done afterward automatically MCOMPRESS= gzip -cf MCOMPRESSSUFFIX= .gz .endif .if defined(MANSUBDIR) # Add / so that we don't have to specify it. Better arch -> MANSUBDIR mapping MANSUBDIR:=${MANSUBDIR:S,^,/,} .else # XXX MANSUBDIR must be non empty for the mlink loops to work MANSUBDIR='' .endif .if !defined(MCOMPRESS) || empty(MCOMPRESS) install_manpage_fragment= \ echo ${MINSTALL} $$page $$instpage; \ ${MINSTALL} $$page $$instpage .else install_manpage_fragment= \ rm -f $$instpage; \ echo ${MCOMPRESS} $$page \> $$instpage; \ ${MCOMPRESS} $$page > $$instpage; \ chown ${MANOWN}:${MANGRP} $$instpage; \ chmod ${MANMODE} $$instpage .endif maninstall: .for v d s t in MANALL ${MANDIR} .cat .0 PSALL ${PSDIR} .ps .ps . if defined($v) @for page in ${$v}; do \ set -- ${MANSUBDIR}; \ subdir=$$1; \ dir=${DESTDIR}$d$${page##*$s}; \ base=$${page##*/}; \ instpage=$${dir}$${subdir}/$${base%.*}$t${MCOMPRESSSUFFIX}; \ ${install_manpage_fragment}; \ while test $$# -ge 2; do \ shift; \ extra=$${dir}$$1/$${base%.*}$t${MCOMPRESSSUFFIX}; \ echo $$extra -\> $$instpage; \ ln -f $$instpage $$extra; \ done; \ done . endif .endfor .if defined(MLINKS) && !empty(MLINKS) . for sub in ${MANSUBDIR} . for lnk file in ${MLINKS} @l=${DESTDIR}${MANDIR}${lnk:E}${sub}/${lnk:R}.0${MCOMPRESSSUFFIX}; \ t=${DESTDIR}${MANDIR}${file:E}${sub}/${file:R}.0${MCOMPRESSSUFFIX}; \ echo $$t -\> $$l; \ rm -f $$t; ln $$l $$t; . endfor . endfor .endif .if (defined(MANALL) || defined(PSALL)) && !defined(MANLOCALBUILD) all: ${MANALL} ${PSALL} cleandir: cleanman cleanman: rm -f ${MANALL} ${PS2ALL} .endif --- NEW FILE: bsd.sys.mk --- # $OpenBSD: bsd.sys.mk,v 1.8 2000/07/06 23:12:41 millert Exp $ # $NetBSD: bsd.sys.mk,v 1.2 1995/12/13 01:25:07 cgd Exp $ # # Overrides used for OpenBSD source tree builds. #CFLAGS+= -Werror .if defined(DESTDIR) CPPFLAGS+= -nostdinc -idirafter ${DESTDIR}/usr/include CXXFLAGS+= -idirafter ${DESTDIR}/usr/include/g++ .endif .if defined(PARALLEL) # Lex .l: ${LEX.l} -o${.TARGET:R}.yy.c ${.IMPSRC} ${LINK.c} -o ${.TARGET} ${.TARGET:R}.yy.c ${LDLIBS} -ll rm -f ${.TARGET:R}.yy.c .l.c: ${LEX.l} -o${.TARGET} ${.IMPSRC} .l.o: ${LEX.l} -o${.TARGET:R}.yy.c ${.IMPSRC} ${COMPILE.c} -o ${.TARGET} ${.TARGET:R}.yy.c rm -f ${.TARGET:R}.yy.c # Yacc .y: ${YACC.y} -b ${.TARGET:R} ${.IMPSRC} ${LINK.c} -o ${.TARGET} ${.TARGET:R}.tab.c ${LDLIBS} rm -f ${.TARGET:R}.tab.c .y.c: ${YACC.y} -b ${.TARGET:R} ${.IMPSRC} mv ${.TARGET:R}.tab.c ${.TARGET} .y.o: ${YACC.y} -b ${.TARGET:R} ${.IMPSRC} ${COMPILE.c} -o ${.TARGET} ${.TARGET:R}.tab.c rm -f ${.TARGET:R}.tab.c .endif --- NEW FILE: bsd.port.mk --- .include <bsd.own.mk> PORTSDIR?= /usr/ports .include "${PORTSDIR}/infrastructure/mk/bsd.port.mk" # if you can't find this file, cvs update your ports tree as well. --- NEW FILE: bsd.nls.mk --- # $OpenBSD: bsd.nls.mk,v 1.6 2002/11/21 03:08:44 marc Exp $ # $NetBSD: bsd.nls.mk,v 1.2 1995/04/27 18:05:38 jtc Exp $ .if !target(.MAIN) .MAIN: all .endif .SUFFIXES: .cat .msg .msg.cat: @rm -f ${.TARGET} gencat ${.TARGET} ${.IMPSRC} .if defined(NLS) && !empty(NLS) NLSALL= ${NLS:.msg=.cat} .endif .if !defined(NLSNAME) .if defined(PROG) NLSNAME=${PROG} .else NLSNAME=lib${LIB} .endif .endif nlsinstall: .if defined(NLSALL) @for msg in ${NLSALL}; do \ NLSLANG=`basename $$msg .cat`; \ dir=${DESTDIR}${NLSDIR}/$${NLSLANG}; \ ${INSTALL} -d $$dir; \ ${INSTALL} ${INSTALL_COPY} -o ${NLSOWN} -g ${NLSGRP} -m ${NLSMODE} $$msg $$dir/${NLSNAME}.cat; \ done .endif .if defined(NLSALL) all: ${NLSALL} install: nlsinstall cleandir: cleannls cleannls: rm -f ${NLSALL} .endif --- NEW FILE: bsd.obj.mk --- # $OpenBSD: bsd.obj.mk,v 1.12 2003/10/28 17:09:33 espie Exp $ # $NetBSD: bsd.obj.mk,v 1.9 1996/04/10 21:08:05 thorpej Exp $ .if !target(obj) . if defined(NOOBJ) obj: . else . if defined(MAKEOBJDIR) __baseobjdir= ${MAKEOBJDIR} . else __baseobjdir= obj . endif . if defined(OBJMACHINE) __objdir= ${__baseobjdir}.${MACHINE} . else __objdir= ${__baseobjdir} . endif . if defined(USR_OBJMACHINE) __usrobjdir= ${BSDOBJDIR}.${MACHINE} __usrobjdirpf= . else __usrobjdir= ${BSDOBJDIR} . if defined(OBJMACHINE) __usrobjdirpf= .${MACHINE} . else __usrobjdirpf= . endif . endif _SUBDIRUSE: obj! _SUBDIRUSE @cd ${.CURDIR}; \ here=`/bin/pwd`; bsdsrcdir=`cd ${BSDSRCDIR}; /bin/pwd`; \ subdir=$${here#$${bsdsrcdir}/}; \ if test $$here != $$subdir ; then \ dest=${__usrobjdir}/$$subdir${__usrobjdirpf} ; \ echo "$$here/${__objdir} -> $$dest"; \ if test ! -L ${__objdir} -o \ X`readlink ${__objdir}` != X$$dest; \ then \ if test -e ${__objdir}; then rm -rf ${__objdir}; fi; \ ln -sf $$dest ${__objdir}; \ fi; \ if test -d ${__usrobjdir} -a ! -d $$dest; then \ mkdir -p $$dest; \ else \ true; \ fi; \ else \ true ; \ dest=$$here/${__objdir} ; \ if test ! -d ${__objdir} ; then \ echo "making $$dest" ; \ mkdir $$dest; \ fi ; \ fi; . endif .endif --- NEW FILE: bsd.lib.mk --- # $OpenBSD: bsd.lib.mk,v 1.43 2004/09/20 18:52:38 espie Exp $ # $NetBSD: bsd.lib.mk,v 1.67 1996/01/17 20:39:26 mycroft Exp $ # @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91 .include <bsd.own.mk> # for 'NOPIC' definition .if exists(${.CURDIR}/../Makefile.inc) .include "${.CURDIR}/../Makefile.inc" .endif .if exists(${.CURDIR}/shlib_version) .include "${.CURDIR}/shlib_version" SHLIB_MAJOR=${major} SHLIB_MINOR=${minor} .endif .MAIN: all # 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. # .m for objective c files. .SUFFIXES: .SUFFIXES: .out .o .go .po .so .S .s .c .cc .C .cxx .f .y .l .ln .m4 .m .c.o: @echo "${COMPILE.c} ${.IMPSRC} -o ${.TARGET}" @${COMPILE.c} ${.IMPSRC} -o ${.TARGET}.o @${LD} -x -r ${.TARGET}.o -o ${.TARGET} @rm -f ${.TARGET}.o .c.go: @echo "${COMPILE.c} -g ${.IMPSRC} -o ${.TARGET}" @${COMPILE.c} -g ${.IMPSRC} -o ${.TARGET}.o @${LD} -X -r ${.TARGET}.o -o ${.TARGET} @rm -f ${.TARGET}.o .c.po: @echo "${COMPILE.c} -p ${.IMPSRC} -o ${.TARGET}" @${COMPILE.c} -p ${.IMPSRC} -o ${.TARGET}.o @${LD} -X -r ${.TARGET}.o -o ${.TARGET} @rm -f ${.TARGET}.o .c.so: @echo "${COMPILE.c} ${PICFLAG} -DPIC ${.IMPSRC} -o ${.TARGET}" @${COMPILE.c} ${PICFLAG} -DPIC ${.IMPSRC} -o ${.TARGET}.o @${LD} -x -r ${.TARGET}.o -o ${.TARGET} @rm -f ${.TARGET}.o .c.ln: ${LINT} ${LINTFLAGS} ${CFLAGS:M-[IDU]*} ${CPPFLAGS:M-[IDU]*} -i ${.IMPSRC} .cc.o .C.o .cxx.o: @echo "${COMPILE.cc} ${.IMPSRC} -o ${.TARGET}" @${COMPILE.cc} ${.IMPSRC} -o ${.TARGET}.o @${LD} -x -r ${.TARGET}.o -o ${.TARGET} @rm -f ${.TARGET}.o .cc.go .C.go .cxx.go: @echo "${COMPILE.cc} -g ${.IMPSRC} -o ${.TARGET}" @${COMPILE.cc} -g ${.IMPSRC} -o ${.TARGET}.o @${LD} -X -r ${.TARGET}.o -o ${.TARGET} @rm -f ${.TARGET}.o .cc.po .C.po .cxx.po: @echo "${COMPILE.cc} -p ${.IMPSRC} -o ${.TARGET}" @${COMPILE.cc} -p ${.IMPSRC} -o ${.TARGET}.o @${LD} -X -r ${.TARGET}.o -o ${.TARGET} @rm -f ${.TARGET}.o .cc.so .C.so .cxx.so: @echo "${COMPILE.cc} ${PICFLAG} -DPIC ${.IMPSRC} -o ${.TARGET}" @${COMPILE.cc} ${PICFLAG} -DPIC ${.IMPSRC} -o ${.TARGET}.o @${LD} -x -r ${.TARGET}.o -o ${.TARGET} @rm -f ${.TARGET}.o .S.o .s.o: .if (${MACHINE_ARCH} == "arm") @echo ${COMPILE.S:Q} ${CPPFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} @${COMPILE.S} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o .else @echo "${CPP} ${CPPFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} | \ ${AS} -o ${.TARGET}" @${CPP} ${CPPFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} | \ ${AS} -o ${.TARGET}.o .endif @${LD} -x -r ${.TARGET}.o -o ${.TARGET} @rm -f ${.TARGET}.o .S.go .s.go: @echo "${CPP} ${CPPFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} |\ ${AS} -o ${.TARGET}" @${CPP} ${CPPFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} | \ ${AS} -o ${.TARGET}.o @${LD} -X -r ${.TARGET}.o -o ${.TARGET} @rm -f ${.TARGET}.o .S.po .s.po: @echo "${CPP} -DPROF ${CPPFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} |\ ${AS} -o ${.TARGET}" @${CPP} -DPROF ${CPPFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} | \ ${AS} -o ${.TARGET}.o @${LD} -X -r ${.TARGET}.o -o ${.TARGET} @rm -f ${.TARGET}.o .S.so .s.so: @echo "${CPP} -DPIC ${CPPFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} | \ ${AS} ${ASPICFLAG} -o ${.TARGET}" @${CPP} -DPIC ${CPPFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} | \ ${AS} ${ASPICFLAG} -o ${.TARGET}.o @${LD} -x -r ${.TARGET}.o -o ${.TARGET} @rm -f ${.TARGET}.o .if ${WARNINGS:L} == "yes" CFLAGS+= ${CDIAGFLAGS} CXXFLAGS+= ${CXXDIAGFLAGS} .endif CFLAGS+= ${COPTS} CXXFLAGS+= ${CXXOPTS} _LIBS=lib${LIB}.a .if (${DEBUGLIBS:L} == "yes") _LIBS+=lib${LIB}_g.a .endif .if !defined(NOPROFILE) _LIBS+=lib${LIB}_p.a .endif .if !defined(NOPIC) .if (${MACHINE_ARCH} != "mips64") _LIBS+=lib${LIB}_pic.a .endif .if defined(SHLIB_MAJOR) && defined(SHLIB_MINOR) _LIBS+=lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} .endif .endif .if !defined(NOLINT) _LIBS+=llib-l${LIB}.ln .endif all: ${_LIBS} _SUBDIRUSE OBJS+= ${SRCS:N*.h:R:S/$/.o/g} lib${LIB}.a:: ${OBJS} @echo building standard ${LIB} library @rm -f lib${LIB}.a @${AR} cq lib${LIB}.a `${LORDER} ${OBJS} | tsort -q` ${RANLIB} lib${LIB}.a GOBJS+= ${OBJS:.o=.go} lib${LIB}_g.a:: ${GOBJS} @echo building debugging ${LIB} library @rm -f lib${LIB}_g.a @${AR} cq lib${LIB}_g.a `${LORDER} ${GOBJS} | tsort -q` ${RANLIB} lib${LIB}_g.a POBJS+= ${OBJS:.o=.po} lib${LIB}_p.a:: ${POBJS} @echo building profiled ${LIB} library @rm -f lib${LIB}_p.a @${AR} cq lib${LIB}_p.a `${LORDER} ${POBJS} | tsort -q` ${RANLIB} lib${LIB}_p.a SOBJS+= ${OBJS:.o=.so} lib${LIB}_pic.a:: ${SOBJS} @echo building shared object ${LIB} library @rm -f lib${LIB}_pic.a @${AR} cq lib${LIB}_pic.a `${LORDER} ${SOBJS} | tsort -q` ${RANLIB} lib${LIB}_pic.a lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: ${SOBJS} ${DPADD} @echo building shared ${LIB} library \(version ${SHLIB_MAJOR}.${SHLIB_MINOR}\) @rm -f lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} ${CC} -shared ${PICFLAG} \ -o lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ `${LORDER} ${SOBJS}|tsort -q` ${LDADD} LOBJS+= ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln} # the following looks XXX to me... -- cgd LLIBS?= -lc llib-l${LIB}.ln: ${LOBJS} @echo building llib-l${LIB}.ln @rm -f llib-l${LIB}.ln @${LINT} -C${LIB} ${LOBJS} ${LLIBS} .if !target(clean) clean: _SUBDIRUSE rm -f a.out [Ee]rrs mklog core *.core ${CLEANFILES} rm -f lib${LIB}.a ${OBJS} rm -f lib${LIB}_g.a ${GOBJS} rm -f lib${LIB}_p.a ${POBJS} rm -f lib${LIB}_pic.a lib${LIB}.so.*.* ${SOBJS} rm -f llib-l${LIB}.ln ${LOBJS} .endif cleandir: _SUBDIRUSE clean .if defined(SRCS) afterdepend: .depend @(TMP=`mktemp -q /tmp/_dependXXXXXXXXXX`; \ if [ $$? -ne 0 ]; then \ echo "$$0: cannot create temp file, exiting..."; \ exit 1; \ fi; \ sed -e 's/^\([^\.]*\).o[ ]*:/\1.o \1.po \1.so:/' \ < .depend > $$TMP; \ mv $$TMP .depend) .endif .if !target(install) .if !target(beforeinstall) beforeinstall: .endif realinstall: # ranlib lib${LIB}.a ${INSTALL} ${INSTALL_COPY} -o ${LIBOWN} -g ${LIBGRP} -m 600 lib${LIB}.a \ ${DESTDIR}${LIBDIR} .if (${INSTALL_COPY} != "-p") ${RANLIB} -t ${DESTDIR}${LIBDIR}/lib${LIB}.a .endif chmod ${LIBMODE} ${DESTDIR}${LIBDIR}/lib${LIB}.a .if (${DEBUGLIBS:L} == "yes") # ranlib lib${LIB}_g.a ${INSTALL} ${INSTALL_COPY} -o ${LIBOWN} -g ${LIBGRP} -m 600 \ lib${LIB}_g.a ${DESTDIR}${LIBDIR}/debug/lib${LIB}.a .if (${INSTALL_COPY} != "-p") ${RANLIB} -t ${DESTDIR}${LIBDIR}/debug/lib${LIB}.a .endif chmod ${LIBMODE} ${DESTDIR}${LIBDIR}/debug/lib${LIB}.a .endif .if !defined(NOPROFILE) # ranlib lib${LIB}_p.a ${INSTALL} ${INSTALL_COPY} -o ${LIBOWN} -g ${LIBGRP} -m 600 \ lib${LIB}_p.a ${DESTDIR}${LIBDIR} .if (${INSTALL_COPY} != "-p") ${RANLIB} -t ${DESTDIR}${LIBDIR}/lib${LIB}_p.a .endif chmod ${LIBMODE} ${DESTDIR}${LIBDIR}/lib${LIB}_p.a .endif .if !defined(NOPIC) && (${MACHINE_ARCH} != "mips64") # ranlib lib${LIB}_pic.a ${INSTALL} ${INSTALL_COPY} -o ${LIBOWN} -g ${LIBGRP} -m 600 \ lib${LIB}_pic.a ${DESTDIR}${LIBDIR} .if (${INSTALL_COPY} != "-p") ${RANLIB} -t ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a .endif chmod ${LIBMODE} ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a .endif .if !defined(NOPIC) && defined(SHLIB_MAJOR) && defined(SHLIB_MINOR) ${INSTALL} ${INSTALL_COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} ${DESTDIR}${LIBDIR} .endif .if !defined(NOLINT) ${INSTALL} ${INSTALL_COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ llib-l${LIB}.ln ${DESTDIR}${LINTLIBDIR} .endif .if defined(LINKS) && !empty(LINKS) . for lnk file in ${LINKS} @l=${DESTDIR}${lnk}; \ t=${DESTDIR}${file}; \ echo $$t -\> $$l; \ rm -f $$t; ln $$l $$t . endfor .endif install: maninstall _SUBDIRUSE maninstall: afterinstall afterinstall: realinstall realinstall: beforeinstall .endif .if !defined(NOMAN) .include <bsd.man.mk> .endif .if !defined(NONLS) .include <bsd.nls.mk> .endif .include <bsd.obj.mk> .include <bsd.dep.mk> .include <bsd.subdir.mk> .include <bsd.sys.mk> |