bsd.port.mk revision 8128
1#-*- mode: Fundamental; tab-width: 4; -*- 2# 3# bsd.port.mk - 940820 Jordan K. Hubbard. 4# This file is in the public domain. 5# 6# $Id: bsd.port.mk,v 1.150 1995/04/24 10:41:51 asami Exp $ 7# 8# Please view me with 4 column tabs! 9 10 11# Supported Variables and their behaviors: 12# 13# Variables that typically apply to all ports: 14# 15# PORTSDIR - The root of the ports tree (default: /usr/ports). 16# DISTDIR - Where to get gzip'd, tarballed copies of original sources 17# (default: ${PORTSDIR}/distfiles). 18# PREFIX - Where to install things in general (default: /usr/local). 19# MASTER_SITES - Primary location(s) for distribution files if not found 20# locally (default: 21# ftp://ftp.freebsd.org/pub/FreeBSD/ports/distfiles) 22# PATCH_SITES - Primary location(s) for distributed patch files 23# (see PATCHFILES below) if not found locally (default: 24# ftp://ftp.freebsd.org/pub/FreeBSD/ports/distfiles) 25# 26# MASTER_SITE_OVERRIDE - If set, override the MASTER_SITES setting with this 27# value. 28# MASTER_SITE_FREEBSD - If set, only use the FreeBSD master repository for 29# MASTER_SITES. 30# PACKAGES - A top level directory where all packages go (rather than 31# going locally to each port). (default: ${PORTSDIR}/packages). 32# GMAKE - Set to path of GNU make if not in $PATH (default: gmake). 33# XMKMF - Set to path of `xmkmf' if not in $PATH (default: xmkmf -a ). 34# MAINTAINER - The e-mail address of the contact person for this port 35# (default: ports@FreeBSD.ORG). 36# CATEGORIES - A list of descriptive categories into which this port falls 37# (default: orphans). 38# KEYWORDS - A list of descriptive keywords that might index well for this 39# port (default: orphans). 40# 41# Variables that typically apply to an individual port. Non-Boolean 42# variables without defaults are *mandatory*. 43# 44# 45# WRKDIR - A temporary working directory that gets *clobbered* on clean 46# (default: ${.CURDIR}/work). 47# WRKSRC - A subdirectory of ${WRKDIR} where the distribution actually 48# unpacks to. (Default: ${WRKDIR}/${DISTNAME} unless 49# NO_WRKSUBDIR is set, in which case simply ${WRKDIR}). 50# DISTNAME - Name of port or distribution. 51# DISTFILES - Name(s) of archive file(s) containing distribution 52# (default: ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}). 53# PATCHFILES - Name(s) of additional files that contain distributed 54# patches (default: none). make will look for them at 55# PATCH_SITES (see above). They will automatically be 56# uncompressed before patching if the names end with 57# ".gz" or ".Z". 58# PKGNAME - Name of the package file to create if the DISTNAME 59# isn't really relevant for the port/package 60# (default: ${DISTNAME}). 61# EXTRACT_ONLY - If defined, a subset of ${DISTFILES} you want to 62# actually extract. 63# PATCHDIR - A directory containing any additional patches you made 64# to port this software to FreeBSD (default: 65# ${.CURDIR}/patches) 66# SCRIPTDIR - A directory containing any auxiliary scripts 67# (default: ${.CURDIR}/scripts) 68# FILESDIR - A directory containing any miscellaneous additional files. 69# (default: ${.CURDIR}/files) 70# PKGDIR - A direction containing any package creation files. 71# (default: ${.CURDIR}/pkg) 72# PKG_DBDIR - Where package installation is recorded (default: /var/db/pkg) 73# 74# NO_EXTRACT - Use a dummy (do-nothing) extract target. 75# NO_CONFIGURE - Use a dummy (do-nothing) configure target. 76# NO_BUILD - Use a dummy (do-nothing) build target. 77# NO_PACKAGE - Use a dummy (do-nothing) package target. 78# NO_INSTALL - Use a dummy (do-nothing) install target. 79# NO_WRKSUBDIR - Assume port unpacks directly into ${WRKDIR}. 80# NO_WRKDIR - There's no work directory at all; port does this someplace 81# else. 82# NO_DEPENDS - Don't verify build of dependencies. 83# USE_GMAKE - Says that the port uses gmake. 84# USE_IMAKE - Says that the port uses imake. 85# USE_X11 - Says that the port uses X11. 86# NO_INSTALL_MANPAGES - For imake ports that don't like the install.man 87# target. 88# HAS_CONFIGURE - Says that the port has its own configure script. 89# GNU_CONFIGURE - Set if you are using GNU configure (optional). 90# CONFIGURE_SCRIPT - Name of configure script, defaults to 'configure'. 91# CONFIGURE_ARGS - Pass these args to configure, if ${HAS_CONFIGURE} set. 92# IS_INTERACTIVE - Set this if your port needs to interact with the user 93# during a build. User can then decide to skip this port by 94# setting ${BATCH}, or compiling only the interactive ports 95# by setting ${INTERACTIVE}. 96# EXEC_DEPENDS - A list of "prog:dir" pairs of other ports this 97# package depends on. "prog" is the name of an 98# executable. make will search your $PATH for it and go 99# into "dir" to do a "make all install" if it's not found. 100# LIB_DEPENDS - A list of "lib:dir" pairs of other ports this package 101# depends on. "lib" is the name of a shared library. 102# make will use "ldconfig -r" to search for the 103# library. Note that lib can be any regular expression, 104# and you need two backslashes in front of dots (.) to 105# supress its special meaning (e.g., use 106# "foo\\.2\\.:${PORTSDIR}/utils/foo" to match "libfoo.2.*"). 107# DEPENDS - A list of other ports this package depends on being 108# made first. Use this for things that don't fall into 109# the above two categories. 110# EXTRACT_CMD - Command for extracting archive (default: tar). 111# EXTRACT_SUFX - Suffix for archive names (default: .tar.gz). 112# EXTRACT_BEFORE_ARGS - 113# Arguments to ${EXTRACT_CMD} before filename 114# (default: -C ${WRKDIR} -xzf). 115# EXTRACT_AFTER_ARGS - 116# Arguments to ${EXTRACT_CMD} following filename 117# (default: none). 118# 119# NCFTP - Full path to ncftp command if not in $PATH (default: ncftp). 120# NCFTPFLAGS - Arguments to ${NCFTP} (default: -N). 121# 122# 123# Default targets and their behaviors: 124# 125# fetch - Retrieves ${DISTFILES} (and ${PATCHFILES} if defined) 126# into ${DISTDIR} as necessary. 127# fetch-list - Show list of files that would be retrieved by fetch 128# extract - Unpacks ${DISTFILES} into ${WRKDIR}. 129# patch - Apply any provided patches to the source. 130# configure - Runs either GNU configure, one or more local configure 131# scripts or nothing, depending on what's available. 132# build - Actually compile the sources. 133# install - Install the results of a build. 134# reinstall - Install the results of a build, ignoring "already installed" 135# flag. 136# package - Create a package from an _installed_ port. 137# describe - Try to generate a one-line description for each port for 138# use in INDEX files and the like. 139# checksum - Use files/md5 to ensure that your distfiles are valid 140# makesum - Generate files/md5 (only do this for your own ports!) 141# 142# Default sequence for "all" is: fetch checksum extract patch configure build 143# 144# Please read the comments in the targets section below, you 145# should be able to use the pre-* or post-* targets/scripts 146# (which are available for every stage except checksum) or 147# override the do-* targets to do pretty much anything you want. 148# 149# NEVER override the "regular" targets unless you want to open 150# a major can of worms. 151 152.if exists(${.CURDIR}/../Makefile.inc) 153.include "${.CURDIR}/../Makefile.inc" 154.endif 155 156# These need to be absolute since we don't know how deep in the ports 157# tree we are and thus can't go relative. They can, of course, be overridden 158# by individual Makefiles. 159PORTSDIR?= ${DESTDIR}/usr/ports 160X11BASE?= /usr/X11R6 161DISTDIR?= ${PORTSDIR}/distfiles 162PACKAGES?= ${PORTSDIR}/packages 163.if !defined(NO_WRKDIR) 164WRKDIR?= ${.CURDIR}/work 165.else 166WRKDIR?= ${.CURDIR} 167.endif 168.if defined(NO_WRKSUBDIR) 169WRKSRC?= ${WRKDIR} 170.else 171WRKSRC?= ${WRKDIR}/${DISTNAME} 172.endif 173PATCHDIR?= ${.CURDIR}/patches 174SCRIPTDIR?= ${.CURDIR}/scripts 175FILESDIR?= ${.CURDIR}/files 176PKGDIR?= ${.CURDIR}/pkg 177.if defined(USE_IMAKE) || defined(USE_X11) 178PREFIX?= ${X11BASE} 179.else 180PREFIX?= /usr/local 181.endif 182.if defined(USE_GMAKE) 183EXEC_DEPENDS+= gmake:${PORTSDIR}/devel/gmake 184.endif 185 186.if exists(${PORTSDIR}/../Makefile.inc) 187.include "${PORTSDIR}/../Makefile.inc" 188.endif 189 190# Change these if you'd prefer to keep the cookies someplace else. 191EXTRACT_COOKIE?= ${WRKDIR}/.extract_done 192CONFIGURE_COOKIE?= ${WRKDIR}/.configure_done 193INSTALL_COOKIE?= ${WRKDIR}/.install_done 194BUILD_COOKIE?= ${WRKDIR}/.build_done 195PATCH_COOKIE?= ${WRKDIR}/.patch_done 196 197# How to do nothing. Override if you, for some strange reason, would rather 198# do something. 199DO_NADA?= echo -n 200 201# Miscellaneous overridable commands: 202GMAKE?= gmake 203XMKMF?= xmkmf -a 204MD5?= /sbin/md5 205MD5_FILE?= ${FILESDIR}/md5 206MAKE_FLAGS?= -f 207MAKEFILE?= Makefile 208 209NCFTP?= ncftp 210NCFTPFLAGS?= -N 211 212TOUCH?= touch 213TOUCH_FLAGS?= -f 214 215PATCH?= patch 216PATCH_STRIP?= -p0 217PATCH_DIST_STRIP?= -p0 218.if defined(PATCH_DEBUG) 219PATCH_ARGS?= -d ${WRKSRC} -E ${PATCH_STRIP} 220PATCH_DIST_ARGS?= -d ${WRKSRC} -E ${PATCH_DIST_STRIP} 221.else 222PATCH_ARGS?= -d ${WRKSRC} --forward --quiet -E ${PATCH_STRIP} 223PATCH_DIST_ARGS?= -d ${WRKSRC} --forward --quiet -E ${PATCH_DIST_STRIP} 224.endif 225 226EXTRACT_CMD?= tar 227EXTRACT_SUFX?= .tar.gz 228# Backwards compatability. 229.if defined(EXTRACT_ARGS) 230EXTRACT_BEFORE_ARGS?= ${EXTRACT_ARGS} 231.else 232EXTRACT_BEFORE_ARGS?= -xzf 233.endif 234 235# Figure out where the local mtree file is 236.if !defined(MTREE_LOCAL) && exists(/etc/mtree/BSD.local.dist) 237MTREE_LOCAL= /etc/mtree/BSD.local.dist 238.endif 239 240PKG_CMD?= pkg_create 241.if !defined(PKG_ARGS) 242PKG_ARGS= -v -c ${PKGDIR}/COMMENT -d ${PKGDIR}/DESCR -f ${PKGDIR}/PLIST -p ${PREFIX} -P "`${MAKE} package-depends|sort|uniq`" 243.if exists(${PKGDIR}/INSTALL) 244PKG_ARGS+= -i ${PKGDIR}/INSTALL 245.endif 246.if exists(${PKGDIR}/DEINSTALL) 247PKG_ARGS+= -k ${PKGDIR}/DEINSTALL 248.endif 249.if exists(${PKGDIR}/REQ) 250PKG_ARGS+= -r ${PKGDIR}/REQ 251.endif 252.if !defined(USE_X11) && !defined(USE_IMAKE) && defined(MTREE_LOCAL) 253PKG_ARGS+= -m ${MTREE_LOCAL} 254.endif 255.endif 256PKG_SUFX?= .tgz 257# where pkg_add records its dirty deeds. 258PKG_DBDIR?= /var/db/pkg 259 260# Used to print all the '===>' style prompts - override this to turn them off. 261ECHO_MSG?= echo 262 263ALL_TARGET?= all 264INSTALL_TARGET?= install 265 266# If the user has this set, go to the FreeBSD respository for everything. 267.if defined(MASTER_SITE_FREEBSD) 268MASTER_SITE_OVERRIDE= ftp://freebsd.cdrom.com/pub/FreeBSD/FreeBSD-current/ports/distfiles/ 269.endif 270 271# I guess we're in the master distribution business! :) As we gain mirror 272# sites for distfiles, add them to this list. 273.if !defined(MASTER_SITE_OVERRIDE) 274MASTER_SITES+= ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/ports/distfiles/ 275PATCH_SITES+= ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/ports/distfiles/ 276.else 277MASTER_SITES= ${MASTER_SITE_OVERRIDE} 278PATCH_SITES= ${MASTER_SITE_OVERRIDE} 279.endif 280 281# Derived names so that they're easily overridable. 282DISTFILES?= ${DISTNAME}${EXTRACT_SUFX} 283PKGNAME?= ${DISTNAME} 284 285# Documentation 286MAINTAINER?= ports@FreeBSD.ORG 287CATEGORIES?= orphans 288CATEGORIES+= all 289KEYWORDS+= ${CATEGORIES} 290 291PKGREPOSITORYSUBDIR?= .packages 292PKGREPOSITORY?= ${PACKAGES}/${PKGREPOSITORYSUBDIR} 293.if exists(${PACKAGES}) 294PKGFILE?= ${PKGREPOSITORY}/${PKGNAME}${PKG_SUFX} 295.else 296PKGFILE?= ${PKGNAME}${PKG_SUFX} 297.endif 298 299CONFIGURE_SCRIPT?= configure 300 301.if defined(GNU_CONFIGURE) 302CONFIGURE_ARGS?= --prefix=${PREFIX} 303HAS_CONFIGURE= yes 304.endif 305 306.MAIN: all 307 308################################################################ 309# If we're in BATCH mode and the port is interactive, or we're 310# in interactive mode and the port is non-interactive, skip all 311# the important targets. The reason we have two modes is that 312# one might want to leave a build in BATCH mode running 313# overnight, then come back in the morning and do _only_ the 314# interactive ones that required your intervention. 315# 316# This allows you to do both. 317################################################################ 318 319.if (defined(IS_INTERACTIVE) && defined(BATCH)) || (!defined(IS_INTERACTIVE) && defined(INTERACTIVE)) 320all: 321 @${DO_NADA} 322build: 323 @${DO_NADA} 324install: 325 @${DO_NADA} 326fetch: 327 @${DO_NADA} 328configure: 329 @${DO_NADA} 330package: 331 @${DO_NADA} 332.endif 333 334.if !target(all) 335all: build 336.endif 337 338.if !target(is_depended) 339is_depended: install 340.endif 341 342################################################################ 343# The following are used to create easy dummy targets for 344# disabling some bit of default target behavior you don't want. 345# They still check to see if the target exists, and if so don't 346# do anything, since you might want to set this globally for a 347# group of ports in a Makefile.inc, but still be able to 348# override from an individual Makefile (since you can't _ 349# undefine_ a variable in make!). 350################################################################ 351 352.if defined(NO_EXTRACT) && !target(extract) 353extract: checksum 354 @${TOUCH} ${TOUCH_FLAGS} ${EXTRACT_COOKIE} 355checksum: fetch 356 @${DO_NADA} 357makesum: 358 @${DO_NADA} 359.endif 360.if defined(NO_CONFIGURE) && !target(configure) 361configure: patch 362 @${TOUCH} ${TOUCH_FLAGS} ${CONFIGURE_COOKIE} 363.endif 364.if defined(NO_BUILD) && !target(build) 365build: configure 366 @${TOUCH} ${TOUCH_FLAGS} ${BUILD_COOKIE} 367.endif 368.if defined(NO_PACKAGE) && !target(package) 369package: install 370 @${DO_NADA} 371.endif 372.if defined(NO_PACKAGE) && !target(repackage) 373repackage: install 374 @${DO_NADA} 375.endif 376.if defined(NO_INSTALL) && !target(install) 377install: build 378 @${TOUCH} ${TOUCH_FLAGS} ${INSTALL_COOKIE} 379.endif 380.if defined(NO_PATCH) && !target(patch) 381patch: extract 382 @${TOUCH} ${TOUCH_FLAGS} ${PATCH_COOKIE} 383.endif 384 385################################################################ 386# More standard targets start here. 387# 388# These are the body of the build/install framework. If you are 389# not happy with the default actions, and you can't solve it by 390# adding pre-* or post-* targets/scripts, override these. 391################################################################ 392 393# Fetch 394 395.if !target(do-fetch) 396do-fetch: 397 @if [ ! -d ${DISTDIR} ]; then mkdir -p ${DISTDIR}; fi 398 @(cd ${DISTDIR}; \ 399 for file in ${DISTFILES}; do \ 400 if [ ! -f $$file -a ! -f `basename $$file` ]; then \ 401 ${ECHO_MSG} ">> $$file doesn't seem to exist on this system."; \ 402 for site in ${MASTER_SITES}; do \ 403 ${ECHO_MSG} ">> Attempting to fetch from $${site}"; \ 404 if ${NCFTP} ${NCFTPFLAGS} $${site}$${file}; then \ 405 break; \ 406 fi \ 407 done; \ 408 if [ ! -f $$file -a ! -f `basename $$file` ]; then \ 409 ${ECHO_MSG} ">> Couldn't fetch it - please try to retreive this";\ 410 ${ECHO_MSG} ">> port manually into ${DISTDIR} and try again."; \ 411 exit 1; \ 412 fi; \ 413 fi \ 414 done) 415.if defined(PATCHFILES) 416 @(cd ${DISTDIR}; \ 417 for file in ${PATCHFILES}; do \ 418 if [ ! -f $$file -a ! -f `basename $$file` ]; then \ 419 ${ECHO_MSG} ">> $$file doesn't seem to exist on this system."; \ 420 for site in ${PATCH_SITES}; do \ 421 ${ECHO_MSG} ">> Attempting to fetch from $${site}."; \ 422 if ${NCFTP} ${NCFTPFLAGS} $${site}$${file}; then \ 423 break; \ 424 fi \ 425 done; \ 426 if [ ! -f $$file -a ! -f `basename $$file` ]; then \ 427 ${ECHO_MSG} ">> Couldn't fetch it - please try to retreive this";\ 428 ${ECHO_MSG} ">> port manually into ${DISTDIR} and try again."; \ 429 exit 1; \ 430 fi; \ 431 fi \ 432 done) 433.endif 434.endif 435 436# Extract 437 438.if !target(do-extract) 439do-extract: 440 @rm -rf ${WRKDIR} 441 @mkdir -p ${WRKDIR} 442.if defined(EXTRACT_ONLY) 443 @for file in ${EXTRACT_ONLY}; do \ 444 if ! (cd ${WRKDIR};${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\ 445 then \ 446 exit 1; \ 447 fi \ 448 done 449.else 450 @for file in ${DISTFILES}; do \ 451 if ! (cd ${WRKDIR};${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\ 452 then \ 453 exit 1; \ 454 fi \ 455 done 456.endif 457.endif 458 459# Patch 460 461.if !target(do-patch) 462do-patch: 463.if defined(PATCHFILES) 464 @${ECHO_MSG} "===> Applying distributed patches for ${PKGNAME}" 465.if defined(PATCH_DEBUG) 466 @(cd ${DISTDIR}; \ 467 for i in ${PATCHFILES}; do \ 468 ${ECHO_MSG} "===> Applying distributed patch $$i" ; \ 469 case $$i in \ 470 *.Z|*.gz) \ 471 zcat $$i | ${PATCH} ${PATCH_DIST_ARGS}; \ 472 ;; \ 473 *) \ 474 ${PATCH} ${PATCH_DIST_ARGS} < $$i; \ 475 ;; \ 476 esac; \ 477 done) 478.else 479 @(cd ${DISTDIR}; \ 480 for i in ${PATCHFILES}; do \ 481 case $$i in \ 482 *.Z|*.gz) \ 483 zcat $$i | ${PATCH} ${PATCH_DIST_ARGS}; \ 484 ;; \ 485 *) \ 486 ${PATCH} ${PATCH_DIST_ARGS} < $$i; \ 487 ;; \ 488 esac; \ 489 done) 490.endif 491.endif 492.if defined(PATCH_DEBUG) 493 @if [ -d ${PATCHDIR} ]; then \ 494 ${ECHO_MSG} "===> Applying FreeBSD patches for ${PKGNAME}" ; \ 495 for i in ${PATCHDIR}/patch-*; do \ 496 ${ECHO_MSG} "===> Applying FreeBSD patch $$i" ; \ 497 ${PATCH} ${PATCH_ARGS} < $$i; \ 498 done; \ 499 fi 500 @${TOUCH} ${TOUCH_FLAGS} ${PATCH_COOKIE} 501.else 502 @if [ -d ${PATCHDIR} ]; then \ 503 ${ECHO_MSG} "===> Applying FreeBSD patches for ${PKGNAME}" ; \ 504 for i in ${PATCHDIR}/patch-*; \ 505 do ${PATCH} ${PATCH_ARGS} < $$i; \ 506 done;\ 507 fi 508 @${TOUCH} ${TOUCH_FLAGS} ${PATCH_COOKIE} 509.endif 510.endif 511 512# Configure 513 514.if !target(do-configure) 515do-configure: 516 @if [ -f ${SCRIPTDIR}/configure ]; then \ 517 env CURDIR=${.CURDIR} DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} \ 518 WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \ 519 FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \ 520 DEPENDS="${DEPENDS}" X11BASE=${X11BASE} \ 521 sh ${SCRIPTDIR}/configure; \ 522 fi 523.if defined(HAS_CONFIGURE) 524 @(cd ${WRKSRC}; CC="${CC}" ac_cv_path_CC="${CC}" CFLAGS="${CFLAGS}" \ 525 INSTALL="/usr/bin/install -c -o ${BINOWN} -g ${BINGRP}" \ 526 INSTALL_PROGRAM="/usr/bin/install ${COPY} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}" \ 527 ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}) 528.endif 529.if defined(USE_IMAKE) 530.if defined(USE_GMAKE) 531 @(cd ${WRKSRC}; ${XMKMF} && ${GMAKE} Makefiles) 532.else 533 @(cd ${WRKSRC}; ${XMKMF} && ${MAKE} Makefiles) 534.endif 535.endif 536.endif 537 538# Build 539 540.if !target(do-build) 541do-build: 542.if defined(USE_GMAKE) 543 @(cd ${WRKSRC}; ${GMAKE} PREFIX=${PREFIX} X11BASE=${X11BASE} ${MAKE_FLAGS} ${MAKEFILE} ${ALL_TARGET}) 544.else defined(USE_GMAKE) 545 @(cd ${WRKSRC}; ${MAKE} PREFIX=${PREFIX} X11BASE=${X11BASE} ${MAKE_FLAGS} ${MAKEFILE} ${ALL_TARGET}) 546.endif 547.endif 548 549# Install 550 551.if !target(do-install) 552do-install: 553.if defined(USE_GMAKE) 554 @(cd ${WRKSRC}; ${GMAKE} PREFIX=${PREFIX} X11BASE=${X11BASE} ${MAKE_FLAGS} ${MAKEFILE} ${INSTALL_TARGET}) 555.if defined(USE_IMAKE) && !defined(NO_INSTALL_MANPAGES) 556 @(cd ${WRKSRC}; ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} install.man) 557.endif 558.else defined(USE_GMAKE) 559 @(cd ${WRKSRC}; ${MAKE} PREFIX=${PREFIX} X11BASE=${X11BASE} ${MAKE_FLAGS} ${MAKEFILE} ${INSTALL_TARGET}) 560.if defined(USE_IMAKE) && !defined(NO_INSTALL_MANPAGES) 561 @(cd ${WRKSRC}; ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} install.man) 562.endif 563.endif 564.endif 565 566################################################################ 567# Skeleton targets start here 568# 569# You shouldn't have to change these. Either add the pre-* or 570# post-* targets/scripts or redefine the do-* targets. These 571# targets don't do anything other than checking for cookies and 572# call the necessary targets/scripts. 573################################################################ 574 575# Fetch 576 577.if !target(fetch) 578fetch: depends 579.if target(pre-fetch) 580 @${MAKE} ${.MAKEFLAGS} pre-fetch 581.endif 582 @if [ -f ${SCRIPTDIR}/pre-fetch ]; then \ 583 env CURDIR=${.CURDIR} DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} \ 584 WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \ 585 FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \ 586 DEPENDS="${DEPENDS}" X11BASE=${X11BASE} \ 587 sh ${SCRIPTDIR}/pre-fetch; \ 588 fi 589 @${MAKE} ${.MAKEFLAGS} do-fetch 590.if target(post-fetch) 591 @${MAKE} ${.MAKEFLAGS} post-fetch 592.endif 593 @if [ -f ${SCRIPTDIR}/post-fetch ]; then \ 594 env CURDIR=${.CURDIR} DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} \ 595 WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \ 596 FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \ 597 DEPENDS="${DEPENDS}" X11BASE=${X11BASE} \ 598 sh ${SCRIPTDIR}/post-fetch; \ 599 fi 600.endif 601 602# Extract 603 604.if !target(extract) 605extract: checksum ${EXTRACT_COOKIE} 606 607${EXTRACT_COOKIE}: 608 @${ECHO_MSG} "===> Extracting for ${PKGNAME}" 609.if target(pre-extract) 610 @${MAKE} ${.MAKEFLAGS} pre-extract 611.endif 612 @if [ -f ${SCRIPTDIR}/pre-extract ]; then \ 613 env CURDIR=${.CURDIR} DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} \ 614 WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \ 615 FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \ 616 DEPENDS="${DEPENDS}" X11BASE=${X11BASE} \ 617 sh ${SCRIPTDIR}/pre-extract; \ 618 fi 619 @${MAKE} ${.MAKEFLAGS} do-extract 620.if target(post-extract) 621 @${MAKE} ${.MAKEFLAGS} post-extract 622.endif 623 @if [ -f ${SCRIPTDIR}/post-extract ]; then \ 624 env CURDIR=${.CURDIR} DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} \ 625 WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \ 626 FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \ 627 DEPENDS="${DEPENDS}" X11BASE=${X11BASE} \ 628 sh ${SCRIPTDIR}/post-extract; \ 629 fi 630 @${TOUCH} ${TOUCH_FLAGS} ${EXTRACT_COOKIE} 631.endif 632 633# Patch 634 635.if !target(patch) 636patch: extract ${PATCH_COOKIE} 637 638${PATCH_COOKIE}: 639 @${ECHO_MSG} "===> Patching for ${PKGNAME}" 640.if target(pre-patch) 641 @${MAKE} ${.MAKEFLAGS} pre-patch 642.endif 643 @if [ -f ${SCRIPTDIR}/pre-patch ]; then \ 644 env CURDIR=${.CURDIR} DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} \ 645 WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \ 646 FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \ 647 DEPENDS="${DEPENDS}" X11BASE=${X11BASE} \ 648 sh ${SCRIPTDIR}/pre-patch; \ 649 fi 650 @${MAKE} ${.MAKEFLAGS} do-patch 651.if target(post-patch) 652 @${MAKE} ${.MAKEFLAGS} post-patch 653.endif 654 @if [ -f ${SCRIPTDIR}/post-patch ]; then \ 655 env CURDIR=${.CURDIR} DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} \ 656 WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \ 657 FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \ 658 DEPENDS="${DEPENDS}" X11BASE=${X11BASE} \ 659 sh ${SCRIPTDIR}/post-patch; \ 660 fi 661 @${TOUCH} ${TOUCH_FLAGS} ${PATCH_COOKIE} 662.endif 663 664# Configure 665 666.if !target(configure) 667configure: patch ${CONFIGURE_COOKIE} 668 669${CONFIGURE_COOKIE}: 670 @${ECHO_MSG} "===> Configuring for ${PKGNAME}" 671.if target(pre-configure) 672 @${MAKE} ${.MAKEFLAGS} pre-configure 673.endif 674 @if [ -f ${SCRIPTDIR}/pre-configure ]; then \ 675 env CURDIR=${.CURDIR} DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} \ 676 WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \ 677 FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \ 678 DEPENDS="${DEPENDS}" X11BASE=${X11BASE} \ 679 sh ${SCRIPTDIR}/pre-configure; \ 680 fi 681 @${MAKE} ${.MAKEFLAGS} do-configure 682.if target(post-configure) 683 @${MAKE} ${.MAKEFLAGS} post-configure 684.endif 685 @if [ -f ${SCRIPTDIR}/post-configure ]; then \ 686 env CURDIR=${.CURDIR} DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} \ 687 WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \ 688 FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \ 689 DEPENDS="${DEPENDS}" X11BASE=${X11BASE} \ 690 sh ${SCRIPTDIR}/post-configure; \ 691 fi 692 @${TOUCH} ${TOUCH_FLAGS} ${CONFIGURE_COOKIE} 693.endif 694 695# Build 696 697.if !target(build) 698build: configure ${BUILD_COOKIE} 699 700${BUILD_COOKIE}: 701 @${ECHO_MSG} "===> Building for ${PKGNAME}" 702.if target(pre-build) 703 @${MAKE} ${.MAKEFLAGS} pre-build 704.endif 705 @if [ -f ${SCRIPTDIR}/pre-build ]; then \ 706 env CURDIR=${.CURDIR} DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} \ 707 WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \ 708 FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \ 709 DEPENDS="${DEPENDS}" X11BASE=${X11BASE} \ 710 sh ${SCRIPTDIR}/pre-build; \ 711 fi 712 @${MAKE} ${.MAKEFLAGS} do-build 713.if target(post-build) 714 @${MAKE} ${.MAKEFLAGS} post-build 715.endif 716 @if [ -f ${SCRIPTDIR}/post-build ]; then \ 717 env CURDIR=${.CURDIR} DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} \ 718 WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \ 719 FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \ 720 DEPENDS="${DEPENDS}" X11BASE=${X11BASE} \ 721 sh ${SCRIPTDIR}/post-build; \ 722 fi 723 @${TOUCH} ${TOUCH_FLAGS} ${BUILD_COOKIE} 724.endif 725 726# Install 727 728.if !target(install) 729install: build ${INSTALL_COOKIE} 730 731${INSTALL_COOKIE}: 732 @${ECHO_MSG} "===> Installing for ${PKGNAME}" 733.if target(pre-install) 734 @${MAKE} ${.MAKEFLAGS} pre-install 735.endif 736 @if [ -f ${SCRIPTDIR}/pre-install ]; then \ 737 env CURDIR=${.CURDIR} DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} \ 738 WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \ 739 FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \ 740 DEPENDS="${DEPENDS}" X11BASE=${X11BASE} \ 741 sh ${SCRIPTDIR}/pre-install; \ 742 fi 743 @${MAKE} ${.MAKEFLAGS} do-install 744.if target(post-install) 745 @${MAKE} ${.MAKEFLAGS} post-install 746.endif 747 @if [ -f ${SCRIPTDIR}/post-install ]; then \ 748 env CURDIR=${.CURDIR} DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} \ 749 WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \ 750 FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} PREFIX=${PREFIX} \ 751 DEPENDS="${DEPENDS}" X11BASE=${X11BASE} \ 752 sh ${SCRIPTDIR}/post-install; \ 753 fi 754.if !defined(NO_PACKAGE) 755 @${MAKE} ${.MAKEFLAGS} fake-pkg 756.endif 757 @${TOUCH} ${TOUCH_FLAGS} ${INSTALL_COOKIE} 758.endif 759 760# Reinstall 761# 762# This is a special target to re-run install 763 764.if !target(reinstall) 765reinstall: pre-reinstall install 766 767pre-reinstall: 768 @rm -f ${INSTALL_COOKIE} 769.endif 770 771################################################################ 772# Some more targets supplied for users' convenience 773################################################################ 774 775# Cleaning up 776 777.if !target(pre-clean) 778pre-clean: 779 @${DO_NADA} 780.endif 781 782.if !target(clean) 783clean: pre-clean 784 @${ECHO_MSG} "===> Cleaning for ${PKGNAME}" 785 @rm -f ${EXTRACT_COOKIE} ${CONFIGURE_COOKIE} ${INSTALL_COOKIE} \ 786 ${BUILD_COOKIE} ${PATCH_COOKIE} 787.if defined(NO_WRKDIR) 788 @rm -f ${WRKDIR}/.*_done 789.else 790 @rm -rf ${WRKDIR} 791.endif 792.endif 793 794# Prints out a list of files to fetch (useful to do a batch fetch) 795 796.if !target(fetch-list) 797fetch-list: 798 @if [ ! -d ${DISTDIR} ]; then mkdir -p ${DISTDIR}; fi 799 @(cd ${DISTDIR}; \ 800 for file in ${DISTFILES}; do \ 801 if [ ! -f $$file -a ! -f `basename $$file` ]; then \ 802 for site in ${MASTER_SITES}; do \ 803 echo -n ${NCFTP} ${NCFTPFLAGS} $${site}$${file} '||' ; \ 804 break; \ 805 done; \ 806 echo "echo $${file} not fetched" ; \ 807 fi \ 808 done) 809.if defined(PATCHFILES) 810 @(cd ${DISTDIR}; \ 811 for file in ${PATCHFILES}; do \ 812 if [ ! -f $$file -a ! -f `basename $$file` ]; then \ 813 for site in ${PATCH_SITES}; do \ 814 echo -n ${NCFTP} ${NCFTPFLAGS} $${site}$${file} '||' ; \ 815 break; \ 816 done; \ 817 echo "echo $${file} not fetched" ; \ 818 fi \ 819 done) 820.endif 821.endif 822 823# Checksumming utilities 824 825.if !target(makesum) 826makesum: fetch 827 @if [ ! -d ${FILESDIR} ]; then mkdir -p ${FILESDIR}; fi 828 @if [ -f ${MD5_FILE} ]; then rm -f ${MD5_FILE}; fi 829 @(cd ${DISTDIR}; \ 830 for file in ${DISTFILES} ${PATCHFILES}; do \ 831 ${MD5} $$file >> ${MD5_FILE}; \ 832 done) 833.endif 834 835.if !target(checksum) 836checksum: fetch 837 @if [ ! -f ${MD5_FILE} ]; then \ 838 ${ECHO_MSG} ">> No MD5 checksum file."; \ 839 else \ 840 (cd ${DISTDIR}; OK=""; \ 841 for file in ${DISTFILES} ${PATCHFILES}; do \ 842 CKSUM=`${MD5} $$file | awk '{print $$4}'`; \ 843 CKSUM2=`grep "($$file)" ${MD5_FILE} | awk '{print $$4}'`; \ 844 if [ "$$CKSUM2" = "" ]; then \ 845 ${ECHO_MSG} ">> No checksum recorded for $$file"; \ 846 OK="false"; \ 847 elif [ "$$CKSUM" != "$$CKSUM2" ]; then \ 848 ${ECHO_MSG} ">> Checksum mismatch for $$file"; \ 849 exit 1; \ 850 fi; \ 851 done; \ 852 if [ "$$OK" = "" ]; then \ 853 ${ECHO_MSG} "Checksums OK."; \ 854 else \ 855 ${ECHO_MSG} "Checksums OK for files that have them."; \ 856 fi) ; \ 857 fi 858.endif 859 860################################################################ 861# The package-building targets 862# You probably won't need to touch these 863################################################################ 864 865# Nobody should want to override this unless PKGNAME is simply bogus. 866.if !target(package-name) 867package-name: 868.if !defined(NO_PACKAGE) 869 @echo ${PKGNAME} 870.endif 871.endif 872 873# Show (recursively) all the packages this package depends on. 874.if !target(package-depends) 875package-depends: 876 @for i in ${EXEC_DEPENDS} ${LIB_DEPENDS} ${DEPENDS}; do \ 877 dir=`echo $$i | sed -e 's/.*://'`; \ 878 (cd $$dir ; ${MAKE} package-name package-depends); \ 879 done 880.endif 881 882# Build a package 883 884.if !target(package) 885package: install 886.if target(pre-package) 887 @${MAKE} ${.MAKEFLAGS} pre-package 888.endif 889 @${MAKE} ${.MAKEFLAGS} do-package 890.endif 891 892# Build a package but don't check the cookie for installation 893 894.if !target(repackage) 895repackage: 896.if target(pre-package) 897 @${MAKE} ${.MAKEFLAGS} pre-package 898.endif 899 @${MAKE} ${.MAKEFLAGS} do-package 900.endif 901 902# The body of the package-building target 903 904.if !target(do-package) 905do-package: 906 @if [ -e ${PKGDIR}/PLIST ]; then \ 907 ${ECHO_MSG} "===> Building package for ${PKGNAME}"; \ 908 if [ -d ${PACKAGES} ]; then \ 909 if [ ! -d ${PKGREPOSITORY} ]; then \ 910 if ! mkdir -p ${PKGREPOSITORY}; then \ 911 ${ECHO_MSG} ">> Can't create directory ${PKGREPOSITORY}."; \ 912 exit 1; \ 913 fi; \ 914 fi; \ 915 fi; \ 916 ${PKG_CMD} ${PKG_ARGS} ${PKGFILE}; \ 917 if [ -d ${PACKAGES} ]; then \ 918 rm -f ${PACKAGES}/*/${PKGNAME}${PKG_SUFX}; \ 919 for cat in ${CATEGORIES}; do \ 920 if [ ! -d ${PACKAGES}/$$cat ]; then \ 921 if ! mkdir -p ${PACKAGES}/$$cat; then \ 922 ${ECHO_MSG} ">> Can't create directory ${PACKAGES}/$$cat."; \ 923 exit 1; \ 924 fi; \ 925 fi; \ 926 ln -s ../${PKGREPOSITORYSUBDIR}/${PKGNAME}${PKG_SUFX} ${PACKAGES}/$$cat; \ 927 done; \ 928 fi; \ 929 fi 930.endif 931 932################################################################ 933# Dependency checking 934################################################################ 935 936.if !target(depends) 937depends: exec_depends lib_depends misc_depends 938 939exec_depends: 940.if defined(EXEC_DEPENDS) 941.if defined(NO_DEPENDS) 942# Just print out messages 943 @for i in ${EXEC_DEPENDS}; do \ 944 prog=`echo $$i | sed -e 's/:.*//'`; \ 945 dir=`echo $$i | sed -e 's/.*://'`; \ 946 ${ECHO_MSG} "===> ${PKGNAME} depends on executable: $$prog ($$dir)"; \ 947 done 948.else 949 @for i in ${EXEC_DEPENDS}; do \ 950 prog=`echo $$i | sed -e 's/:.*//'`; \ 951 dir=`echo $$i | sed -e 's/.*://'`; \ 952 if which -s "$$prog"; then \ 953 ${ECHO_MSG} "===> ${PKGNAME} depends on executable: $$prog - found"; \ 954 else \ 955 ${ECHO_MSG} "===> ${PKGNAME} depends on executable: $$prog - not found"; \ 956 ${ECHO_MSG} "===> Verifying build for $$prog in $$dir"; \ 957 if [ ! -d "$$dir" ]; then \ 958 ${ECHO_MSG} ">> No directory for $$prog. Skipping.."; \ 959 else \ 960 (cd $$dir; ${MAKE} ${.MAKEFLAGS} is_depended) ; \ 961 ${ECHO_MSG} "===> Returning to build of ${PKGNAME}"; \ 962 fi; \ 963 fi; \ 964 done 965.endif 966.else 967 @${DO_NADA} 968.endif 969 970lib_depends: 971.if defined(LIB_DEPENDS) 972.if defined(NO_DEPENDS) 973# Just print out messages 974 @for i in ${LIB_DEPENDS}; do \ 975 lib=`echo $$i | sed -e 's/:.*//'`; \ 976 dir=`echo $$i | sed -e 's/.*://'`; \ 977 ${ECHO_MSG} "===> ${PKGNAME} depends on shared library: $$lib ($$dir)"; \ 978 done 979.else 980 @for i in ${LIB_DEPENDS}; do \ 981 lib=`echo $$i | sed -e 's/:.*//'`; \ 982 dir=`echo $$i | sed -e 's/.*://'`; \ 983 if ldconfig -r | grep -q -e "-l$$lib"; then \ 984 ${ECHO_MSG} "===> ${PKGNAME} depends on shared library: $$lib - found"; \ 985 else \ 986 ${ECHO_MSG} "===> ${PKGNAME} depends on shared library: $$lib - not found"; \ 987 ${ECHO_MSG} "===> Verifying build for $$lib in $$dir"; \ 988 if [ ! -d "$$dir" ]; then \ 989 ${ECHO_MSG} ">> No directory for $$lib. Skipping.."; \ 990 else \ 991 (cd $$dir; ${MAKE} ${.MAKEFLAGS} is_depended) ; \ 992 ${ECHO_MSG} "===> Returning to build of ${PKGNAME}"; \ 993 fi; \ 994 fi; \ 995 done 996.endif 997.else 998 @${DO_NADA} 999.endif 1000 1001misc_depends: 1002.if defined(DEPENDS) 1003 @${ECHO_MSG} "===> ${PKGNAME} depends on: ${DEPENDS}" 1004.if !defined(NO_DEPENDS) 1005 @for i in ${DEPENDS}; do \ 1006 ${ECHO_MSG} "===> Verifying build for $$i"; \ 1007 if [ ! -d $$i ]; then \ 1008 ${ECHO_MSG} ">> No directory for $$i. Skipping.."; \ 1009 else \ 1010 (cd $$i; ${MAKE} ${.MAKEFLAGS} is_depended) ; \ 1011 fi \ 1012 done 1013 @${ECHO_MSG} "===> Returning to build of ${PKGNAME}" 1014.endif 1015.else 1016 @${DO_NADA} 1017.endif 1018 1019.endif 1020 1021################################################################ 1022# Everything after here are internal targets and really 1023# shouldn't be touched by anybody but the release engineers. 1024################################################################ 1025 1026# This target generates an index entry suitable for aggregation into 1027# a large index. Format is: 1028# 1029# distribution-name|port-path|installation-prefix|comment| \ 1030# description-file|maintainer|categories|keywords 1031# 1032.if !target(describe) 1033describe: 1034 @echo -n "${PKGNAME}|${.CURDIR}/${PKGNAME}|" 1035 @echo -n "${PREFIX}|" 1036 @if [ -f ${PKGDIR}/COMMENT ]; then \ 1037 echo -n "`cat ${PKGDIR}/COMMENT`"; \ 1038 else \ 1039 echo -n "** No Description"; \ 1040 fi 1041 @if [ -f ${PKGDIR}/DESCR ]; then \ 1042 echo -n "|${PKGDIR}/DESCR"; \ 1043 else \ 1044 echo -n "|/dev/null"; \ 1045 fi 1046 @echo -n "|${MAINTAINER}|${CATEGORIES}|${KEYWORDS}" 1047 @echo "" 1048.endif 1049 1050# Fake installation of package so that user can pkg_delete it later. 1051# Also, make sure that an installed port is recognized correctly in 1052# accordance to the @pkgdep directive in the packing lists 1053 1054.if !target(fake-pkg) 1055.if !defined(NO_PACKAGE) 1056fake-pkg: 1057 @if [ ! -f ${PKGDIR}/PLIST -o ! -f ${PKGDIR}/COMMENT -o ! -f ${PKGDIR}/DESCR ]; then echo "** Missing package files for ${PKGNAME} - installation not recorded."; exit 1; fi 1058 @if [ ! -d ${PKG_DBDIR} ]; then rm -f ${PKG_DBDIR}; mkdir -p ${PKG_DBDIR}; fi 1059 @if [ ! -d ${PKG_DBDIR}/${PKGNAME} ]; then \ 1060 ${ECHO_MSG} "===> Registering installation for ${PKGNAME}"; \ 1061 mkdir -p ${PKG_DBDIR}/${PKGNAME}; \ 1062 ${PKG_CMD} ${PKG_ARGS} -O ${PKGFILE} > ${PKG_DBDIR}/${PKGNAME}/+CONTENTS; \ 1063 cp ${PKGDIR}/DESCR ${PKG_DBDIR}/${PKGNAME}/+DESC; \ 1064 cp ${PKGDIR}/COMMENT ${PKG_DBDIR}/${PKGNAME}/+COMMENT; \ 1065 if [ -f ${PKGDIR}/INSTALL ]; then cp ${PKGDIR}/INSTALL ${PKG_DBDIR}/${PKGNAME}/+INSTALL; fi; \ 1066 if [ -f ${PKGDIR}/DEINSTALL ]; then cp ${PKGDIR}/DEINSTALL ${PKG_DBDIR}/${PKGNAME}/+DEINSTALL; fi; \ 1067 if [ -f ${PKGDIR}/REQ ]; then cp ${PKGDIR}/REQ ${PKG_DBDIR}/${PKGNAME}/+REQ; fi; \ 1068 else \ 1069 ${ECHO_MSG} "===> ${PKGNAME} is already installed - perhaps an older version?"; \ 1070 ${ECHO_MSG} " If so, you may wish to \`\`pkg_delete ${PKGNAME}'' and install"; \ 1071 ${ECHO_MSG} " this port again to upgrade it properly."; \ 1072 fi 1073.endif 1074.endif 1075 1076# Depend is generally meaningless for arbitrary ports, but if someone wants 1077# one they can override this. This is just to catch people who've gotten into 1078# the habit of typing `make depend all install' as a matter of course. 1079# 1080.if !target(depend) 1081depend: 1082.endif 1083 1084# Same goes for tags 1085.if !target(tags) 1086tags: 1087.endif 1088