version 1.5, 1996/06/30 18:25:29 |
version 1.6, 1996/08/23 11:37:41 |
|
|
# bsd.port.mk - 940820 Jordan K. Hubbard. |
# bsd.port.mk - 940820 Jordan K. Hubbard. |
# This file is in the public domain. |
# This file is in the public domain. |
# |
# |
|
# FreeBSD Id: bsd.port.mk,v 1.221 1996/08/18 10:53:16 asami Exp $ |
|
# |
# Please view me with 4 column tabs! |
# Please view me with 4 column tabs! |
|
|
|
# This is for this file, not for the ports that includes it, so it's |
|
# commented out -- the person to contact if you have questions/ |
|
# suggestions about bsd.port.mk. |
|
# |
|
# MAINTAINER= asami@FreeBSD.ORG |
|
# |
|
|
# Supported Variables and their behaviors: |
# Supported Variables and their behaviors: |
# |
# |
|
|
# |
# |
# Variables that typically apply to an individual port. Non-Boolean |
# Variables that typically apply to an individual port. Non-Boolean |
# variables without defaults are *mandatory*. |
# variables without defaults are *mandatory*. |
# |
|
# |
# |
# WRKDIR - A temporary working directory that gets *clobbered* on clean |
# WRKDIR - A temporary working directory that gets *clobbered* on clean |
# (default: ${.CURDIR}/work). |
# (default: ${.CURDIR}/work). |
|
|
# the "install" target. This is the default if |
# the "install" target. This is the default if |
# USE_IMAKE or USE_X11 is set. |
# USE_IMAKE or USE_X11 is set. |
# |
# |
# NO_EXTRACT - Use a dummy (do-nothing) extract target. |
|
# NO_CONFIGURE - Use a dummy (do-nothing) configure target. |
|
# NO_BUILD - Use a dummy (do-nothing) build target. |
# NO_BUILD - Use a dummy (do-nothing) build target. |
# NO_PACKAGE - Use a dummy (do-nothing) package target. |
# NO_CONFIGURE - Use a dummy (do-nothing) configure target. |
# NO_INSTALL - Use a dummy (do-nothing) install target. |
|
# NO_CDROM - Use dummy (do-nothing) targets if FOR_CDROM is set. |
# NO_CDROM - Use dummy (do-nothing) targets if FOR_CDROM is set. |
|
# 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_PKG_REGISTER - Don't register a port install as a package. |
# NO_WRKSUBDIR - Assume port unpacks directly into ${WRKDIR}. |
# NO_WRKSUBDIR - Assume port unpacks directly into ${WRKDIR}. |
# NO_WRKDIR - There's no work directory at all; port does this someplace |
# NO_WRKDIR - There's no work directory at all; port does this someplace |
# else. |
# else. |
|
|
# for it and go into "dir" to do a "make all install" |
# for it and go into "dir" to do a "make all install" |
# if it's not found. |
# if it's not found. |
# BUILD_DEPENDS - A list of "prog:dir" pairs of other ports this |
# BUILD_DEPENDS - A list of "prog:dir" pairs of other ports this |
# package depends to build (somewhere between the |
# package depends to build (between the "extract" |
# "extract" to "build" stage). "prog" is the name |
# and "build" stages, inclusive). "prog" is the name |
# of an executable. make will search your $PATH for |
# of an executable. make will search your $PATH for |
# it and go into "dir" to do a "make all install" if |
# it and go into "dir" to do a "make all install" if |
# it's not found. |
# it's not found. |
|
|
# Arguments to ${EXTRACT_CMD} following filename |
# Arguments to ${EXTRACT_CMD} following filename |
# (default: none). |
# (default: none). |
# |
# |
# NCFTP - Full path to ncftp command if not in $PATH (default: ncftp). |
# FETCH_CMD - Full path to ftp/http fetch command if not in $PATH |
# NCFTPFLAGS - Arguments to ${NCFTP} (default: -N). |
# (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). |
# |
# |
# Motif support: |
# Motif support: |
# |
# |
|
|
# HAVE_MOTIF - If set, means system has Motif. Typically set in |
# HAVE_MOTIF - If set, means system has Motif. Typically set in |
# /etc/make.conf. |
# /etc/make.conf. |
# MOTIF_STATIC - If set, link libXm statically; otherwise, link it |
# MOTIF_STATIC - If set, link libXm statically; otherwise, link it |
# dynamically. |
# dynamically. Typically set in /etc/make.conf. |
|
# MOTIFLIB - Set automatically to appropriate value depending on |
|
# ${MOTIF_STATIC}. Substitute references to -lXm with |
|
# patches to make your port conform to our standards. |
# |
# |
# Variables to change if you want a special behavior: |
# Variables to change if you want a special behavior: |
# |
# |
|
|
# IS_DEPENDED_TARGET=fetch" will fetch all the distfiles, |
# IS_DEPENDED_TARGET=fetch" will fetch all the distfiles, |
# including those of dependencies, without actually building |
# including those of dependencies, without actually building |
# any of them). |
# any of them). |
|
# 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". |
|
# INSTALL_PROGRAM - A command to install binary executables. |
|
# INSTALL_SCRIPT - A command to install executable scripts. |
|
# INSTALL_DATA - A command to install sharable data. |
|
# INSTALL_MAN - A command to install manpages (doesn't compress). |
|
# |
# Default targets and their behaviors: |
# Default targets and their behaviors: |
# |
# |
# fetch - Retrieves ${DISTFILES} (and ${PATCHFILES} if defined) |
# fetch - Retrieves ${DISTFILES} (and ${PATCHFILES} if defined) |
|
|
.include "${.CURDIR}/../Makefile.inc" |
.include "${.CURDIR}/../Makefile.inc" |
.endif |
.endif |
|
|
|
|
# These need to be absolute since we don't know how deep in the ports |
# These need to be absolute since we don't know how deep in the ports |
# tree we are and thus can't go relative. They can, of course, be overridden |
# tree we are and thus can't go relative. They can, of course, be overridden |
# by individual Makefiles. |
# by individual Makefiles. |
|
|
|
|
# How to do nothing. Override if you, for some strange reason, would rather |
# How to do nothing. Override if you, for some strange reason, would rather |
# do something. |
# do something. |
DO_NADA?= echo -n |
DO_NADA?= /usr/bin/true |
|
|
# Miscellaneous overridable commands: |
# Miscellaneous overridable commands: |
GMAKE?= gmake |
GMAKE?= gmake |
|
|
MAKEFILE?= Makefile |
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}" |
|
|
NCFTP?= /usr/bin/ftp |
FETCH_CMD?= /usr/bin/ftp |
NCFTPFLAGS?= |
|
|
|
TOUCH?= /usr/bin/touch |
TOUCH?= /usr/bin/touch |
TOUCH_FLAGS?= -f |
TOUCH_FLAGS?= -f |
|
|
PATCH_STRIP?= -p0 |
PATCH_STRIP?= -p0 |
PATCH_DIST_STRIP?= -p0 |
PATCH_DIST_STRIP?= -p0 |
.if defined(PATCH_DEBUG) |
.if defined(PATCH_DEBUG) |
|
PATCH_DEBUG_TMP= yes |
PATCH_ARGS?= -d ${WRKSRC} -E ${PATCH_STRIP} |
PATCH_ARGS?= -d ${WRKSRC} -E ${PATCH_STRIP} |
PATCH_DIST_ARGS?= -d ${WRKSRC} -E ${PATCH_DIST_STRIP} |
PATCH_DIST_ARGS?= -d ${WRKSRC} -E ${PATCH_DIST_STRIP} |
.else |
.else |
|
PATCH_DEBUG_TMP= no |
PATCH_ARGS?= -d ${WRKSRC} --forward --quiet -E ${PATCH_STRIP} |
PATCH_ARGS?= -d ${WRKSRC} --forward --quiet -E ${PATCH_STRIP} |
PATCH_DIST_ARGS?= -d ${WRKSRC} --forward --quiet -E ${PATCH_DIST_STRIP} |
PATCH_DIST_ARGS?= -d ${WRKSRC} --forward --quiet -E ${PATCH_DIST_STRIP} |
.endif |
.endif |
|
|
NO_MTREE= yes |
NO_MTREE= yes |
.endif |
.endif |
|
|
|
# A few aliases for *-install targets |
|
INSTALL_PROGRAM= \ |
|
${INSTALL} ${COPY} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} |
|
INSTALL_SCRIPT= \ |
|
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} |
|
INSTALL_DATA= \ |
|
${INSTALL} ${COPY} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} |
|
INSTALL_MAN= \ |
|
${INSTALL} ${COPY} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} |
|
|
# The user can override the NO_PACKAGE by specifying this from |
# The user can override the NO_PACKAGE by specifying this from |
# the make command line |
# the make command line |
.if defined(FORCE_PACKAGE) |
.if defined(FORCE_PACKAGE) |
|
|
MASTER_SITES+= ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/ |
MASTER_SITES+= ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/ |
PATCH_SITES+= ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/ |
PATCH_SITES+= ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/ |
.else |
.else |
|
MASTER_SITES?= # to avoid "variable MASTER_SITES recursive" error |
MASTER_SITES:= ${MASTER_SITE_OVERRIDE} ${MASTER_SITES} |
MASTER_SITES:= ${MASTER_SITE_OVERRIDE} ${MASTER_SITES} |
PATCH_SITES:= ${MASTER_SITE_OVERRIDE} ${PATCH_SITES} |
PATCH_SITES:= ${MASTER_SITE_OVERRIDE} ${PATCH_SITES} |
.endif |
.endif |
|
|
|
|
.if defined(ALL_HOOK) |
.if defined(ALL_HOOK) |
all: |
all: |
@${SETENV} CURDIR=${.CURDIR} DISTNAME=${DISTNAME} \ |
@cd ${.CURDIR} && ${SETENV} CURDIR=${.CURDIR} DISTNAME=${DISTNAME} \ |
DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} WRKSRC=${WRKSRC} \ |
DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} WRKSRC=${WRKSRC} \ |
PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \ |
PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \ |
FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \ |
FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \ |
|
|
@${TOUCH} ${TOUCH_FLAGS} ${CONFIGURE_COOKIE} |
@${TOUCH} ${TOUCH_FLAGS} ${CONFIGURE_COOKIE} |
.endif |
.endif |
|
|
|
# Disable describe |
|
.if defined(NO_DESCRIBE) && !target(describe) |
|
describe: |
|
@${DO_NADA} |
|
.endif |
|
|
# Disable build |
# Disable build |
.if defined(NO_BUILD) && !target(build) |
.if defined(NO_BUILD) && !target(build) |
build: configure |
build: configure |
|
|
${ECHO_MSG} ">> $$file doesn't seem to exist on this system."; \ |
${ECHO_MSG} ">> $$file doesn't seem to exist on this system."; \ |
for site in ${MASTER_SITES}; do \ |
for site in ${MASTER_SITES}; do \ |
${ECHO_MSG} ">> Attempting to fetch from $${site}."; \ |
${ECHO_MSG} ">> Attempting to fetch from $${site}."; \ |
(${NCFTP} ${NCFTPFLAGS} $${site}$${file} ${NCFTPTAIL} || true); \ |
if ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${site}$${file} ${FETCH_AFTER_ARGS}; then \ |
if [ -f $$file -o -f `${BASENAME} $$file` ]; then \ |
|
continue 2; \ |
continue 2; \ |
fi \ |
fi \ |
done; \ |
done; \ |
${ECHO_MSG} ">> Couldn't fetch it - please try to retreive this";\ |
${ECHO_MSG} ">> Couldn't fetch it - please try to retrieve this";\ |
${ECHO_MSG} ">> port manually into ${DISTDIR} and try again."; \ |
${ECHO_MSG} ">> port manually into ${DISTDIR} and try again."; \ |
exit 1; \ |
exit 1; \ |
fi \ |
fi \ |
|
|
${ECHO_MSG} ">> $$file doesn't seem to exist on this system."; \ |
${ECHO_MSG} ">> $$file doesn't seem to exist on this system."; \ |
for site in ${PATCH_SITES}; do \ |
for site in ${PATCH_SITES}; do \ |
${ECHO_MSG} ">> Attempting to fetch from $${site}."; \ |
${ECHO_MSG} ">> Attempting to fetch from $${site}."; \ |
(${NCFTP} ${NCFTPFLAGS} $${site}$${file} ${NCFTPTAIL} || true); \ |
if ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${site}$${file} ${FETCH_AFTER_ARGS}; then \ |
if [ -f $$file -o -f `${BASENAME} $$file` ]; then \ |
|
continue 2; \ |
continue 2; \ |
fi \ |
fi \ |
done; \ |
done; \ |
${ECHO_MSG} ">> Couldn't fetch it - please try to retreive this";\ |
${ECHO_MSG} ">> Couldn't fetch it - please try to retrieve this";\ |
${ECHO_MSG} ">> port manually into ${DISTDIR} and try again."; \ |
${ECHO_MSG} ">> port manually into ${DISTDIR} and try again."; \ |
exit 1; \ |
exit 1; \ |
fi \ |
fi \ |
|
|
|
|
.if !target(do-extract) |
.if !target(do-extract) |
do-extract: |
do-extract: |
|
.if !defined(NO_WRKDIR) |
@${RM} -rf ${WRKDIR} |
@${RM} -rf ${WRKDIR} |
@${MKDIR} -p ${WRKDIR} |
@${MKDIR} -p ${WRKDIR} |
|
.endif |
@for file in ${EXTRACT_ONLY}; do \ |
@for file in ${EXTRACT_ONLY}; do \ |
if ! (cd ${WRKDIR};${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\ |
if !(cd ${WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\ |
then \ |
then \ |
exit 1; \ |
exit 1; \ |
fi \ |
fi \ |
|
|
do-patch: |
do-patch: |
.if defined(PATCHFILES) |
.if defined(PATCHFILES) |
@${ECHO_MSG} "===> Applying distribution patches for ${PKGNAME}" |
@${ECHO_MSG} "===> Applying distribution patches for ${PKGNAME}" |
.if defined(PATCH_DEBUG) |
|
@(cd ${DISTDIR}; \ |
@(cd ${DISTDIR}; \ |
for i in ${PATCHFILES}; do \ |
for i in ${PATCHFILES}; do \ |
${ECHO_MSG} "===> Applying distribution patch $$i" ; \ |
if [ ${PATCH_DEBUG_TMP} = yes ]; then \ |
|
${ECHO_MSG} "===> Applying distribution patch $$i" ; \ |
|
fi; \ |
case $$i in \ |
case $$i in \ |
*.Z|*.gz) \ |
*.Z|*.gz) \ |
${GZCAT} $$i | ${PATCH} ${PATCH_DIST_ARGS}; \ |
${GZCAT} $$i | ${PATCH} ${PATCH_DIST_ARGS}; \ |
|
|
;; \ |
;; \ |
esac; \ |
esac; \ |
done) |
done) |
.else |
|
@(cd ${DISTDIR}; \ |
|
for i in ${PATCHFILES}; do \ |
|
case $$i in \ |
|
*.Z|*.gz) \ |
|
${GZCAT} $$i | ${PATCH} ${PATCH_DIST_ARGS}; \ |
|
;; \ |
|
*) \ |
|
${PATCH} ${PATCH_DIST_ARGS} < $$i; \ |
|
;; \ |
|
esac; \ |
|
done) |
|
.endif |
.endif |
.endif |
|
.if defined(PATCH_DEBUG) |
|
@if [ -d ${PATCHDIR} ]; then \ |
@if [ -d ${PATCHDIR} ]; then \ |
${ECHO_MSG} "===> Applying FreeBSD patches for ${PKGNAME}" ; \ |
if [ "`echo ${PATCHDIR}/patch-*`" = "${PATCHDIR}/patch-*" ]; then \ |
for i in ${PATCHDIR}/patch-*; do \ |
${ECHO_MSG} "===> Ignoring empty patch directory"; \ |
case $$i in \ |
if [ -d ${PATCHDIR}/CVS ]; then \ |
*.orig|*~) \ |
${ECHO_MSG} "===> Perhaps you forgot the -P flag to cvs co or update?"; \ |
${ECHO_MSG} "===> Ignoring patchfile $$i" ; \ |
fi; \ |
;; \ |
else \ |
*) \ |
${ECHO_MSG} "===> Applying FreeBSD patches for ${PKGNAME}" ; \ |
${ECHO_MSG} "===> Applying FreeBSD patch $$i" ; \ |
for i in ${PATCHDIR}/patch-*; do \ |
${PATCH} ${PATCH_ARGS} < $$i; \ |
case $$i in \ |
;; \ |
*.orig|*~) \ |
esac; \ |
${ECHO_MSG} "===> Ignoring patchfile $$i" ; \ |
done; \ |
;; \ |
|
*) \ |
|
if [ ${PATCH_DEBUG_TMP} = yes ]; then \ |
|
${ECHO_MSG} "===> Applying FreeBSD patch $$i" ; \ |
|
fi; \ |
|
${PATCH} ${PATCH_ARGS} < $$i; \ |
|
;; \ |
|
esac; \ |
|
done; \ |
|
fi; \ |
fi |
fi |
.else |
|
@if [ -d ${PATCHDIR} ]; then \ |
|
${ECHO_MSG} "===> Applying FreeBSD patches for ${PKGNAME}" ; \ |
|
for i in ${PATCHDIR}/patch-*; do \ |
|
case $$i in \ |
|
*.orig|*~) \ |
|
${ECHO_MSG} "===> Ignoring patchfile $$i" ; \ |
|
;; \ |
|
*) \ |
|
${PATCH} ${PATCH_ARGS} < $$i; \ |
|
;; \ |
|
esac; \ |
|
done;\ |
|
fi |
|
.endif |
.endif |
.endif |
|
|
|
# Configure |
# Configure |
|
|
.if !target(do-configure) |
.if !target(do-configure) |
do-configure: |
do-configure: |
@if [ -f ${SCRIPTDIR}/configure ]; then \ |
@if [ -f ${SCRIPTDIR}/${CONFIGURE_SCRIPT} ]; then \ |
${SETENV} CURDIR=${.CURDIR} DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} \ |
cd ${.CURDIR} && ${SETENV} CURDIR=${.CURDIR} DISTDIR=${DISTDIR}\ |
WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \ |
WRKDIR=${WRKDIR} WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} \ |
FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \ |
SCRIPTDIR=${SCRIPTDIR} FILESDIR=${FILESDIR} \ |
DEPENDS="${DEPENDS}" X11BASE=${X11BASE} \ |
PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} DEPENDS="${DEPENDS}" \ |
/bin/sh ${SCRIPTDIR}/configure; \ |
X11BASE=${X11BASE} /bin/sh ${SCRIPTDIR}/${CONFIGURE_SCRIPT}; \ |
fi |
fi |
.if defined(HAS_CONFIGURE) |
.if defined(HAS_CONFIGURE) |
@(cd ${WRKSRC}; CC="${CC}" ac_cv_path_CC="${CC}" CFLAGS="${CFLAGS}" \ |
@(cd ${WRKSRC} && CC="${CC}" ac_cv_path_CC="${CC}" CFLAGS="${CFLAGS}" \ |
INSTALL="/usr/bin/install -c -o ${BINOWN} -g ${BINGRP}" \ |
INSTALL="/usr/bin/install -c -o ${BINOWN} -g ${BINGRP}" \ |
INSTALL_PROGRAM="/usr/bin/install ${COPY} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}" \ |
INSTALL_PROGRAM="${INSTALL_PROGRAM}" \ |
${CONFIGURE_ENV} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}) |
${CONFIGURE_ENV} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}) |
.endif |
.endif |
.if defined(USE_IMAKE) |
.if defined(USE_IMAKE) |
@(cd ${WRKSRC}; ${XMKMF}) |
@(cd ${WRKSRC} && ${XMKMF}) |
.endif |
.endif |
.endif |
.endif |
|
|
|
|
|
|
.if !target(do-install) |
.if !target(do-install) |
do-install: |
do-install: |
|
@if [ `/bin/sh -c umask` != 0022 ]; then \ |
|
${ECHO_MSG} "===> Warning: your umask is \"`/bin/sh -c umask`"\".; \ |
|
${ECHO_MSG} " If this is not desired, set it to an appropriate value"; \ |
|
${ECHO_MSG} " and install this port again by \`\`make reinstall''."; \ |
|
fi |
.if defined(USE_GMAKE) |
.if defined(USE_GMAKE) |
@(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${INSTALL_TARGET}) |
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${INSTALL_TARGET}) |
.if defined(USE_IMAKE) && !defined(NO_INSTALL_MANPAGES) |
.if defined(USE_IMAKE) && !defined(NO_INSTALL_MANPAGES) |
@(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} install.man) |
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} install.man) |
.endif |
.endif |
.else defined(USE_GMAKE) |
.else defined(USE_GMAKE) |
@(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${INSTALL_TARGET}) |
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${INSTALL_TARGET}) |
.if defined(USE_IMAKE) && !defined(NO_INSTALL_MANPAGES) |
.if defined(USE_IMAKE) && !defined(NO_INSTALL_MANPAGES) |
@(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} install.man) |
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} install.man) |
.endif |
.endif |
.endif |
.endif |
.endif |
.endif |
|
|
|
|
_PORT_USE: .USE |
_PORT_USE: .USE |
.if make(real-fetch) |
.if make(real-fetch) |
@${MAKE} ${.MAKEFLAGS} fetch-depends |
@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} fetch-depends |
.endif |
.endif |
.if make(real-extract) |
.if make(real-extract) |
@${MAKE} ${.MAKEFLAGS} build-depends lib-depends misc-depends |
@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} build-depends lib-depends misc-depends |
.endif |
.endif |
.if make(real-install) |
.if make(real-install) |
@${MAKE} ${.MAKEFLAGS} run-depends |
@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} run-depends |
.endif |
.endif |
.if make(real-install) |
.if make(real-install) |
.if !defined(NO_MTREE) |
.if !defined(NO_MTREE) |
|
|
fi |
fi |
.endif |
.endif |
.endif |
.endif |
@${MAKE} ${.MAKEFLAGS} ${.TARGET:S/^real-/pre-/} |
@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} ${.TARGET:S/^real-/pre-/} |
@if [ -f ${SCRIPTDIR}/${.TARGET:S/^real-/pre-/} ]; then \ |
@if [ -f ${SCRIPTDIR}/${.TARGET:S/^real-/pre-/} ]; then \ |
${SETENV} CURDIR=${.CURDIR} DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} \ |
cd ${.CURDIR} && ${SETENV} CURDIR=${.CURDIR} DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} \ |
WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \ |
WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \ |
FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \ |
FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \ |
DEPENDS="${DEPENDS}" X11BASE=${X11BASE} \ |
DEPENDS="${DEPENDS}" X11BASE=${X11BASE} \ |
/bin/sh ${SCRIPTDIR}/${.TARGET:S/^real-/pre-/}; \ |
/bin/sh ${SCRIPTDIR}/${.TARGET:S/^real-/pre-/}; \ |
fi |
fi |
@${MAKE} ${.MAKEFLAGS} ${.TARGET:S/^real-/do-/} |
@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} ${.TARGET:S/^real-/do-/} |
@${MAKE} ${.MAKEFLAGS} ${.TARGET:S/^real-/post-/} |
@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} ${.TARGET:S/^real-/post-/} |
@if [ -f ${SCRIPTDIR}/${.TARGET:S/^real-/post-/} ]; then \ |
@if [ -f ${SCRIPTDIR}/${.TARGET:S/^real-/post-/} ]; then \ |
${SETENV} CURDIR=${.CURDIR} DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} \ |
cd ${.CURDIR} && ${SETENV} CURDIR=${.CURDIR} DISTDIR=${DISTDIR}\ |
WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \ |
WRKDIR=${WRKDIR} WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} \ |
FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \ |
SCRIPTDIR=${SCRIPTDIR} FILESDIR=${FILESDIR} \ |
DEPENDS="${DEPENDS}" X11BASE=${X11BASE} \ |
PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} DEPENDS="${DEPENDS}" \ |
|
X11BASE=${X11BASE} \ |
/bin/sh ${SCRIPTDIR}/${.TARGET:S/^real-/post-/}; \ |
/bin/sh ${SCRIPTDIR}/${.TARGET:S/^real-/post-/}; \ |
fi |
fi |
.if make(real-install) |
.if make(real-install) && !defined(NO_PKG_REGISTER) |
@${MAKE} ${.MAKEFLAGS} fake-pkg |
@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} fake-pkg |
.endif |
.endif |
.if !make(real-fetch) \ |
.if !make(real-fetch) \ |
&& (!make(real-patch) || !defined(PATCH_CHECK_ONLY)) \ |
&& (!make(real-patch) || !defined(PATCH_CHECK_ONLY)) \ |
|
|
|
|
.if !target(fetch) |
.if !target(fetch) |
fetch: |
fetch: |
@${MAKE} ${.MAKEFLAGS} real-fetch |
@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} real-fetch |
.endif |
.endif |
|
|
.if !target(extract) |
.if !target(extract) |
|
|
.endif |
.endif |
|
|
${EXTRACT_COOKIE}: |
${EXTRACT_COOKIE}: |
@${MAKE} ${.MAKEFLAGS} real-extract |
@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} real-extract |
${PATCH_COOKIE}: |
${PATCH_COOKIE}: |
@${MAKE} ${.MAKEFLAGS} real-patch |
@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} real-patch |
${CONFIGURE_COOKIE}: |
${CONFIGURE_COOKIE}: |
@${MAKE} ${.MAKEFLAGS} real-configure |
@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} real-configure |
${BUILD_COOKIE}: |
${BUILD_COOKIE}: |
@${MAKE} ${.MAKEFLAGS} real-build |
@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} real-build |
${INSTALL_COOKIE}: |
${INSTALL_COOKIE}: |
@${MAKE} ${.MAKEFLAGS} real-install |
@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} real-install |
${PACKAGE_COOKIE}: |
${PACKAGE_COOKIE}: |
@${MAKE} ${.MAKEFLAGS} real-package |
@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} real-package |
|
|
# And call the macros |
# And call the macros |
|
|
|
|
|
|
.if !target(checkpatch) |
.if !target(checkpatch) |
checkpatch: |
checkpatch: |
@${MAKE} PATCH_CHECK_ONLY=yes ${.MAKEFLAGS} patch |
@cd ${.CURDIR} && ${MAKE} PATCH_CHECK_ONLY=yes ${.MAKEFLAGS} patch |
.endif |
.endif |
|
|
# Reinstall |
# Reinstall |
|
|
.if !target(clean) |
.if !target(clean) |
clean: pre-clean |
clean: pre-clean |
@${ECHO_MSG} "===> Cleaning for ${PKGNAME}" |
@${ECHO_MSG} "===> Cleaning for ${PKGNAME}" |
@${RM} -f ${EXTRACT_COOKIE} ${CONFIGURE_COOKIE} ${INSTALL_COOKIE} \ |
.if !defined(NO_WRKDIR) |
${BUILD_COOKIE} ${PATCH_COOKIE} |
|
.if defined(NO_WRKDIR) |
|
@${RM} -f ${WRKDIR}/.*_done |
|
.else |
|
@${RM} -rf ${WRKDIR} |
@${RM} -rf ${WRKDIR} |
|
.else |
|
@${RM} -f ${WRKDIR}/.*_done |
.endif |
.endif |
.endif |
.endif |
|
|
|
|
for file in ${DISTFILES}; do \ |
for file in ${DISTFILES}; do \ |
if [ ! -f $$file -a ! -f `${BASENAME} $$file` ]; then \ |
if [ ! -f $$file -a ! -f `${BASENAME} $$file` ]; then \ |
for site in ${MASTER_SITES}; do \ |
for site in ${MASTER_SITES}; do \ |
${ECHO} -n ${NCFTP} ${NCFTPFLAGS} $${site}$${file} "${NCFTPTAIL}" '||' ; \ |
${ECHO} -n ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${site}$${file} "${FETCH_AFTER_ARGS}" '||' ; \ |
break; \ |
break; \ |
done; \ |
done; \ |
${ECHO} "echo $${file} not fetched" ; \ |
${ECHO} "echo $${file} not fetched" ; \ |
|
|
for file in ${PATCHFILES}; do \ |
for file in ${PATCHFILES}; do \ |
if [ ! -f $$file -a ! -f `${BASENAME} $$file` ]; then \ |
if [ ! -f $$file -a ! -f `${BASENAME} $$file` ]; then \ |
for site in ${PATCH_SITES}; do \ |
for site in ${PATCH_SITES}; do \ |
${ECHO} -n ${NCFTP} ${NCFTPFLAGS} $${site}$${file} "${NCFTPTAIL}" '||' ; \ |
${ECHO} -n ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${site}$${file} "${FETCH_AFTER_ARGS}" '||' ; \ |
break; \ |
break; \ |
done; \ |
done; \ |
${ECHO} "echo $${file} not fetched" ; \ |
${ECHO} "echo $${file} not fetched" ; \ |
|
|
else \ |
else \ |
(cd ${DISTDIR}; OK=""; \ |
(cd ${DISTDIR}; OK=""; \ |
for file in ${DISTFILES} ${PATCHFILES}; do \ |
for file in ${DISTFILES} ${PATCHFILES}; do \ |
CKSUM=`${MD5} $$file | ${AWK} '{print $$4}'`; \ |
CKSUM=`${MD5} < $$file`; \ |
CKSUM2=`${GREP} "($$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \ |
CKSUM2=`${GREP} "($$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \ |
if [ "$$CKSUM2" = "" ]; then \ |
if [ "$$CKSUM2" = "" ]; then \ |
${ECHO_MSG} ">> No checksum recorded for $$file"; \ |
${ECHO_MSG} ">> No checksum recorded for $$file"; \ |
|
|
|
|
.if !target(package-noinstall) |
.if !target(package-noinstall) |
package-noinstall: |
package-noinstall: |
@${MAKE} ${.MAKEFLAGS} PACKAGE_NOINSTALL=yes real-package |
@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} PACKAGE_NOINSTALL=yes real-package |
.endif |
.endif |
|
|
################################################################ |
################################################################ |
|
|
|
|
.if !target(depends) |
.if !target(depends) |
depends: lib-depends misc-depends |
depends: lib-depends misc-depends |
@${MAKE} ${.MAKEFLAGS} fetch-depends |
@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} fetch-depends |
@${MAKE} ${.MAKEFLAGS} build-depends |
@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} build-depends |
@${MAKE} ${.MAKEFLAGS} run-depends |
@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} run-depends |
|
|
.if make(fetch-depends) |
.if make(fetch-depends) |
DEPENDS_TMP+= ${FETCH_DEPENDS} |
DEPENDS_TMP+= ${FETCH_DEPENDS} |
|
|
# |
# |
.if !target(describe) |
.if !target(describe) |
describe: |
describe: |
@${ECHO} -n "${PKGNAME}|${.CURDIR}/${PKGNAME}|" |
@${ECHO} -n "${PKGNAME}|${.CURDIR}|" |
@${ECHO} -n "${PREFIX}|" |
@${ECHO} -n "${PREFIX}|" |
@if [ -f ${PKGDIR}/COMMENT ]; then \ |
@if [ -f ${PKGDIR}/COMMENT ]; then \ |
${ECHO} -n "`${CAT} ${PKGDIR}/COMMENT`"; \ |
${ECHO} -n "`${CAT} ${PKGDIR}/COMMENT`"; \ |
|
|
${ECHO} -n "|/dev/null"; \ |
${ECHO} -n "|/dev/null"; \ |
fi |
fi |
@${ECHO} -n "|${MAINTAINER}|${CATEGORIES}|" |
@${ECHO} -n "|${MAINTAINER}|${CATEGORIES}|" |
@${ECHO} -n `make depends-list|sort|uniq` |
@cd ${.CURDIR} && ${ECHO} -n `make depends-list|sort|uniq` |
@${ECHO} -n "|" |
@${ECHO} -n "|" |
@${ECHO} -n `make package-depends|sort|uniq` |
@cd ${.CURDIR} && ${ECHO} -n `make package-depends|sort|uniq` |
@${ECHO} "" |
@${ECHO} "" |
.endif |
.endif |
|
|
|
|
.if !target(readme) |
.if !target(readme) |
readme: |
readme: |
@rm -f README.html |
@rm -f README.html |
@make README.html |
@cd ${.CURDIR} && make README.html |
.endif |
.endif |
|
|
README.html: |
README.html: |