diff options
| author | lukem <lukem@NetBSD.org> | 2003-07-18 08:26:01 +0000 |
|---|---|---|
| committer | lukem <lukem@NetBSD.org> | 2003-07-18 08:26:01 +0000 |
| commit | f134f3dc381b71cbc98aaa098c1750105490b58e (patch) | |
| tree | 884a0c7b4e2f84a093ca74c380bd5e72fc8a82ce | |
| parent | 74182febed5a0be4a2b4293394acec684ca4feac (diff) | |
Add MKUNPRIVED; if not no has the same semantics as if UNPRIVED was defined.
Replace defined(UNPRIVED) tests with ${MKUNPRIVED} != "no"
Add MKUPDATE; if not no has the same semantics as if UPDATE was defined.
Replace defined(UPDATE) tests with ${MKUPDATE} != "no"
Improve documentation for these and other make flags.
| -rw-r--r-- | Makefile | 24 | ||||
| -rw-r--r-- | distrib/sets/Makefile | 14 | ||||
| -rw-r--r-- | etc/Makefile | 23 | ||||
| -rw-r--r-- | gnu/usr.bin/texinfo/install-info/Makefile | 4 | ||||
| -rw-r--r-- | share/man/Makefile | 4 | ||||
| -rw-r--r-- | share/me/Makefile | 8 | ||||
| -rw-r--r-- | share/mk/bsd.README | 182 | ||||
| -rw-r--r-- | share/mk/bsd.doc.mk | 4 | ||||
| -rw-r--r-- | share/mk/bsd.files.mk | 6 | ||||
| -rw-r--r-- | share/mk/bsd.inc.mk | 6 | ||||
| -rw-r--r-- | share/mk/bsd.info.mk | 4 | ||||
| -rw-r--r-- | share/mk/bsd.kinc.mk | 4 | ||||
| -rw-r--r-- | share/mk/bsd.kmod.mk | 4 | ||||
| -rw-r--r-- | share/mk/bsd.man.mk | 8 | ||||
| -rw-r--r-- | share/mk/bsd.nls.mk | 4 | ||||
| -rw-r--r-- | share/mk/bsd.own.mk | 164 | ||||
| -rw-r--r-- | share/mk/bsd.prog.mk | 6 | ||||
| -rw-r--r-- | share/zoneinfo/Makefile | 12 | ||||
| -rw-r--r-- | tools/Makefile.gnuhost | 8 | ||||
| -rw-r--r-- | tools/groff/Makefile | 4 |
20 files changed, 309 insertions, 184 deletions
@@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.213 2003/07/18 02:15:17 lukem Exp $ +# $NetBSD: Makefile,v 1.214 2003/07/18 08:26:01 lukem Exp $ # # This is the top-level makefile for building NetBSD. For an outline of @@ -19,18 +19,21 @@ # DESTDIR is the target directory for installation of the compiled # software. It defaults to /. Note that programs are built against # libraries installed in DESTDIR. -# MKMAN, if set to `no', will prevent building of manual pages. -# MKOBJDIRS, if not set to `no', will build object directories at +# MKMAN, if `no', will prevent building of manual pages. +# MKOBJDIRS, if not `no', will build object directories at # an appropriate point in a build. -# MKSHARE, if set to `no', will prevent building and installing +# MKSHARE, if `no', will prevent building and installing # anything in /usr/share. -# UPDATE, if defined, will avoid a `make cleandir' at the start of +# MKUPDATE, if not `no', will avoid a `make cleandir' at the start of # `make build', as well as having the effects listed in # /usr/share/mk/bsd.README. # NOCLEANDIR, if defined, will avoid a `make cleandir' at the start # of the `make build'. # NOINCLUDES will avoid the `make includes' usually done by `make build'. # +# See mk.conf(5) for more details. +# +# # Targets: # build: # Builds a full release of NetBSD in DESTDIR, except for the @@ -123,7 +126,7 @@ regression-tests: @(cd ${.CURDIR}/regress && ${MAKE} regress) .endif -.if defined(UNPRIVED) +.if ${MKUNPRIVED} != "no" NOPOSTINSTALL= # defined .endif @@ -131,7 +134,7 @@ afterinstall: .if ${MKMAN} != "no" (cd ${.CURDIR}/share/man && ${MAKE} makedb) .endif -.if defined(UNPRIVED) && (${MKINFO} != "no") +.if (${MKUNPRIVED} != "no" && ${MKINFO} != "no") (cd ${.CURDIR}/gnu/usr.bin/texinfo/install-info && ${MAKE} infodir-meta) .endif .if !defined(NOPOSTINSTALL) @@ -159,7 +162,7 @@ postinstall-fix-obsolete: .NOTMAIN # BUILDTARGETS+= check-tools -.if !defined(UPDATE) && !defined(NOCLEANDIR) +.if ${MKUPDATE} == "no" && !defined(NOCLEANDIR) BUILDTARGETS+= cleandir .endif .if ${MKOBJDIRS} != "no" @@ -370,9 +373,10 @@ params: .for var in BSDSRCDIR BSDOBJDIR BUILDID DESTDIR EXTERNAL_TOOLCHAIN \ KERNARCHDIR KERNCONFDIR KERNOBJDIR KERNSRCDIR \ MACHINE MACHINE_ARCH MAKECONF MAKEFLAGS \ - MAKEOBJDIR MAKEOBJDIRPREFIX MKOBJDIRS \ + MAKEOBJDIR MAKEOBJDIRPREFIX \ + MKOBJDIRS MKUNPRIVED MKUPDATE \ RELEASEDIR TOOLCHAIN_MISSING TOOLDIR \ - UNPRIVED UPDATE USETOOLS + USETOOLS .if defined(${var}) @printf "%20s = '%-s'\n" ${var} ${${var}:Q} .else diff --git a/distrib/sets/Makefile b/distrib/sets/Makefile index 6ea14ad933c..a40c20c45ac 100644 --- a/distrib/sets/Makefile +++ b/distrib/sets/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.26 2003/07/10 10:34:13 lukem Exp $ +# $NetBSD: Makefile,v 1.27 2003/07/18 08:26:02 lukem Exp $ # The `all' target must appear before bsd.own.mk is pulled in. all: @@ -43,9 +43,15 @@ makeflist: .PHONY check_DESTDIR # SET BUILDING TARGETS # +.if ${MKUNPRIVED} == "no" +METALOG.unpriv= +.else +METALOG.unpriv= -M ${METALOG} +.endif + .PRECIOUS: checkflist checkflist: check_DESTDIR - ${SETSENV} ${HOST_SH} ${.CURDIR}/checkflist ${UNPRIVED:D-M ${METALOG}} + ${SETSENV} ${HOST_SH} ${.CURDIR}/checkflist ${METALOG.unpriv} .PRECIOUS: checkflist-x11 checkflist-x11: check_DESTDIR @@ -58,7 +64,7 @@ maketars: check_DESTDIR check_RELEASEDIR .endif mkdir -p ${RELEASEDIR}/${MACHINE}/binary/sets ${SETSENV} ${HOST_SH} ${.CURDIR}/maketars -d ${DESTDIR:S,^$,/,} \ - ${UNPRIVED:D-M ${METALOG}} -N ${NETBSDSRCDIR}/etc \ + ${METALOG.unpriv} -N ${NETBSDSRCDIR}/etc \ -t ${RELEASEDIR}/${MACHINE}/binary/sets ${MAKETARSETS} .PRECIOUS: makesrctars @@ -78,7 +84,7 @@ installsets: check_DESTDIR @false .endif ${SETSENV} ${HOST_SH} ${.CURDIR}/maketars -d ${DESTDIR:S,^$,/,} \ - ${UNPRIVED:D-M ${METALOG}} -N ${NETBSDSRCDIR}/etc \ + ${METALOG.unpriv} -N ${NETBSDSRCDIR}/etc \ -i ${INSTALLDIR} ${INSTALLSETS} # diff --git a/etc/Makefile b/etc/Makefile index 3a263ae4aef..f9d29e0e014 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.254 2003/07/10 10:34:17 lukem Exp $ +# $NetBSD: Makefile,v 1.255 2003/07/18 08:26:03 lukem Exp $ # from: @(#)Makefile 8.7 (Berkeley) 5/25/95 # Environment variables without default values: @@ -15,8 +15,7 @@ # ${KERNSRCDIR}/arch/${MACHINE}/compile, but can be overridden. # KERNCONFDIR is where the configuration files for kernels are found; # default is ${KERNSRCDIR}/arch/${MACHINE}/conf but can be overridden. -# UPDATE is normally undefined; if defined, don't do a 'make clean' -# before kernel compile +# MKUPDATE; if not `no', don't do a 'make clean' before kernel compile # NO_SENDMAIL is normally undefined; if defined, it will not do a # `make distribution' in the sendmail config file source directory. # @@ -169,13 +168,13 @@ install-etc-files: check_DESTDIR master.passwd ${DESTDIR}/etc ${TOOL_PWD_MKDB} -p ${PWD_MKDB_ENDIAN} -d ${DESTDIR}/ \ ${DESTDIR}/etc/master.passwd -.if defined(UNPRIVED) +.if ${MKUNPRIVED} != "no" ( \ for metaent in passwd pwd.db spwd.db; do \ echo "./etc/$${metaent} type=file mode=0644 uname=root gname=wheel tags=etc_pkg"; \ done; \ ) | ${METALOG.add} -.endif # UNPRIVED +.endif # MKUNPRIVED != no ${ETC_INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m 555 \ MAKEDEV.local etc.${MACHINE}/MAKEDEV ${DESTDIR}/dev ${ETC_INSTALL_FILE} -o root -g wheel -m 600 \ @@ -301,10 +300,16 @@ install-obsolete-lists: # distrib-dirs -- # Populate $DESTDIR with directories needed by NetBSD # +.if ${MKUNPRIVED} == "no" +TOOL_MTREE.unpriv= +.else +TOOL_MTREE.unpriv= -W +.endif + distrib-dirs: check_DESTDIR ${INSTALL_DIR} -o root -g wheel -m 755 ${BASE_PKG} ${DESTDIR} ${TOOL_MTREE} -def ${.CURDIR}/mtree/NetBSD.dist -N ${.CURDIR} \ - -p ${DESTDIR}/ -U ${UNPRIVED:D-W} + -p ${DESTDIR}/ -U ${TOOL_MTREE.unpriv} # release, snapshot -- @@ -369,7 +374,7 @@ iso-image-md-post: check_DESTDIR check_RELEASEDIR .WAIT iso-image-mi # snap_pre: check_DESTDIR check_RELEASEDIR ${INSTALL} -d -m 755 ${RELEASEDIR} -.ifndef UPDATE +.if ${MKUPDATE} == "no" # Could be a mount point, ignore the errors -/bin/rm -rf ${RELEASEDIR}/${MACHINE} .endif @@ -382,7 +387,7 @@ snap_pre: check_DESTDIR check_RELEASEDIR # Build the install media and notes from distrib # snap_post: check_DESTDIR check_RELEASEDIR -.ifndef UPDATE +.if ${MKUPDATE} == "no" cd ${NETBSDSRCDIR}/distrib && ${MAKE} cleandir .endif cd ${NETBSDSRCDIR}/distrib && ${MAKE} depend && ${MAKE} && \ @@ -439,7 +444,7 @@ _KERNELS_TO_BUILD+=kern-${configfile} kern-${configfile}: cd ${KERNCONFDIR} && ${TOOL_CONFIG} -s ${KERNSRCDIR} \ -b ${KERNOBJDIR}/${configfile:C/.*\///} ${configfile} -.if !defined(UPDATE) +.if ${MKUPDATE} == "no" cd ${KERNOBJDIR}/${configfile:C/.*\///} && ${MAKE} distclean .endif cd ${KERNOBJDIR}/${configfile:C/.*\///} && ${MAKE} depend && ${MAKE} diff --git a/gnu/usr.bin/texinfo/install-info/Makefile b/gnu/usr.bin/texinfo/install-info/Makefile index 0085471dd5f..f4336146d00 100644 --- a/gnu/usr.bin/texinfo/install-info/Makefile +++ b/gnu/usr.bin/texinfo/install-info/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.8 2003/01/17 15:32:24 wiz Exp $ +# $NetBSD: Makefile,v 1.9 2003/07/18 08:26:03 lukem Exp $ PROG= install-info SRCS= install-info.c @@ -8,7 +8,7 @@ SRCS= install-info.c .PATH: ${IDIST}/util ${IDIST}/doc infodir-meta: -.if defined(UNPRIVED) && (${MKINFO} != "no") +.if (${MKUNPRIVED} != "no" && ${MKINFO} != "no") echo "./usr/share/info/dir type=file mode=0644 uname=root gname=wheel" \ | ${METALOG.add} .endif diff --git a/share/man/Makefile b/share/man/Makefile index 0719f00b965..4899c7a4eaf 100644 --- a/share/man/Makefile +++ b/share/man/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.25 2003/07/10 10:34:35 lukem Exp $ +# $NetBSD: Makefile,v 1.26 2003/07/18 08:26:04 lukem Exp $ # from: @(#)Makefile 8.2 (Berkeley) 4/16/94 .include <bsd.own.mk> @@ -8,7 +8,7 @@ SUBDIR= man0 man1 man3 man4 man5 man6 man7 man8 man9 makedb: ${TOOL_MAKEWHATIS} ${DESTDIR}/usr/share/man -.if defined(UNPRIVED) +.if ${MKUNPRIVED} != "no" echo "./usr/share/man/whatis.db type=file mode=0444 uname=root gname=wheel" \ | ${METALOG.add} .endif diff --git a/share/me/Makefile b/share/me/Makefile index 4022991c4f6..f25e1543721 100644 --- a/share/me/Makefile +++ b/share/me/Makefile @@ -1,5 +1,5 @@ # @(#)Makefile 8.2 (Berkeley) 3/27/94 -# $NetBSD: Makefile,v 1.22 2003/06/30 18:52:52 wiz Exp $ +# $NetBSD: Makefile,v 1.23 2003/07/18 08:26:05 lukem Exp $ MELIB= ${BINDIR}/me #TMLIB= ${BINDIR}/tmac @@ -14,7 +14,7 @@ MAN= me.7 .for M in ${MESRCS} proginstall:: ${DESTDIR}${MELIB}/${M} -.if !defined(UPDATE) +.if ${MKUPDATE} == "no" .PHONY: ${DESTDIR}${MELIB}/${M} .endif .if !defined(BUILD) @@ -31,7 +31,7 @@ ${DESTDIR}${MELIB}/${M}: ${M} #.for M in ${TMSRCS} #proginstall:: ${DESTDIR}${TMLIB}/${M} -#.if !defined(UPDATE) +#.if ${MKUPDATE} == "no" #.PHONY: ${DESTDIR}${TMLIB}/${M} #.endif #.if !defined(BUILD) @@ -46,7 +46,7 @@ ${DESTDIR}${MELIB}/${M}: ${M} #.endfor proginstall:: ${DESTDIR}${MELIB}/revisions -.if !defined(UPDATE) +.if ${MKUPDATE} == "no" .PHONY: ${DESTDIR}${MELIB}/revisions .endif .if !defined(BUILD) diff --git a/share/mk/bsd.README b/share/mk/bsd.README index 79e85efe1c2..5125e49eb44 100644 --- a/share/mk/bsd.README +++ b/share/mk/bsd.README @@ -1,4 +1,4 @@ -# $NetBSD: bsd.README,v 1.119 2003/07/18 02:52:51 lukem Exp $ +# $NetBSD: bsd.README,v 1.120 2003/07/18 08:26:05 lukem Exp $ # @(#)bsd.README 8.2 (Berkeley) 4/2/94 This is the README file for the new make "include" files for the BSD @@ -61,8 +61,8 @@ object, and ".so" denotes a shared (position-independent) object. There are various make variables used during the build. Basic rule for the variable naming scheme is as follows: -MKxxx Can be set to `no' by a user to disable functionality. - Defaults to `yes' (or usually does) +MKxxx Can be set to "no" by a user to disable functionality. + Usually defaults to "yes". NOxxx If defined, disables a feature. Not intended for users. @@ -81,64 +81,136 @@ BUILD If defined, 'make install' checks that the targets in the are out of date, instead of blindly trying to install out of date or non-existent targets. -UPDATE If defined, 'make install' only installs targets that are - more recently modified in the source directories that their - installed counterparts. +MKBFD If "no", don't build libbfd, libiberty, or any of the things + that depend on them (binutils/gas/ld, gdb, dbsym, mdsetimage). + Default: yes -UNPRIVED If defined, don't set the owner/group/mode when installing - files or directories, and keep a metadata log of what - the owner/group/mode should be. This allows a - non-root "make install". +MKCRYPTO If "no", no cryptography support will be built into the system, + and also acts as MKKERBEROS=no. + Default: yes -MKBFD If "no", don't build libbfd, libiberty, or any of - the things that depend on them (binutils/gas/ld, - gdb, dbsym, mdsetimage). +MKCRYPTO_IDEA If not "no", IDEA support will be built into libcrypto_idea.a. + Default: no + +MKCRYPTO_MDC2 If not "no", MDC2 support will be built into libcrypto_mdc2.a + Default: no + +MKCRYPTO_RC5 If not "no", RC5 support will be built into libcrypto_rc5.a. + Default: no MKCATPAGES If "no", don't build or install the catman pages. + Default: yes MKDOC If "no", don't build or install the documentation. + Default: yes MKDYNAMICROOT If "no", build programs in /bin and /sbin statically, don't install certain libraries in /lib, and don't install the shared linker into /libexec. - -MKGDB If "no", don't build gdb. + Default: yes MKGCC If "no", don't build gcc or any of the gcc-related libraries (libg2c, libgcc, libobjc, libstdc++). + Default: yes + +MKGDB If "no", don't build gdb. + Default: yes + +MKHESIOD If "no", disables building of Hesiod infrastructure + (libraries and support programs). + Default: yes + +MKHTML If "no", don't build or install the html man pages. + Default: yes MKIEEEFP If "no", don't add code for IEEE754/IEC60559 conformance. Has no effect on most platforms. + Default: yes MKINFO If "no", don't build or install Info documentation from Texinfo source files. + Default: yes + +MKKERBEROS If "no", disables building of Kerberos (v4 or v5) + infrastructure (libraries and support programs). + Default: yes + +MKLINKLIB If "no", act as "MKPICINSTALL=no MKPROFILE=no". + Also: + - don't install the .a libraries + - don't install _pic.a libraries on PIC systems + - don't build .a libraries on PIC systems + - don't install the .so symlink on ELF systems + I.e, only install the shared library (and the .so.major + symlink on ELF). + Default: yes MKLINT If "no", don't build or install the lint libraries. + Default: yes -MKMAN If "no", don't build or install the man or catman pages. - Also acts as "MKCATPAGES=no" +MKMAN If "no", don't build or install the man or catman pages, + and also acts as "MKCATPAGES=no MKHTML=no" + Default: yes MKMANZ If not "no", compress manual pages at installation time. - "no" by default. + Default: no MKNLS If "no", don't build or install the NLS files and locale definition files. + Default: yes -MKOBJ If "no", don't enable the rule which creates objdirs. - "yes" by default. +MKOBJ If "no", don't enable the rule which creates objdirs, + and also acts as "MKOBJDIRS=no" + Default: yes MKOBJDIRS If "no", don't create objdirs during a "make build". - "no" by default. + Default: no -MKPIC If "no", don't build or install shared libraries. +MKPIC If "no", don't build or install shared libraries, and + also acts as "MKPICLIB=no" + Default: yes MKPICINSTALL If "no", don't install the *_pic.a libraries. + Default: yes + +MKPICLIB If "no", don't build *_pic.a libraries, and build the + shared object libraries from the .a libraries. + A symlink is installed in ${DESTDIR}/usr/lib for the + _pic.a library pointing to the .a library. + Default: yes MKPROFILE If "no", don't build or install the profiling libraries. + Default: yes + +MKSHARE If "no", act as "MKCATPAGES=no MKDOC=no MKHTML=no MKINFO=no + MKMAN=no MKNLS=no". + I.e, don't build catman pages, documentation, Info + documentation, man pages, NLS files, ... + Default: yes + +MKSKEY If "no", disables building of S/key authentication + infrastructure (libraries and support programs). + Default: yes -MKSHARE If "no", act as "MKCATPAGES=no MKDOC=no MKINFO=no MKMAN=no - MKNLS=no". I.e, don't build catman pages, documentation, - Info documentation, man pages, NLS files, ... +MKSOFTFLOAT If not "no", build with options to enable the compiler to + generate output containing library calls for floating + point and possibly soft-float library support. + Default: no + +MKUNPRIVED If not "no", don't set the owner/group/mode when installing + files or directories, and keep a metadata log of what + the owner/group/mode should be. This allows a + non-root "make install". + Default: no + +MKUPDATE If not "no", 'make install' only installs targets that are + more recently modified in the source directories that their + installed counterparts. + Default: no + +MKYP If "no", disables building of YP (NIS) + infrastructure (libraries and support programs). + Default: yes =-=-=-=-= sys.mk =-=-=-=-= @@ -255,37 +327,6 @@ make configuration file to modify the behaviour of the system build process (default values are in brackets along with comments, if set by bsd.own.mk): -MKPICLIB bsd.own.mk provides a default for this variable, which is - used by bsd.lib.mk. The default value is provided by - bsd.own.mk since non-library Makefiles may need to check - its value in order to generate proper dependencies against - libraries used only during the build process (which would - not be installed into the destination directory). - -MKCRYPTO If set to "no", no cryptography support will be built - into the system. Defaults to "yes". - -MKCRYPTO_IDEA If set to "yes", IDEA support will be built into - libcrypto_idea.a. Defaults to "no". - -MKCRYPTO_MDC2 If set to "yes", MDC2 support will be built into - libcrypto_mdc2.a. Defaults to "no". - -MKCRYPTO_RC5 If set to "yes", RC5 support will be built into - libcrypto_rc5.a. Defaults to "no". - -MKHESIOD If set to "no", disables building of Hesiod infrastructure - (libraries and support programs). - -MKKERBEROS If set to "no", disables building of Kerberos (v4 or v5) - infrastructure (libraries and support programs). - -MKSKEY If set to "no", disables building of S/key authentication - infrastructure (libraries and support programs). - -MKYP If set to "no", disables building of YP (NIS) - infrastructure (libraries and support programs). - USE_HESIOD If set to "no", disables building Hesiod support into various system utilities/libraries that support it. If MKHESIOD is set to "no", USE_HESIOD will also be @@ -319,11 +360,6 @@ OBJECT_FMT Object file format. [set to "ELF" on architectures that "i386" and some m68k machines, or set to "a.out" on other architectures]. -MKSOFTFLOAT If "yes", build with options to enable the compiler to - generate output containing library calls for floating - point and possibly soft-float library support. Defaults - to "no". - TOOLCHAIN_MISSING If "yes", this indicates that the platform being built does not have a working in-tree toolchain. If the @@ -433,7 +469,7 @@ KERNSRCDIR Is the location of the top of the kernel src. KERNARCHDIR Is the location of the machine dependent kernel sources. It defaults to arch/${MACHINE} - + KERNCONFDIR Is where the configuration files for kernels are found; default is ${KERNSRCDIR}/${KERNARCHDIR}/conf. @@ -494,20 +530,6 @@ LDADD Additional loader objects. MAN The manual pages to be installed (use a .1 - .9 suffix). -MKLINKLIB If "no", act as "MKPICINSTALL=no MKPROFILE=no". - Also: - - don't install the .a libraries - - don't install _pic.a libraries on PIC systems - - don't build .a libraries on PIC systems - - don't install the .so symlink on ELF systems - I.e, only install the shared library (and the .so.major - symlink on ELF). - -MKPICLIB If "no", don't build _pic.a libraries, and build the - shared object libraries from the .a libraries. A - symlink is installed in ${DESTDIR}/usr/lib for the - _pic.a library pointing to the .a library. - NOCHECKVER_<library> NOCHECKVER If set, disables checking for installed shared object libraries with versions greater than the source. A @@ -844,7 +866,7 @@ The following macros may be defined in makefiles which include are to be built: RPC_INCS: construct .h file from .x file -RPC_XDRFILES: construct _xdr.c from .x file +RPC_XDRFILES: construct _xdr.c from .x file (for marshalling/unmarshalling data types) RPC_SVCFILES: construct _svc.c from .x file (server-side stubs) @@ -883,9 +905,9 @@ SHLINKDIR Path to use for shared linker when building a program. =-=-=-=-= bsd.subdir.mk =-=-=-=-= The include file <bsd.subdir.mk> contains the default targets for building -subdirectories. It has the same eight targets as <bsd.prog.mk>: all, +subdirectories. It has the same eight targets as <bsd.prog.mk>: all, clean, cleandir, depend, includes, install, lint, and tags. For all of -the directories listed in the variable SUBDIR, the specified directory +the directories listed in the variable SUBDIR, the specified directory will be visited and the target made. There is also a default target which allows the command "make subdir" where subdir is any directory listed in the variable SUBDIR. @@ -1019,7 +1041,7 @@ WFORMAT -Wnetbsd-format-audit for extra-stringent format checking. makefiles if a program is not security critical and is doing bizarre things with format strings which would be even uglier if rewritten) FORMAT_AUDIT should go in - mk.conf if you're doing format-string auditing. + mk.conf if you're doing format-string auditing. FORMAT_AUDIT may go away in time. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= diff --git a/share/mk/bsd.doc.mk b/share/mk/bsd.doc.mk index 832c65b3724..67ba7a94e39 100644 --- a/share/mk/bsd.doc.mk +++ b/share/mk/bsd.doc.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.doc.mk,v 1.59 2003/07/10 10:34:35 lukem Exp $ +# $NetBSD: bsd.doc.mk,v 1.60 2003/07/18 08:26:06 lukem Exp $ # @(#)bsd.doc.mk 8.1 (Berkeley) 8/14/93 .include <bsd.init.mk> @@ -31,7 +31,7 @@ FILES?= ${SRCS} .for F in Makefile ${FILES:O:u} ${EXTRA} _F:= ${DESTDIR}${DOCDIR}/${DIR}/${F} # installed path -.if !defined(UPDATE) +.if ${MKUPDATE} == "no" ${_F}! ${F} __docinstall # install rule .if !defined(BUILD) && !make(all) && !make(${F}) ${_F}! .MADE # no build at install diff --git a/share/mk/bsd.files.mk b/share/mk/bsd.files.mk index be1ddeb3adc..f6f7b98acfa 100644 --- a/share/mk/bsd.files.mk +++ b/share/mk/bsd.files.mk @@ -1,4 +1,6 @@ -# $NetBSD: bsd.files.mk,v 1.20 2002/10/22 18:48:27 perry Exp $ +# $NetBSD: bsd.files.mk,v 1.21 2003/07/18 08:26:06 lukem Exp $ + +.include <bsd.init.mk> .if !target(__fileinstall) ##### Basic targets @@ -28,7 +30,7 @@ _FDIR:= ${FILESDIR_${F}:U${FILESDIR}} # dir override _FNAME:= ${FILESNAME_${F}:U${FILESNAME:U${F:T}}} # name override _F:= ${DESTDIR}${_FDIR}/${_FNAME} # installed path -.if !defined(UPDATE) +.if ${MKUPDATE} == "no" ${_F}! ${F} __fileinstall # install rule .if !defined(BUILD) && !make(all) && !make(${F}) ${_F}! .MADE # no build at install diff --git a/share/mk/bsd.inc.mk b/share/mk/bsd.inc.mk index 57568aef700..9ca3f5d5aff 100644 --- a/share/mk/bsd.inc.mk +++ b/share/mk/bsd.inc.mk @@ -1,4 +1,6 @@ -# $NetBSD: bsd.inc.mk,v 1.23 2002/10/22 18:48:27 perry Exp $ +# $NetBSD: bsd.inc.mk,v 1.24 2003/07/18 08:26:07 lukem Exp $ + +.include <bsd.init.mk> ##### Basic targets .PHONY: incinstall @@ -20,7 +22,7 @@ _FDIR:= ${INCSDIR_${F:C,/,_,g}:U${INCSDIR}} # dir override _FNAME:= ${INCSNAME_${F:C,/,_,g}:U${INCSNAME:U${F}}} # name override _F:= ${DESTDIR}${_FDIR}/${_FNAME} # installed path -.if !defined(UPDATE) +.if ${MKUPDATE} == "no" ${_F}! ${F} __incinstall # install rule .else ${_F}: ${F} __incinstall # install rule diff --git a/share/mk/bsd.info.mk b/share/mk/bsd.info.mk index be44dac45b5..99eeb613735 100644 --- a/share/mk/bsd.info.mk +++ b/share/mk/bsd.info.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.info.mk,v 1.30 2003/07/14 00:50:04 lukem Exp $ +# $NetBSD: bsd.info.mk,v 1.31 2003/07/18 08:26:07 lukem Exp $ .include <bsd.init.mk> @@ -53,7 +53,7 @@ _FDIR:= ${INFODIR_${F}:U${INFODIR}} # dir overrides _FNAME:= ${INFONAME_${F}:U${INFONAME:U${F:T}}} # name overrides _F:= ${DESTDIR}${_FDIR}/${_FNAME} # installed path -.if !defined(UPDATE) +.if ${MKUPDATE} == "no" ${_F}! ${F} __infoinstall # install rule .if !defined(BUILD) && !make(all) && !make(${F}) ${_F}! .MADE # no build at install diff --git a/share/mk/bsd.kinc.mk b/share/mk/bsd.kinc.mk index 8e4c76c9c52..317127e0f56 100644 --- a/share/mk/bsd.kinc.mk +++ b/share/mk/bsd.kinc.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.kinc.mk,v 1.25 2002/11/26 23:15:54 lukem Exp $ +# $NetBSD: bsd.kinc.mk,v 1.26 2003/07/18 08:26:07 lukem Exp $ # Variables: # @@ -50,7 +50,7 @@ __incinstall: .USE .for F in ${INCS:O:u} ${DEPINCS:O:u} _F:= ${DESTDIR}${INCSDIR}/${F} # installed path -.if !defined(UPDATE) +.if ${MKUPDATE} == "no" ${_F}! ${F} __incinstall # install rule .else ${_F}: ${F} __incinstall # install rule diff --git a/share/mk/bsd.kmod.mk b/share/mk/bsd.kmod.mk index 124fdc27b6b..ca5d51662ac 100644 --- a/share/mk/bsd.kmod.mk +++ b/share/mk/bsd.kmod.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.kmod.mk,v 1.64 2003/07/18 04:04:03 lukem Exp $ +# $NetBSD: bsd.kmod.mk,v 1.65 2003/07/18 08:26:07 lukem Exp $ .include <bsd.init.mk> @@ -101,7 +101,7 @@ ${PROG}: ${OBJS} ${DPADD} .if !target(kmodinstall) _PROG:= ${DESTDIR}${KMODDIR}/${PROG} # installed path -.if !defined(UPDATE) +.if ${MKUPDATE} == "no" ${_PROG}! ${PROG} # install rule .if !defined(BUILD) && !make(all) && !make(${PROG}) ${_PROG}! .MADE # no build at install diff --git a/share/mk/bsd.man.mk b/share/mk/bsd.man.mk index ddc4dabe589..55ec83e421b 100644 --- a/share/mk/bsd.man.mk +++ b/share/mk/bsd.man.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.man.mk,v 1.82 2003/07/18 02:52:51 lukem Exp $ +# $NetBSD: bsd.man.mk,v 1.83 2003/07/18 08:26:08 lukem Exp $ # @(#)bsd.man.mk 8.1 (Berkeley) 6/8/93 .include <bsd.init.mk> @@ -69,7 +69,7 @@ ${_MNUMBERS:@N@.$N.$N${MANSUFFIX}@}: # build rule .for F in ${MANPAGES:S/${MANSUFFIX}$//:O:u} _F:= ${DESTDIR}${MANDIR}/man${F:T:E}${MANSUBDIR}/${F}${MANSUFFIX} -.if !defined(UPDATE) +.if ${MKUPDATE} == "no" ${_F}! ${F}${MANSUFFIX} __installpage # install rule .if !defined(BUILD) && !make(all) && !make(${F}) ${_F}! .MADE # no build at install @@ -128,7 +128,7 @@ ${_MNUMBERS:@N@.$N.cat$N${MANSUFFIX}@}: ${CATDEPS} # build rule .for F in ${CATPAGES:S/${MANSUFFIX}$//:O:u} _F:= ${DESTDIR}${MANDIR}/${F:T:E}${MANSUBDIR}/${F:R}.0${MANSUFFIX} -.if !defined(UPDATE) +.if ${MKUPDATE} == "no" ${_F}! ${F}${MANSUFFIX} __installpage # install rule .if !defined(BUILD) && !make(all) && !make(${F}) ${_F}! .MADE # no build at install @@ -181,7 +181,7 @@ ${_MNUMBERS:@N@.$N.html$N@}: ${HTMLDEPS} # build rule # construct installed path _F:= ${HTMLDIR}/${F:T:E}${MANSUBDIR}/${F:R:S-/index$-/x&-}.html -.if !defined(UPDATE) +.if ${MKUPDATE} == "no" ${_F}! ${F} __installpage # install rule .if !defined(BUILD) && !make(all) && !make(${F}) ${_F}! .MADE # no build at install diff --git a/share/mk/bsd.nls.mk b/share/mk/bsd.nls.mk index 3079cb70b94..8e702d62e40 100644 --- a/share/mk/bsd.nls.mk +++ b/share/mk/bsd.nls.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.nls.mk,v 1.40 2003/07/14 00:52:12 lukem Exp $ +# $NetBSD: bsd.nls.mk,v 1.41 2003/07/18 08:26:08 lukem Exp $ .include <bsd.init.mk> @@ -39,7 +39,7 @@ __nlsinstall: .USE .for F in ${NLSALL:O:u} _F:= ${DESTDIR}${NLSDIR}/${F:T:R}/${NLSNAME}.cat # installed path -.if !defined(UPDATE) +.if ${MKUPDATE} == "no" ${_F}! ${F} __nlsinstall # install rule .if !defined(BUILD) && !make(all) && !make(${F}) ${_F}! .MADE # no build at install diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index 4b1d1d601e4..c85acd4f3b7 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.340 2003/07/18 02:52:51 lukem Exp $ +# $NetBSD: bsd.own.mk,v 1.341 2003/07/18 08:26:09 lukem Exp $ .if !defined(_BSD_OWN_MK_) _BSD_OWN_MK_=1 @@ -6,15 +6,21 @@ _BSD_OWN_MK_=1 MAKECONF?= /etc/mk.conf .-include "${MAKECONF}" +# # CPU model, derived from MACHINE_ARCH +# MACHINE_CPU= ${MACHINE_ARCH:C/mipse[bl]/mips/:C/sh3e[bl]/sh3/:C/sh5e[bl]/sh5/:S/m68000/m68k/:S/armeb/arm/} +# # NEED_OWN_INSTALL_TARGET is set to "no" by pkgsrc/mk/bsd.pkg.mk to # ensure that things defined by <bsd.own.mk> (default targets, # INSTALL_FILE, etc.) are not conflicting with bsd.pkg.mk. +# NEED_OWN_INSTALL_TARGET?= yes +# # This lists the platforms which do not have working in-tree toolchains. +# .if ${MACHINE_CPU} == "hppa" || \ ${MACHINE_CPU} == "ns32k" || \ ${MACHINE_CPU} == "sh5" || \ @@ -24,9 +30,11 @@ TOOLCHAIN_MISSING?= yes TOOLCHAIN_MISSING= no .endif +# # XXX TEMPORARY: If ns32k and not using an external toolchain, then we have # to use -idirafter rather than -isystem, because the compiler is too old # to use -isystem. +# .if ${MACHINE_CPU} == "ns32k" && !defined(EXTERNAL_TOOLCHAIN) CPPFLAG_ISYSTEM= -idirafter .else @@ -39,6 +47,7 @@ PRINTOBJDIR= ${MAKE} -V .OBJDIR PRINTOBJDIR= echo # prevent infinite recursion .endif +# # Determine if running in the NetBSD source tree by checking for the # existence of build.sh and tools/ in the current or a parent directory, # and setting _SRC_TOP_ to the result. @@ -48,13 +57,13 @@ _SRC_TOP_!= cd ${.CURDIR}; while :; do \ here=`pwd`; \ [ -f build.sh ] && [ -d tools ] && { echo $$here; break; }; \ case $$here in /) echo ""; break;; esac; \ - cd ..; done + cd ..; done .MAKEOVERRIDES+= _SRC_TOP_ .endif # } - +# # If _SRC_TOP_ != "", we're within the NetBSD source tree, so set # defaults for NETBSDSRCDIR and _SRC_TOP_OBJ_. # @@ -90,7 +99,9 @@ USETOOLS?= no @false .endif +# # Host platform information; may be overridden +# .if !defined(HOST_OSTYPE) _HOST_OSNAME!= uname -s _HOST_OSREL!= uname -r @@ -102,17 +113,23 @@ HOST_CYGWIN= ${HOST_OSTYPE:MCYGWIN*} .if ${USETOOLS} == "yes" # { +# # Provide a default for TOOLDIR. +# .if !defined(TOOLDIR) TOOLDIR:= ${_SRC_TOP_OBJ_}/tooldir.${HOST_OSTYPE} .MAKEOVERRIDES+= TOOLDIR .endif +# # This is the prefix used for the NetBSD-sourced tools. +# _TOOL_PREFIX?= nb +# # If an external toolchain base is specified, use it. -.if defined(EXTERNAL_TOOLCHAIN) +# +.if defined(EXTERNAL_TOOLCHAIN) # { AR= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ar AS= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-as LD= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ld @@ -128,9 +145,9 @@ CPP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-cpp CXX= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-c++ FC= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-g77 OBJC= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc -.else +.else # } { # Define default locations for common tools. -.if ${USETOOLS_BINUTILS:Uyes} == "yes" +.if ${USETOOLS_BINUTILS:Uyes} == "yes" # { AR= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ar AS= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-as LD= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ld @@ -140,16 +157,16 @@ OBJDUMP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objdump RANLIB= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ranlib SIZE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-size STRIP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strip -.endif +.endif # } -.if ${USETOOLS_GCC:Uyes} == "yes" +.if ${USETOOLS_GCC:Uyes} == "yes" # { CC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc CPP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-cpp CXX= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-c++ FC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-g77 OBJC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc -.endif -.endif # EXTERNAL_TOOLCHAIN +.endif # } +.endif # EXTERNAL_TOOLCHAIN # } HOST_MKDEP= ${TOOLDIR}/bin/${_TOOL_PREFIX}host-mkdep @@ -213,6 +230,7 @@ TOOL_ZIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}zic .endif # USETOOLS == yes # } +# # Targets to check if DESTDIR or RELEASEDIR is provided # .if !target(check_DESTDIR) @@ -236,13 +254,16 @@ check_RELEASEDIR: .PHONY .NOTMAIN .endif -.if ${USETOOLS} == "yes" +.if ${USETOOLS} == "yes" # { +# # Make sure DESTDIR is set, so that builds with these tools always # get appropriate -nostdinc, -nostdlib, etc. handling. The default is # <empty string>, meaning start from /, the root directory. +# DESTDIR?= -.endif +.endif # } +# # Build a dynamically linked /bin and /sbin, with the necessary shared # libraries moved from /usr/lib to /lib and the shared linker moved # from /usr/libexec to /lib @@ -253,6 +274,7 @@ DESTDIR?= # MKDYNAMICROOT?= yes +# # 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). # @@ -304,30 +326,8 @@ LOCALEGRP?= wheel LOCALEOWN?= root LOCALEMODE?= ${NONBINMODE} -COPY?= -c -PRESERVE?= ${UPDATE:D-p} -RENAME?= -r -HRDLINK?= -l h -SYMLINK?= -l s - -METALOG?= ${DESTDIR}/METALOG -METALOG.add?= ${TOOL_CAT} -l >> ${METALOG} -.if (${_SRC_TOP_} != "") # only set INSTPRIV if inside ${NETBSDSRCDIR} -INSTPRIV?= ${UNPRIVED:D-U -M ${METALOG} -D ${DESTDIR}} -N ${NETBSDSRCDIR}/etc -.endif -SYSPKGTAG?= ${SYSPKG:D-T ${SYSPKG}_pkg} -SYSPKGDOCTAG?= ${SYSPKG:D-T ${SYSPKG}-doc_pkg} -STRIPFLAG?= -s - -.if ${NEED_OWN_INSTALL_TARGET} == "yes" -INSTALL_DIR?= ${INSTALL} ${INSTPRIV} -d -INSTALL_FILE?= ${INSTALL} ${INSTPRIV} ${COPY} ${PRESERVE} ${RENAME} -INSTALL_LINK?= ${INSTALL} ${INSTPRIV} ${HRDLINK} ${RENAME} -INSTALL_SYMLINK?= ${INSTALL} ${INSTPRIV} ${SYMLINK} ${RENAME} -HOST_INSTALL_FILE?= ${INSTALL} ${COPY} ${PRESERVE} ${RENAME} -.endif - -# Data-driven table using make variables to control how +# +# Data-driven table using make variables to control how # toolchain-dependent targets and shared libraries are built # for different platforms and object formats. # @@ -335,71 +335,94 @@ HOST_INSTALL_FILE?= ${INSTALL} ${COPY} ${PRESERVE} ${RENAME} # # All platforms are ELF, except for ns32k (which does not yet have # an ELF BFD back-end). +# .if ${MACHINE_ARCH} == "ns32k" OBJECT_FMT?= a.out # allow overrides, to ease transition .else OBJECT_FMT= ELF .endif +# # If this platform's toolchain is missing, we obviously cannot build it. +# .if ${TOOLCHAIN_MISSING} == "yes" MKBFD:= no MKGDB:= no MKGCC:= no .endif +# # If we are using an external toolchain, we can still build the target's # BFD stuff, but we cannot build GCC's support libraries, since those are # tightly-coupled to the version of GCC being used. +# .if defined(EXTERNAL_TOOLCHAIN) MKGCC:= no .endif +# # The sh3 port is incomplete. +# .if ${MACHINE_CPU} == "sh3" && !defined(HAVE_GCC3) NOPIC= # defined .endif +# # The sh5 port is incomplete. +# .if ${MACHINE_CPU} == "sh5" NOPROFILE= # defined .endif +# # The m68000 port is incomplete. +# .if ${MACHINE_ARCH} == "m68000" NOPIC= # defined .endif +# # The hppa port is incomplete. +# .if ${MACHINE_ARCH} == "hppa" NOLINT= # defined NOPROFILE= # defined .endif +# # On the MIPS, all libs are compiled with ABIcalls (and are thus PIC), # not just shared libraries, so don't build the _pic version. +# .if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" MKPICLIB:= no .endif +# # If the ns32k port is using an external toolchain, shared libraries # are not yet supported. +# .if ${MACHINE_ARCH} == "ns32k" && defined(EXTERNAL_TOOLCHAIN) NOPIC= # defined .endif +# # On VAX using ELF, all objects are PIC, not just shared libraries, # so don't build the _pic version. +# .if ${MACHINE_ARCH} == "vax" && ${OBJECT_FMT} == "ELF" MKPICLIB:= no .endif +# # Location of the file that contains the major and minor numbers of the # version of a shared library. If this file exists a shared library # will be built by <bsd.lib.mk>. +# SHLIB_VERSION_FILE?= ${.CURDIR}/shlib_version +# # GNU sources and packages sometimes see architecture names differently. +# GNU_ARCH.m68000=m68010 GNU_ARCH.sh3eb=sh GNU_ARCH.sh3el=shle @@ -407,8 +430,10 @@ GNU_ARCH.sh5eb=sh5 GNU_ARCH.sh5el=sh5le MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_ARCH}:U${MACHINE_ARCH}} +# # In order to identify NetBSD to GNU packages, we sometimes need # an "elf" tag for historically a.out platforms. +# .if ${OBJECT_FMT} == "ELF" && \ (${MACHINE_GNU_ARCH} == "arm" || \ ${MACHINE_GNU_ARCH} == "armeb" || \ @@ -455,14 +480,17 @@ dependall: .NOTMAIN realdepend .MAKE @cd ${.CURDIR}; ${MAKE} realall .endif +# # Define MKxxx variables (which are either yes or no) for users # to set in /etc/mk.conf and override on the make commandline. # These should be tested with `== "no"' or `!= "no"'. # The NOxxx variables should only be set by Makefiles. # +# # Supported NO* options (if defined, MK* will be forced to "no", # regardless of user's mk.conf setting). +# .for var in CRYPTO DOC HTML LINKLIB LINT MAN NLS OBJ PIC PICINSTALL PROFILE \ SHARE .if defined(NO${var}) @@ -470,27 +498,41 @@ MK${var}:= no .endif .endfor -.if defined(MANZ) -MKMANZ:= yes +# +# Older-style variables that enabled behaviour when set. +# +.for var in MANZ UNPRIVED UPDATE +.if defined(${var}) +MK${var}:= yes .endif +.endfor +# # MK* options which default to "yes". +# .for var in BFD CATPAGES CRYPTO DOC GCC GDB HESIOD HTML IEEEFP INFO KERBEROS \ LINKLIB LINT MAN NLS OBJ PIC PICINSTALL PICLIB PROFILE SHARE SKEY YP MK${var}?= yes .endfor +# # MK* options which default to "no". -.for var in CRYPTO_IDEA CRYPTO_MDC2 CRYPTO_RC5 MANZ OBJDIRS SOFTFLOAT +# +.for var in CRYPTO_IDEA CRYPTO_MDC2 CRYPTO_RC5 MANZ OBJDIRS SOFTFLOAT \ + UNPRIVED UPDATE MK${var}?= no .endfor +# # Force some options off if their dependencies are off. +# + .if ${MKCRYPTO} == "no" MKKERBEROS:= no .endif .if ${MKMAN} == "no" +MKCATPAGES:= no MKHTML:= no .endif @@ -503,10 +545,6 @@ MKPROFILE:= no MKPICLIB:= no .endif -.if ${MKMAN} == "no" -MKCATPAGES:= no -.endif - .if ${MKOBJ} == "no" MKOBJDIRS:= no .endif @@ -515,12 +553,50 @@ MKOBJDIRS:= no MKCATPAGES:= no MKDOC:= no MKINFO:= no +MKHTML:= no MKMAN:= no MKNLS:= no .endif +# +# install(1) parameters. +# +COPY?= -c +.if ${MKUPDATE} == "no" +PRESERVE?= +.else +PRESERVE?= -p +.endif +RENAME?= -r +HRDLINK?= -l h +SYMLINK?= -l s + +METALOG?= ${DESTDIR}/METALOG +METALOG.add?= ${TOOL_CAT} -l >> ${METALOG} +.if (${_SRC_TOP_} != "") # only set INSTPRIV if inside ${NETBSDSRCDIR} +.if ${MKUNPRIVED} != "no" +INSTPRIV.unpriv=-U -M ${METALOG} -D ${DESTDIR} +.else +INSTPRIV.unpriv= +.endif +INSTPRIV?= ${INSTPRIV.unpriv} -N ${NETBSDSRCDIR}/etc +.endif +SYSPKGTAG?= ${SYSPKG:D-T ${SYSPKG}_pkg} +SYSPKGDOCTAG?= ${SYSPKG:D-T ${SYSPKG}-doc_pkg} +STRIPFLAG?= -s + +.if ${NEED_OWN_INSTALL_TARGET} == "yes" +INSTALL_DIR?= ${INSTALL} ${INSTPRIV} -d +INSTALL_FILE?= ${INSTALL} ${INSTPRIV} ${COPY} ${PRESERVE} ${RENAME} +INSTALL_LINK?= ${INSTALL} ${INSTPRIV} ${HRDLINK} ${RENAME} +INSTALL_SYMLINK?= ${INSTALL} ${INSTPRIV} ${SYMLINK} ${RENAME} +HOST_INSTALL_FILE?= ${INSTALL} ${COPY} ${PRESERVE} ${RENAME} +.endif + +# # Set defaults for the USE_xxx variables. They all default to "yes" # unless the corresponding MKxxx variable is set to "no". +# .for var in HESIOD KERBEROS SKEY YP .if (${MK${var}} == "no") USE_${var}:= no @@ -529,7 +605,9 @@ USE_${var}?= yes .endif .endfor +# # Use XFree86 4.x as default version on i386, amd64, macppc and cats. +# .if ${MACHINE_ARCH} == "i386" || ${MACHINE} == "amd64" || \ ${MACHINE} == "macppc" || ${MACHINE} == "cats" USE_XF86_4?= yes diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index 66811be0a81..bf76e18e951 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.prog.mk,v 1.171 2003/07/16 05:42:02 itojun Exp $ +# $NetBSD: bsd.prog.mk,v 1.172 2003/07/18 08:26:10 lukem Exp $ # @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94 .ifndef HOSTPROG @@ -197,7 +197,7 @@ __proginstall: .USE ${INSTALL_FILE} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ ${STRIPFLAG} ${SYSPKGTAG} ${.ALLSRC} ${.TARGET} -.if !defined(UPDATE) +.if ${MKUPDATE} == "no" ${DESTDIR}${BINDIR}/${PROGNAME}! ${PROG} __proginstall .if !defined(BUILD) && !make(all) && !make(${PROG}) ${DESTDIR}${BINDIR}/${PROGNAME}! .MADE @@ -231,7 +231,7 @@ __scriptinstall: .USE ${SYSPKGTAG} ${.ALLSRC} ${.TARGET} .for S in ${SCRIPTS:O:u} -.if !defined(UPDATE) +.if ${MKUPDATE} == "no" ${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}! ${S} __scriptinstall .if !defined(BUILD) && !make(all) && !make(${S}) ${DESTDIR}${SCRIPTSDIR_${S}:U${SCRIPTSDIR}}/${SCRIPTSNAME_${S}:U${SCRIPTSNAME:U${S:T:R}}}! .MADE diff --git a/share/zoneinfo/Makefile b/share/zoneinfo/Makefile index 635fd5b9d4e..f9068761fe2 100644 --- a/share/zoneinfo/Makefile +++ b/share/zoneinfo/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.33 2003/07/10 10:34:39 lukem Exp $ +# $NetBSD: Makefile,v 1.34 2003/07/18 08:26:10 lukem Exp $ .include <bsd.own.mk> @@ -78,6 +78,12 @@ posix_right: posix_only other_two .PHONY: right_posix right_posix: right_only other_two +.if ${MKUNPRIVED} == "no" +TOOL_PAX.unpriv=-pe +.else +TOOL_PAX.unpriv= +.endif + .if ${MKSHARE} != "no" afterinstall: ${DATA} ${REDO} mkdir -p ${TZBUILDDIR} @@ -90,9 +96,9 @@ afterinstall: ${DATA} ${REDO} "%s type=file mode=0444 uname=${BINOWN} gname=${BINGRP}\n" ; \ ) > ${TZBUILDSPEC} cd ${TZBUILDDIR} && \ - ${TOOL_PAX} -O -rw ${UNPRIVED:D:U-pe} -M -N ${NETBSDSRCDIR}/etc \ + ${TOOL_PAX} -O -rw ${TOOL_PAX.unpriv} -M -N ${NETBSDSRCDIR}/etc \ ${DESTDIR}${TZDIR} < ${TZBUILDSPEC} -.if defined(UNPRIVED) +.if ${MKUNPRIVED} != "no" sed -e "s|^\.|./${TZDIR}|g" -e "s|//|/|g" < ${TZBUILDSPEC} | \ ${METALOG.add} .endif diff --git a/tools/Makefile.gnuhost b/tools/Makefile.gnuhost index 74874615009..b6b25d31e25 100644 --- a/tools/Makefile.gnuhost +++ b/tools/Makefile.gnuhost @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.gnuhost,v 1.18 2003/03/14 05:22:51 thorpej Exp $ +# $NetBSD: Makefile.gnuhost,v 1.19 2003/07/18 08:26:12 lukem Exp $ # # Rules used when building a GNU host package. Expects MODULE to be set. # @@ -12,7 +12,7 @@ # * "config.status" is run to rebuild Makefiles and .h files if an # autoconf-parsed file (such as Makefile.in) is changed. # -# * If UPDATE is set, "make install" is only run if a build has happened +# * If MKUPDATE != "no", "make install" is only run if a build has happened # since the last install in the current directory. .include <bsd.own.mk> @@ -76,7 +76,7 @@ INSTALL_TARGET?=install # The .build_done timestamp is only updated if a file actually changes # in the build tree during "make all". This way, if nothing has changed, -# a "make install UPDATE=" will do nothing. +# a "make install MKUPDATE=yes" will do nothing. .build_done: .configure_done @(cd build && ${MAKE} ${MAKE_ARGS} ${ALL_TARGET}) @@ -84,7 +84,7 @@ INSTALL_TARGET?=install then touch $@; fi .install_done: ${BUILD:D.build_done} -.if defined(UPDATE) +.if ${MKUPDATE} != "no" @cd ${.OBJDIR}; \ if [ ! -f .install_done ] || [ ! -f .build_done ] || \ [ -n "$$(find .build_done -prune -newer .install_done -print)" ]; then \ diff --git a/tools/groff/Makefile b/tools/groff/Makefile index 074360147e9..01700ed0f77 100644 --- a/tools/groff/Makefile +++ b/tools/groff/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.22 2003/07/10 10:34:43 lukem Exp $ +# $NetBSD: Makefile,v 1.23 2003/07/18 08:26:13 lukem Exp $ MODULE= groff @@ -29,7 +29,7 @@ _post_conf: .USE .PATH: ${.CURDIR}/../../share/tmac ${.CURDIR}/../../gnu/usr.bin/groff/tmac _installtmac: .USE -.if defined(UPDATE) +.if ${MKUPDATE} != "no" @if ! cmp ${.ALLSRC} ${.TARGET} >/dev/null 2>&1; then \ echo ${HOST_INSTALL_FILE:Q} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}; \ ${HOST_INSTALL_FILE} -m ${NONBINMODE} ${.ALLSRC} ${.TARGET}; \ |
