version 1.9, 1996/12/25 20:10:09 |
version 1.10, 1997/01/11 11:58:11 |
|
|
# |
# |
# Variables that typically apply to all ports: |
# Variables that typically apply to all ports: |
# |
# |
|
# ONLY_FOR_ARCHS- If a port only makes sense to certain architectures, this |
|
# is a list containing the names for them. It is checked |
|
# against the predefined ${MACHINE} value |
# OPSYS - Portability clause. This is the operating system the |
# OPSYS - Portability clause. This is the operating system the |
# makefile is being used on. Automatically set to |
# makefile is being used on. Automatically set to |
# "FreeBSD," "NetBSD," or "OpenBSD" as appropriate. |
# "FreeBSD," "NetBSD," or "OpenBSD" as appropriate. |
|
|
# NEVER override the "regular" targets unless you want to open |
# NEVER override the "regular" targets unless you want to open |
# a major can of worms. |
# a major can of worms. |
|
|
|
.if defined(ONLY_FOR_ARCHS) |
|
.for __ARCH in ${ONLY_FOR_ARCHS} |
|
.if ${MACHINE} == "${__ARCH}" |
|
__ARCH_OK= 1 |
|
.endif |
|
.endfor |
|
.else |
|
__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}." |
|
.else |
|
|
# Get the operating system type |
# Get the operating system type |
OPSYS!= uname -s |
OPSYS!= uname -s |
|
|
|
|
.endif |
.endif |
|
|
.if (${OPSYS} == "OpenBSD") |
.if (${OPSYS} == "OpenBSD") |
NOMANCOMPRESS?=yes |
NOMANCOMPRESS?= yes |
.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 |
|
|
PACKAGES?= ${PORTSDIR}/packages |
PACKAGES?= ${PORTSDIR}/packages |
TEMPLATES?= ${PORTSDIR}/templates |
TEMPLATES?= ${PORTSDIR}/templates |
.if !defined(NO_WRKDIR) |
.if !defined(NO_WRKDIR) |
|
.if defined(OBJMACHINE) |
|
WRKDIR?= ${.CURDIR}/work.${MACHINE} |
|
.else |
WRKDIR?= ${.CURDIR}/work |
WRKDIR?= ${.CURDIR}/work |
|
.endif |
.else |
.else |
WRKDIR?= ${.CURDIR} |
WRKDIR?= ${.CURDIR} |
.endif |
.endif |
|
|
NO_MTREE= yes |
NO_MTREE= yes |
.endif |
.endif |
|
|
|
.if (${OPSYS} == "OpenBSD") |
|
.include <bsd.own.mk> |
|
MAKE_ENV+= EXTRA_SYS_MK_INCLUDES="<bsd.own.mk>" |
|
.endif |
|
|
# A few aliases for *-install targets |
# A few aliases for *-install targets |
INSTALL_PROGRAM= \ |
INSTALL_PROGRAM= \ |
${INSTALL} ${COPY} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} |
${INSTALL} ${COPY} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} |
|
|
@${MKDIR} ${WRKDIR} |
@${MKDIR} ${WRKDIR} |
.endif |
.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 \ |
|
|
# Same goes for tags |
# Same goes for tags |
.if !target(tags) |
.if !target(tags) |
tags: |
tags: |
|
.endif |
|
|
.endif |
.endif |