diff options
author | hubertf <hubertf@pkgsrc.org> | 1998-01-15 22:58:59 +0000 |
---|---|---|
committer | hubertf <hubertf@pkgsrc.org> | 1998-01-15 22:58:59 +0000 |
commit | 15d441445ead8622c83b2c623d99186841483df9 (patch) | |
tree | 56d5de3129f551076b001e1928c2b29cf6149b81 /mk | |
parent | 1806bbe130d8c363be551e8bca465fd9314e3548 (diff) | |
download | pkgsrc-15d441445ead8622c83b2c623d99186841483df9.tar.gz |
- Our default for FETCH_CMD is ftp, not fetch.
- Document NO_IGNORE, __ARCH_OK
- Make __ARCH_OK overridable, so it can be set to YES e.g. for fetching
all distfiles.
- Move ".ifndef(__ARCH_OK): block, so some targets like clean work
in any case.
- Add LOCALBASE and X11BASE to PATH in MAKE_ENV, CONFIGURE_ENV and
SCRIPT_ENV; this fixes PR 4573
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.mk | 42 | ||||
-rw-r--r-- | mk/bsd.port.mk | 42 |
2 files changed, 56 insertions, 28 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 9aa7b3cab2b..087e956999a 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,7 +1,7 @@ #-*- mode: Fundamental; tab-width: 4; -*- # ex:ts=4 # -# $NetBSD: bsd.pkg.mk,v 1.29 1998/01/15 09:37:27 agc Exp $ +# $NetBSD: bsd.pkg.mk,v 1.30 1998/01/15 22:58:59 hubertf Exp $ # # bsd.port.mk - 940820 Jordan K. Hubbard. # This file is in the public domain. @@ -201,11 +201,19 @@ NetBSD_MAINTAINER= agc@netbsd.org # (default: none). # # FETCH_CMD - Full path to ftp/http fetch command if not in $PATH -# (default: /usr/bin/fetch). +# (default: /usr/bin/ftp). # FETCH_BEFORE_ARGS - # Arguments to ${FETCH_CMD} before filename (default: none). # FETCH_AFTER_ARGS - # Arguments to ${FETCH_CMD} following filename (default: none). +# NO_IGNORE - Set this to YES (most probably in a "make fetch" in +# ${PORTSDIR}) if you want to fetch all distfiles, +# even for packages not built due to limitation by +# absent X or Motif ... +# __ARCH_OK - Internal variable set if the package is ok to build +# on this architecture. Set to YES to insist on +# e.g. fetching all distfiles (for interactive use in +# ${PORTSDIR}, mostly. # # Motif support: # @@ -297,21 +305,13 @@ OPSYS!= uname -s .if defined(ONLY_FOR_ARCHS) .for __ARCH in ${ONLY_FOR_ARCHS} .if ${MACHINE_ARCH} == "${__ARCH}" -__ARCH_OK= 1 +__ARCH_OK?= 1 .endif .endfor .else -__ARCH_OK= 1 +__ARCH_OK?= 1 .endif -.if !defined(__ARCH_OK) -.MAIN: all - -fetch fetch-list extract patch configure build install reinstall package describe checkpatch checksum makesum all: - @echo "This port is only for ${ONLY_FOR_ARCHS}," - @echo "and you are running ${MACHINE_ARCH}." -.else - .if exists(${.CURDIR}/../Makefile.inc) .include "${.CURDIR}/../Makefile.inc" .endif @@ -465,6 +465,7 @@ MD5_FILE?= ${FILESDIR}/md5 MAKE_FLAGS?= -f MAKEFILE?= Makefile +MAKE_ENV+= PATH=${PATH}:${LOCALBASE}/bin:${X11BASE}/bin PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} MOTIFLIB="${MOTIFLIB}" CFLAGS="${CFLAGS}" MAKE_ENV+= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} MOTIFLIB="${MOTIFLIB}" CFLAGS="${CFLAGS}" .if exists(/usr/bin/fetch) @@ -752,6 +753,7 @@ PKGFILE?= ${PKGNAME}${PKG_SUFX} .endif CONFIGURE_SCRIPT?= configure +CONFIGURE_ENV+= PATH=${PATH}:${LOCALBASE}/bin:${X11BASE}/bin .if defined(GNU_CONFIGURE) CONFIGURE_ARGS+= --prefix=${PREFIX} @@ -759,7 +761,8 @@ HAS_CONFIGURE= yes .endif # Passed to most of script invocations -SCRIPTS_ENV+= CURDIR=${.CURDIR} DISTDIR=${DISTDIR} \ +SCRIPTS_ENV+= CURDIR=${.CURDIR} DISTDIR=${DISTDIR} \ + PATH=${PATH}:${LOCALBASE}/bin:${X11BASE}/bin \ WRKDIR=${WRKDIR} WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} \ SCRIPTDIR=${SCRIPTDIR} FILESDIR=${FILESDIR} \ PORTSDIR=${PORTSDIR} DEPENDS="${DEPENDS}" \ @@ -854,6 +857,14 @@ IGNORE= "uses X11, but ${X11BASE} not found" IGNORE= "is marked as broken: ${BROKEN}" .endif +.if !defined(__ARCH_OK) +.MAIN: all + +fetch fetch-list extract patch configure build install reinstall package describe checkpatch checksum makesum all: + @echo "This port is only for ${ONLY_FOR_ARCHS}," + @echo "and you are running ${MACHINE_ARCH}." +.else + .if defined(IGNORE) .if defined(IGNORE_SILENT) IGNORECMD= ${DO_NADA} @@ -1368,6 +1379,10 @@ reinstall: @DEPENDS_TARGET=${DEPENDS_TARGET} ${MAKE} install .endif +.endif # __ARCH_OK + # The functions below may be useful even if _ARCH_OK is not set + + ################################################################ # Some more targets supplied for users' convenience ################################################################ @@ -1895,4 +1910,3 @@ ${PLIST}: ${PLIST_SRC} .endif # MANZ -.endif # __ARCH_OK diff --git a/mk/bsd.port.mk b/mk/bsd.port.mk index 0e38581b0c2..d7d13f630c8 100644 --- a/mk/bsd.port.mk +++ b/mk/bsd.port.mk @@ -1,7 +1,7 @@ #-*- mode: Fundamental; tab-width: 4; -*- # ex:ts=4 # -# $NetBSD: bsd.port.mk,v 1.29 1998/01/15 09:37:27 agc Exp $ +# $NetBSD: bsd.port.mk,v 1.30 1998/01/15 22:58:59 hubertf Exp $ # # bsd.port.mk - 940820 Jordan K. Hubbard. # This file is in the public domain. @@ -201,11 +201,19 @@ NetBSD_MAINTAINER= agc@netbsd.org # (default: none). # # FETCH_CMD - Full path to ftp/http fetch command if not in $PATH -# (default: /usr/bin/fetch). +# (default: /usr/bin/ftp). # FETCH_BEFORE_ARGS - # Arguments to ${FETCH_CMD} before filename (default: none). # FETCH_AFTER_ARGS - # Arguments to ${FETCH_CMD} following filename (default: none). +# NO_IGNORE - Set this to YES (most probably in a "make fetch" in +# ${PORTSDIR}) if you want to fetch all distfiles, +# even for packages not built due to limitation by +# absent X or Motif ... +# __ARCH_OK - Internal variable set if the package is ok to build +# on this architecture. Set to YES to insist on +# e.g. fetching all distfiles (for interactive use in +# ${PORTSDIR}, mostly. # # Motif support: # @@ -297,21 +305,13 @@ OPSYS!= uname -s .if defined(ONLY_FOR_ARCHS) .for __ARCH in ${ONLY_FOR_ARCHS} .if ${MACHINE_ARCH} == "${__ARCH}" -__ARCH_OK= 1 +__ARCH_OK?= 1 .endif .endfor .else -__ARCH_OK= 1 +__ARCH_OK?= 1 .endif -.if !defined(__ARCH_OK) -.MAIN: all - -fetch fetch-list extract patch configure build install reinstall package describe checkpatch checksum makesum all: - @echo "This port is only for ${ONLY_FOR_ARCHS}," - @echo "and you are running ${MACHINE_ARCH}." -.else - .if exists(${.CURDIR}/../Makefile.inc) .include "${.CURDIR}/../Makefile.inc" .endif @@ -465,6 +465,7 @@ MD5_FILE?= ${FILESDIR}/md5 MAKE_FLAGS?= -f MAKEFILE?= Makefile +MAKE_ENV+= PATH=${PATH}:${LOCALBASE}/bin:${X11BASE}/bin PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} MOTIFLIB="${MOTIFLIB}" CFLAGS="${CFLAGS}" MAKE_ENV+= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} MOTIFLIB="${MOTIFLIB}" CFLAGS="${CFLAGS}" .if exists(/usr/bin/fetch) @@ -752,6 +753,7 @@ PKGFILE?= ${PKGNAME}${PKG_SUFX} .endif CONFIGURE_SCRIPT?= configure +CONFIGURE_ENV+= PATH=${PATH}:${LOCALBASE}/bin:${X11BASE}/bin .if defined(GNU_CONFIGURE) CONFIGURE_ARGS+= --prefix=${PREFIX} @@ -759,7 +761,8 @@ HAS_CONFIGURE= yes .endif # Passed to most of script invocations -SCRIPTS_ENV+= CURDIR=${.CURDIR} DISTDIR=${DISTDIR} \ +SCRIPTS_ENV+= CURDIR=${.CURDIR} DISTDIR=${DISTDIR} \ + PATH=${PATH}:${LOCALBASE}/bin:${X11BASE}/bin \ WRKDIR=${WRKDIR} WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} \ SCRIPTDIR=${SCRIPTDIR} FILESDIR=${FILESDIR} \ PORTSDIR=${PORTSDIR} DEPENDS="${DEPENDS}" \ @@ -854,6 +857,14 @@ IGNORE= "uses X11, but ${X11BASE} not found" IGNORE= "is marked as broken: ${BROKEN}" .endif +.if !defined(__ARCH_OK) +.MAIN: all + +fetch fetch-list extract patch configure build install reinstall package describe checkpatch checksum makesum all: + @echo "This port is only for ${ONLY_FOR_ARCHS}," + @echo "and you are running ${MACHINE_ARCH}." +.else + .if defined(IGNORE) .if defined(IGNORE_SILENT) IGNORECMD= ${DO_NADA} @@ -1368,6 +1379,10 @@ reinstall: @DEPENDS_TARGET=${DEPENDS_TARGET} ${MAKE} install .endif +.endif # __ARCH_OK + # The functions below may be useful even if _ARCH_OK is not set + + ################################################################ # Some more targets supplied for users' convenience ################################################################ @@ -1895,4 +1910,3 @@ ${PLIST}: ${PLIST_SRC} .endif # MANZ -.endif # __ARCH_OK |