Date: Sun, 23 Aug 1998 23:08:25 -0700 (PDT) From: asami@FreeBSD.ORG (Satoshi Asami) To: ac199@hwcn.org Cc: vanilla@FreeBSD.ORG, ports@FreeBSD.ORG Subject: Re: manpages (Re: cvs commit: ports/devel/p5-Term-Query p5-Term-Query-2.0.tgz) Message-ID: <199808240608.XAA02385@silvia.hip.berkeley.edu> In-Reply-To: <Pine.BSF.3.96.980823214748.1077B-100000@localhost> (message from Tim Vanderhoek on Sun, 23 Aug 1998 22:04:10 -0400 (EDT))
next in thread | previous in thread | raw e-mail | index | archive | help
* > MANCOMPRESSED=yes: manpage is compressed * > MANCOMPRESSED=no: manpage is not compressed * > MANCOMPRESSED=maybe: honors NOMANCOMPRESS * * It might also be worthwhile to create an appropriate * compress-man: target. Oops, forgot this one. Fixed, here's another diff (sorry). * Actually, some of these ports with several hundred manpages * become rather cumbersome when each manpage has to be listed in * Makefile... I wonder... ;-) Well, it's shorter than listing in PLISTs. ;) What do you think, should we make standard include files for manpages in case it's too long for inclusion in the Makefile? I can certainly add something like === .for sect in 1 2 3 4 5 6 7 8 9 .if exists(${PKGDIR}/MAN${sect}) MAN${sect}+= ${CAT} ${PKGDIR}/MAN${sect} .endif .endfor === Satoshi ------- Index: bsd.port.mk =================================================================== RCS file: /home/ncvs/src/share/mk/bsd.port.mk,v retrieving revision 1.227.2.46 diff -u -r1.227.2.46 bsd.port.mk --- bsd.port.mk 1998/08/15 17:37:46 1.227.2.46 +++ bsd.port.mk 1998/08/24 06:02:40 @@ -11,186 +11,188 @@ # There are two different types of "maintainers" in the whole ports # framework concept. Maintainers of the bsd.port*.mk files -# are listed below in the ${OSNAME}_MAINTAINER entries (this file +# are listed below in the ${OPSYS}_MAINTAINER entries (this file # is used by multiple *BSD flavors). You should consult them directly # if you have any questions/suggestions regarding this file since only # they are allowed to modify the master copies in the CVS repository! +FreeBSD_MAINTAINER= asami@FreeBSD.ORG +OpenBSD_MAINTAINER= imp@OpenBSD.ORG + # For each port, the MAINTAINER variable is what you should consult for # contact information on the person(s) to contact if you have questions/ # suggestions about that specific port. By default (if no MAINTAINER # is listed), a port is maintained by the subscribers of the ports@freebsd.org # mailing list, and any correspondece should be directed there. # -FreeBSD_MAINTAINER= asami@FreeBSD.ORG -OpenBSD_MAINTAINER= imp@OpenBSD.ORG - -# Supported Variables and their behaviors: +# MAINTAINER - The e-mail address of the contact person for this port +# (default: ports@FreeBSD.ORG). # -# Variables that typically apply to all ports: +# These are meta-variables that are automatically set to the system +# you are running on. # # ARCH - The architecture, as returned by "uname -m". # OPSYS - Portability clause. This is the operating system the # makefile is being used on. Automatically set to # "FreeBSD," "NetBSD," or "OpenBSD" as appropriate. # OSREL - The release version (numeric) of the operating system. -# PORTSDIR - The root of the ports tree. Defaults: -# FreeBSD/OpenBSD: /usr/ports -# NetBSD: /usr/opt -# DISTDIR - Where to get gzip'd, tarballed copies of original sources -# (default: ${PORTSDIR}/distfiles). -# PREFIX - Where to install things in general (default: /usr/local). -# MASTER_SITES - Primary location(s) for distribution files if not found -# locally. -# PATCH_SITES - Primary location(s) for distribution patch files -# (see PATCHFILES below) if not found locally. # -# MASTER_SITE_BACKUP - Backup location(s) for distribution files and patch -# files if not found locally and ${MASTER_SITES}/${PATCH_SITES} -# (default: -# ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/) -# MASTER_SITE_OVERRIDE - If set, override the MASTER_SITES setting with this -# value. -# MASTER_SITE_FREEBSD - If set, only use ${MASTER_SITE_BACKUP} for -# MASTER_SITES. -# PACKAGES - A top level directory where all packages go (rather than -# going locally to each port). (default: ${PORTSDIR}/packages). -# GMAKE - Set to path of GNU make if not in $PATH (default: gmake). -# AUTOCONF - Set to path of GNU autoconf if not in $PATH (default: autoconf). -# XMKMF - Set to path of `xmkmf' if not in $PATH (default: xmkmf -a ). -# MAINTAINER - The e-mail address of the contact person for this port -# (default: ports@FreeBSD.ORG). +# These variables are used to identify your port. +# +# DISTNAME - Name of port or distribution. +# PKGNAME - Name of the package file to create if the DISTNAME +# isn't really relevant for the port/package +# (default: ${DISTNAME}). # CATEGORIES - A list of descriptive categories into which this port falls. # -# Variables that typically apply to an individual port. Non-Boolean -# variables without defaults are *mandatory*. +# These variable describe how to fetch files required for building the port. # -# WRKDIR - A temporary working directory that gets *clobbered* on clean -# (default: ${.CURDIR}/work). -# WRKSRC - A subdirectory of ${WRKDIR} where the distribution actually -# unpacks to. (Default: ${WRKDIR}/${DISTNAME} unless -# NO_WRKSUBDIR is set, in which case simply ${WRKDIR}). -# DISTNAME - Name of port or distribution. # DISTFILES - Name(s) of archive file(s) containing distribution -# (default: ${DISTNAME}${EXTRACT_SUFX}). +# (default: ${DISTNAME}${EXTRACT_SUFX}). Set this to +# an empty string if the port doesn't require it. +# EXTRACT_SUFX - Suffix for archive names (default: .tar.gz). You +# never have to set both DISTFILES and EXTRACT_SUFX. +# MASTER_SITES - Primary location(s) for distribution files if not found +# locally. # PATCHFILES - Name(s) of additional files that contain distribution # patches (default: none). make will look for them at -# PATCH_SITES (see above). They will automatically be +# PATCH_SITES (see below). They will automatically be # uncompressed before patching if the names end with # ".gz" or ".Z". +# PATCH_SITES - Primary location(s) for distribution patch files +# if not found locally. # DIST_SUBDIR - Suffix to ${DISTDIR}. If set, all ${DISTFILES} # and ${PATCHFILES} will be put in this subdirectory of -# ${DISTDIR}. Also they will be fetched in this subdirectory -# from FreeBSD mirror sites. +# ${DISTDIR} (see below). Also they will be fetched in +# this subdirectory from FreeBSD mirror sites. # ALLFILES - All of ${DISTFILES} and ${PATCHFILES}. # IGNOREFILES - If some of the ${ALLFILES} are not checksum-able, set # this variable to their names. -# PKGNAME - Name of the package file to create if the DISTNAME -# isn't really relevant for the port/package -# (default: ${DISTNAME}). # EXTRACT_ONLY - If defined, a subset of ${DISTFILES} you want to # actually extract. -# PATCHDIR - A directory containing any additional patches you made -# to port this software to FreeBSD (default: -# ${.CURDIR}/patches) -# SCRIPTDIR - A directory containing any auxiliary scripts -# (default: ${.CURDIR}/scripts) -# FILESDIR - A directory containing any miscellaneous additional files. -# (default: ${.CURDIR}/files) -# PKGDIR - A direction containing any package creation files. -# (default: ${.CURDIR}/pkg) -# PKG_DBDIR - Where package installation is recorded (default: /var/db/pkg) -# FORCE_PKG_REGISTER - If set, it will overwrite any existing package -# registration information in ${PKG_DBDIR}/${PKGNAME}. -# NO_MTREE - If set, will not invoke mtree from bsd.port.mk from -# the "install" target. -# MTREE_FILE - The name of the mtree file (default: /etc/mtree/BSD.x11.dist -# if USE_X_PREFIX is set, /etc/mtree/BSD.local.dist -# otherwise.) # -# NO_BUILD - Use a dummy (do-nothing) build target. -# NO_CDROM - Port may not go on CDROM. Set this string to reason. -# NO_DESCRIBE - Use a dummy (do-nothing) describe target. -# NO_EXTRACT - Use a dummy (do-nothing) extract target. -# NO_INSTALL - Use a dummy (do-nothing) install target. -# NO_PACKAGE - Use a dummy (do-nothing) package target. -# NO_LATEST_LINK - Do not install the "Latest" link for package. Define this -# if this port is a beta version of another stable port -# which is also in the tree. -# NO_PKG_REGISTER - Don't register a port install as a package. -# NO_WRKSUBDIR - Assume port unpacks directly into ${WRKDIR}. -# NO_WRKDIR - There's no work directory at all; port does this someplace -# else. -# NO_DEPENDS - Don't verify build of dependencies. -# BROKEN - Port is broken. Set this string to the reason why. -# RESTRICTED - Port is restricted. Set this string to the reason why. +# These three variables are typically set in /etc/make.conf to indicate +# the user's preferred location to fetch files from. +# +# MASTER_SITE_BACKUP - Backup location(s) for distribution files and patch +# files if not found locally and ${MASTER_SITES}/${PATCH_SITES} +# (default: +# ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/) +# MASTER_SITE_OVERRIDE - If set, override the MASTER_SITES setting with this +# value. +# MASTER_SITE_FREEBSD - If set, only use ${MASTER_SITE_BACKUP} for +# MASTER_SITES. +# +# Set these if your port should not be built under certain circumstances. +# These are string variables; you should set them to the reason why +# they are restricted. +# +# RESTRICTED - Port is restricted (e.g., contains cryptography, etc.). +# NO_CDROM - Port may not go on CDROM. +# NO_PACKAGE - Port should not be packaged but distfiles can be put on +# ftp sites and CDROMs. +# BROKEN - Port is broken. +# +# This variable is a boolean, so you don't need to set it to the reason. +# +# IS_INTERACTIVE - Set this if your port needs to interact with the user +# during a build. User can then decide to skip this port by +# setting ${BATCH}, or compiling only the interactive ports +# by setting ${INTERACTIVE}. +# +# Use these if your port uses some of the common software packages. +# # USE_GMAKE - Says that the port uses gmake. +# GMAKE - Set to path of GNU make if not in $PATH (default: gmake). # USE_AUTOCONF - Says that the port uses autoconf. Implies GNU_CONFIGURE. +# AUTOCONF - Set to path of GNU autoconf if not in $PATH (default: +# autoconf). # USE_PERL5 - Says that the port uses perl5 for building and running. +# PERL_VERSION - Full version of perl5 (see below for current value). +# PERL_VER - Short version of perl5 (see below for current value). # USE_IMAKE - Says that the port uses imake. Implies USE_X_PREFIX. -# USE_X_PREFIX - Says that the port installs in ${X11BASE}. Implies USE_XLIB. -# USE_XLIB - Says that the port uses X libraries. +# XMKMF - Set to path of `xmkmf' if not in $PATH (default: xmkmf -a ). # NO_INSTALL_MANPAGES - For imake ports that don't like the install.man # target. -# HAS_CONFIGURE - Says that the port has its own configure script. -# GNU_CONFIGURE - Set if you are using GNU configure (optional). -# CONFIGURE_SCRIPT - Name of configure script, defaults to 'configure'. -# CONFIGURE_ARGS - Pass these args to configure if ${HAS_CONFIGURE} is set. -# CONFIGURE_ENV - Pass these env (shell-like) to configure if -# ${HAS_CONFIGURE} is set. -# SCRIPTS_ENV - Additional environment vars passed to scripts in -# ${SCRIPTDIR} executed by bsd.port.mk. -# MAKE_ENV - Additional environment vars passed to sub-make in build -# stage. -# IS_INTERACTIVE - Set this if your port needs to interact with the user -# during a build. User can then decide to skip this port by -# setting ${BATCH}, or compiling only the interactive ports -# by setting ${INTERACTIVE}. -# FETCH_DEPENDS - A list of "path:dir" pairs of other ports this +# USE_X_PREFIX - Says that the port installs in ${X11BASE}. Implies USE_XLIB. +# USE_XLIB - Says that the port uses X libraries. +# USE_QT - Says that the port uses the latest version of qt toolkit. +# +# Dependency checking. Use these if your port requires another port +# not in the list above. +# +# FETCH_DEPENDS - A list of "path:dir[:target]" tuples of other ports this # package depends in the "fetch" stage. "path" is the # name of a file if it starts with a slash (/), an # executable otherwise. make will test for the # existence (if it is a full pathname) or search for # it in your $PATH (if it is an executable) and go # into "dir" to do a "make all install" if it's not -# found. -# BUILD_DEPENDS - A list of "path:dir" pairs of other ports this +# found. If the third field ("target") exists, it will +# be used instead of ${DEPENDS_TARGET}. +# BUILD_DEPENDS - A list of "path:dir[:target]" tuples of other ports this # package depends to build (between the "extract" and # "build" stages, inclusive). The test done to # determine the existence of the dependency is the -# same as FETCH_DEPENDS. -# RUN_DEPENDS - A list of "path:dir" pairs of other ports this +# same as FETCH_DEPENDS. If the third field ("target") +# exists, it will be used instead of ${DEPENDS_TARGET}. +# RUN_DEPENDS - A list of "path:dir[:target]" tuples of other ports this # package depends to run. The test done to determine # the existence of the dependency is the same as # FETCH_DEPENDS. This will be checked during the # "install" stage and the name of the dependency will -# be put into the package as well. -# LIB_DEPENDS - A list of "lib:dir" pairs of other ports this package -# depends on. "lib" is the name of a shared library. +# be put into the package as well. If the third field +# ("target") exists, it will be used instead of +# ${DEPENDS_TARGET}. +# LIB_DEPENDS - A list of "lib:dir[:target]" tuples of other ports this +# package depends on. "lib" is the name of a shared library. # make will use "ldconfig -r" to search for the # library. Note that lib can be any regular expression, # and you need two backslashes in front of dots (.) to # supress its special meaning (e.g., use # "foo\\.2\\.:${PORTSDIR}/utils/foo" to match "libfoo.2.*"). -# DEPENDS - A list of other ports this package depends on being -# made first. Use this for things that don't fall into -# the above two categories. -# EXTRACT_CMD - Command for extracting archive (default: tar). -# EXTRACT_SUFX - Suffix for archive names (default: .tar.gz). -# EXTRACT_BEFORE_ARGS - -# Arguments to ${EXTRACT_CMD} before filename -# (default: -xzf). -# EXTRACT_AFTER_ARGS - -# Arguments to ${EXTRACT_CMD} following filename -# (default: none). +# If the third field ("target") exists, it will be used +# instead of ${DEPENDS_TARGET}. +# DEPENDS - A list of "dir[:target]" tuples of other ports this +# package depends on being made first. Use this only for +# things that don't fall into the above four categories. +# If the second field ("target") exists, it will be used +# instead of ${DEPENDS_TARGET}. +# DEPENDS_TARGET - The default target to execute when a port is calling a +# dependency (default: "install"). # -# FETCH_CMD - Full path to ftp/http fetch command if not in $PATH -# (default: /usr/bin/fetch). -# FETCH_BEFORE_ARGS - -# Arguments to ${FETCH_CMD} before filename (default: none). -# FETCH_AFTER_ARGS - -# Arguments to ${FETCH_CMD} following filename (default: none). +# Various directory definitions and variables to control them. +# You rarely need to redefine any of these except WRKSRC and NO_WRKSUBDIR. # +# X11BASE - Where X11 ports install things (default: /usr/X11R6). +# LOCALBASE - Where non-X11 ports install things (default: /usr/local). +# PREFIX - Where *this* port installs its files (default: ${X11BASE} +# if USE_X_PREFIX is set, otherwise ${LOCALBASE}). +# PORTSDIR - The root of the ports tree. Defaults: +# FreeBSD/OpenBSD: /usr/ports +# NetBSD: /usr/opt +# DISTDIR - Where to get gzip'd, tarballed copies of original sources +# (default: ${PORTSDIR}/distfiles). +# PACKAGES - A top level directory where all packages go (rather than +# going locally to each port). (default: ${PORTSDIR}/packages). +# WRKDIR - A temporary working directory that gets *clobbered* on clean +# (default: ${.CURDIR}/work). +# WRKSRC - A subdirectory of ${WRKDIR} where the distribution actually +# unpacks to. (Default: ${WRKDIR}/${DISTNAME} unless +# NO_WRKSUBDIR is set, in which case simply ${WRKDIR}). +# NO_WRKSUBDIR - Assume port unpacks directly into ${WRKDIR}. +# NO_WRKDIR - There's no work directory at all; port does this someplace +# else. +# PATCHDIR - A directory containing any additional patches you made +# to port this software to FreeBSD (default: +# ${.CURDIR}/patches) +# SCRIPTDIR - A directory containing any auxiliary scripts +# (default: ${.CURDIR}/scripts) +# FILESDIR - A directory containing any miscellaneous additional files. +# (default: ${.CURDIR}/files) +# PKGDIR - A direction containing any package creation files. +# (default: ${.CURDIR}/pkg) +# # Motif support: # # REQUIRES_MOTIF - Set this in your port if it requires Motif. It will be @@ -205,15 +207,6 @@ # MOTIF_ONLY - If set, build Motif ports only. (Not much use except for # building packages.) # -# Variables to change if you want a special behavior: -# -# ECHO_MSG - Used to print all the '===>' style prompts - override this -# to turn them off (default: /bin/echo). -# DEPENDS_TARGET - The target to execute when a port is calling a -# dependency (default: "install"). -# PATCH_DEBUG - If set, print out more information about the patches as -# it attempts to apply them. -# # Variables that serve as convenient "aliases" for your *-install targets. # Use these like: "${INSTALL_PROGRAM} ${WRKSRC}/prog ${PREFIX}/bin". # @@ -222,15 +215,24 @@ # INSTALL_DATA - A command to install sharable data. # INSTALL_MAN - A command to install manpages (doesn't compress). # -# If your port doesn't automatically compress manpages, set the following. -# Depending on the setting of NOMANCOMPRESS, the make rules will compress -# the manpages for you. +# Set the following to specify all manpages that your port installs. +# These manpages will be automatically listed in ${PLIST}. Depending +# on the setting of NOMANCOMPRESS, the make rules will compress the +# manpages for you. # # MAN<sect> - A list of manpages, categorized by section. For # example, if your port has "man/man1/foo.1" and # "man/mann/bar.n", set "MAN1=foo.1" and "MANN=bar.n". # The available sections chars are "123456789LN". # MANPREFIX - The directory prefix for ${MAN<sect>} (default: ${PREFIX}). +# MAN<sect>PREFIX - If manual pages of some sections install in different +# locations than others, use these (default: ${MANPREFIX}). +# MANCOMPRESSED - This variable can take values "yes", "no" or +# "maybe". "yes" means manpages are installed +# compressed; "no" means they are not; "maybe" means +# it changes depending on the value of +# NOMANCOMPRESS. The default is "yes" if USE_IMAKE +# is set and "no" if not. # # Default targets and their behaviors: # @@ -264,6 +266,106 @@ # # NEVER override the "regular" targets unless you want to open # a major can of worms. +# +# Set these variables if your port doesn't need some of the steps. +# Note that there are no NO_PATCH or NO_CONFIGURE variables becuase +# those steps are empty by default. Also, NO_CHECKSUM is a user variable +# and is not to be set in a port's Makefile. See above for NO_PACKAGE. +# +# NO_EXTRACT - Use a dummy (do-nothing) extract target. +# NO_BUILD - Use a dummy (do-nothing) build target. +# NO_INSTALL - Use a dummy (do-nothing) install target. +# +# Here are some variables used in various stages. +# +# For fetch: +# +# FETCH_CMD - Full path to ftp/http fetch command if not in $PATH +# (default: /usr/bin/fetch). +# FETCH_BEFORE_ARGS - +# Arguments to ${FETCH_CMD} before filename (default: none). +# FETCH_AFTER_ARGS - +# Arguments to ${FETCH_CMD} following filename (default: none). +# +# For extract: +# +# EXTRACT_CMD - Command for extracting archive (default: tar). +# EXTRACT_BEFORE_ARGS - +# Arguments to ${EXTRACT_CMD} before filename +# (default: -xzf). +# EXTRACT_AFTER_ARGS - +# Arguments to ${EXTRACT_CMD} following filename +# (default: none). +# +# For configure: +# +# HAS_CONFIGURE - Says that the port has its own configure script. The +# configure stage will not do anything if this is not set. +# GNU_CONFIGURE - Set if you are using GNU configure (optional). Implies +# HAS_CONFIGURE. +# CONFIGURE_SCRIPT - Name of configure script (defaults: configure). +# CONFIGURE_ARGS - Pass these args to configure if ${HAS_CONFIGURE} is set. +# CONFIGURE_ENV - Pass these env (shell-like) to configure if +# ${HAS_CONFIGURE} is set. +# +# For build and install: +# +# MAKE_ENV - Additional environment vars passed to sub-make in build +# and install stages (default: see below). +# +# For install: +# +# NO_MTREE - If set, will not invoke mtree from bsd.port.mk from +# the "install" target. +# MTREE_FILE - The name of the mtree file (default: /etc/mtree/BSD.x11.dist +# if USE_X_PREFIX is set, /etc/mtree/BSD.local.dist +# otherwise.) +# PLIST - Name of the `packing list' file (default: ${PKGDIR}/PLIST). +# Change this to ${WRKDIR}/PLIST or something if you +# need to write to it. (It is not a good idea for a port +# to write to any file outside ${WRKDIR} during a normal +# build.) +# TMPPLIST - Name of the `packing list' file after processing +# (default: ${WRKDIR}/.PLIST.mktmp). +# PLIST_SUB - List of "variable=value" pair for substitution in ${PLIST} +# (default: see below). +# +# Note that the install target will automatically add manpages (see +# above) and also substitute special sequence of characters (delimited +# by "%%") as defined in PLIST_SUB to generate ${TMPPLIST}. For +# instance, "OSREL=${OSREL}" in PLIST_SUB causes all occurrences of +# "%%OSREL%%" in ${PLIST} to be substituted by the value of OSREL. +# ${TMPPLIST} is generated between the do-install and post-install +# stages. If you are generating the packing list on-the-fly, make +# sure it's generated by the end of do-install! +# +# For package: +# +# NO_LATEST_LINK - Do not install the "Latest" link for package. Define this +# if this port is a beta version of another stable port +# which is also in the tree. +# +# This is used in all stages: +# +# SCRIPTS_ENV - Additional environment vars passed to scripts in +# ${SCRIPTDIR} executed by bsd.port.mk (default: see below). +# +# Finally, variables to change if you want a special behavior. These +# are for debugging purposes. Don't set them in your Makefile. +# +# ECHO_MSG - Used to print all the '===>' style prompts - override this +# to turn them off (default: /bin/echo). +# PATCH_DEBUG - If set, print out more information about the patches as +# it attempts to apply them. +# PKG_DBDIR - Where package installation is recorded (default: /var/db/pkg) +# NO_PKG_REGISTER - Don't register a port install as a package. +# FORCE_PKG_REGISTER - If set, it will overwrite any existing package +# registration information in ${PKG_DBDIR}/${PKGNAME}. +# NO_DEPENDS - Don't verify build of dependencies. +# NO_CHECKSUM - Don't verify the checksum. Typically used when +# when you noticed the distfile you just fetched has +# a different checksum and you intend to verify if +# the port still works with it. # Get the architecture ARCH!= uname -m @@ -352,8 +454,23 @@ PKGDIR?= ${.CURDIR}/pkg .endif +.if defined(MANCOMPRESSED) +.if ${MANCOMPRESSED} != yes && ${MANCOMPRESSED} != no && \ + ${MANCOMPRESSED} != maybe +.BEGIN: + @${ECHO_MSG} "Error: Value of MANCOMPRESSED (is \"${MANCOMPRESSED}\") can only be \"yes\", \"no\" or \"maybe\"" + @${FALSE} +.endif +.endif + +.if defined(USE_IMAKE) && ${OPSYS} != OpenBSD +MANCOMPRESSED?= yes +.else +MANCOMPRESSED?= no +.endif + .if defined(USE_IMAKE) -USE_X_PREFIX= yes +USE_X_PREFIX= yes .endif .if defined(USE_X_PREFIX) USE_XLIB= yes @@ -424,7 +541,7 @@ MAKE_FLAGS?= -f MAKEFILE?= Makefile -MAKE_ENV+= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} MOTIFLIB="${MOTIFLIB}" CFLAGS="${CFLAGS}" +MAKE_ENV+= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} MOTIFLIB="${MOTIFLIB}" CFLAGS="${CFLAGS}" LIBDIR="${LIBDIR}" .if exists(/usr/bin/fetch) FETCH_CMD?= /usr/bin/fetch @@ -507,7 +624,7 @@ COMMENT?= ${PKGDIR}/COMMENT DESCR?= ${PKGDIR}/DESCR PLIST?= ${PKGDIR}/PLIST -TMPPLIST?= ${WRKDIR}/PLIST.mktmp +TMPPLIST?= ${WRKDIR}/.PLIST.mktmp PKG_CMD?= /usr/sbin/pkg_create .if !defined(PKG_ARGS) @@ -767,7 +884,7 @@ __MANPAGES:= ${_MANPAGES:S^${PREFIX}/^^:S/""//:S^//^/^g:S/$/.gz/} .endif -.if defined(_MANPAGES) && defined(MANCOMPRESSED) +.if defined(_MANPAGES) && ${MANCOMPRESSED} == "yes" _MANPAGES:= ${_MANPAGES:S/$/.gz/} .endif @@ -1121,7 +1238,7 @@ .if !target(do-package) do-package: - @if [ -e ${PLIST} ]; then \ + @if [ -e ${TMPPLIST} ]; then \ ${ECHO_MSG} "===> Building package for ${PKGNAME}"; \ if [ -d ${PACKAGES} ]; then \ if [ ! -d ${PKGREPOSITORY} ]; then \ @@ -1229,36 +1346,23 @@ fi .endif .endif -.if (make(real-install) || make(real-package)) && exists(${PLIST}) - @>${TMPPLIST} -.for man in ${__MANPAGES} - @${ECHO} ${man} >> ${TMPPLIST} -.endfor - @${SED} ${_sedsubplist} ${PLIST} >> ${TMPPLIST} -.endif @cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} ${.TARGET:S/^real-/pre-/} @if [ -f ${SCRIPTDIR}/${.TARGET:S/^real-/pre-/} ]; then \ cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \ ${SCRIPTDIR}/${.TARGET:S/^real-/pre-/}; \ fi @cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} ${.TARGET:S/^real-/do-/} +# put here so ports can change the contents of ${TMPPLIST} if necessary +.if make(real-install) + @cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} generate-plist +.endif @cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} ${.TARGET:S/^real-/post-/} @if [ -f ${SCRIPTDIR}/${.TARGET:S/^real-/post-/} ]; then \ cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \ ${SCRIPTDIR}/${.TARGET:S/^real-/post-/}; \ fi .if make(real-install) && defined(_MANPAGES) -.if defined(MANCOMPRESSED) && defined(NOMANCOMPRESS) - @${ECHO_MSG} "===> Uncompressing manual pages for ${PKGNAME}" -.for manpage in ${_MANPAGES} - @${GUNZIP_CMD} ${manpage} -.endfor -.elif !defined(MANCOMPRESSED) && !defined(NOMANCOMPRESS) - @${ECHO_MSG} "===> Compressing manual pages for ${PKGNAME}" -.for manpage in ${_MANPAGES} - @${GZIP_CMD} ${manpage} -.endfor -.endif + @cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} compress-man .endif .if make(real-install) && !defined(NO_PKG_REGISTER) @cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} fake-pkg @@ -1536,7 +1640,7 @@ if [ -d $$dir ]; then \ (cd $$dir ; ${MAKE} package-name package-depends); \ else \ - ${ECHO_MSG} "Warning: \"$$dir\" non-existent -- @pkgdep registration incomplete" >&2; \ + ${ECHO_MSG} "${PKGNAME}: \"$$dir\" non-existent -- dependency list incomplete" >&2; \ fi; \ done .endif @@ -1706,7 +1810,11 @@ .if !target(depends-list) depends-list: @for dir in `${ECHO} "${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS}" | ${TR} '\040' '\012' | ${SED} -e 's/^[^:]*://' -e 's/:.*//' | sort -u` `${ECHO} ${DEPENDS} | ${TR} '\040' '\012' | ${SED} -e 's/:.*//' | sort -u`; do \ - (cd $$dir; ${MAKE} package-name depends-list); \ + if [ -d $$dir ]; then \ + (cd $$dir ; ${MAKE} package-name depends-list); \ + else \ + ${ECHO_MSG} "${PKGNAME}: \"$$dir\" non-existent -- dependency list incomplete" >&2; \ + fi; \ done .endif @@ -1788,13 +1896,41 @@ .endif .endif +# Generate packing list. Also tests to make sure all required package +# files exist. + +.if !target(generate-plist) +generate-plist: + @if [ ! -f ${PLIST} -o ! -f ${COMMENT} -o ! -f ${DESCR} ]; then ${ECHO} "** Missing package files for ${PKGNAME}."; exit 1; fi + @>${TMPPLIST} +.for man in ${__MANPAGES} + @${ECHO} ${man} >> ${TMPPLIST} +.endfor + @${SED} ${_sedsubplist} ${PLIST} >> ${TMPPLIST} +.endif + +# Compress (or uncompress) manpages. +.if !target(compress-man) +compress-man: +.if ${MANCOMPRESSED} == yes && defined(NOMANCOMPRESS) + @${ECHO_MSG} "===> Uncompressing manual pages for ${PKGNAME}" +.for manpage in ${_MANPAGES} + @${GUNZIP_CMD} ${manpage} +.endfor +.elif ${MANCOMPRESSED} == no && !defined(NOMANCOMPRESS) + @${ECHO_MSG} "===> Compressing manual pages for ${PKGNAME}" +.for manpage in ${_MANPAGES} + @${GZIP_CMD} ${manpage} +.endfor +.endif +.endif + # Fake installation of package so that user can pkg_delete it later. # Also, make sure that an installed port is recognized correctly in # accordance to the @pkgdep directive in the packing lists .if !target(fake-pkg) fake-pkg: - @if [ ! -f ${TMPPLIST} -o ! -f ${COMMENT} -o ! -f ${DESCR} ]; then ${ECHO} "** Missing package files for ${PKGNAME} - installation not recorded."; exit 1; fi @if [ ! -d ${PKG_DBDIR} ]; then ${RM} -f ${PKG_DBDIR}; ${MKDIR} ${PKG_DBDIR}; fi .if defined(FORCE_PKG_REGISTER) @${RM} -rf ${PKG_DBDIR}/${PKGNAME} Index: bsd.port.subdir.mk =================================================================== RCS file: /home/ncvs/src/share/mk/bsd.port.subdir.mk,v retrieving revision 1.15.2.3 diff -u -r1.15.2.3 bsd.port.subdir.mk --- bsd.port.subdir.mk 1997/11/20 05:36:46 1.15.2.3 +++ bsd.port.subdir.mk 1998/08/13 01:52:04 @@ -28,7 +28,7 @@ # Creating README.html for package. # # afterinstall, all, beforeinstall, build, checksum, clean, -# configure, depend, describe, extract, fetch, fetch-list, +# configure, deinstall, depend, describe, extract, fetch, fetch-list, # install, package, readmes, realinstall, reinstall, tags # @@ -79,7 +79,8 @@ ${MAKE} all .for __target in all fetch fetch-list package extract configure \ - build clean depend describe distclean reinstall tags checksum + build clean deinstall depend describe distclean \ + reinstall tags checksum .if !target(${__target}) ${__target}: _SUBDIRUSE .endif To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808240608.XAA02385>