[BACK]Return to bsd.port.mk CVS log [TXT][DIR] Up to [local] / src / share / mk

Diff for /src/share/mk/bsd.port.mk between version 1.5 and 1.6

version 1.5, 1996/06/30 18:25:29 version 1.6, 1996/08/23 11:37:41
Line 4 
Line 4 
 #       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:
 #  #
Line 37 
Line 45 
 #  #
 # 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).
Line 77 
Line 84 
 #                                 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.
Line 110 
Line 119 
 #                                 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.
Line 140 
Line 149 
 #                                 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:
 #  #
Line 150 
Line 163 
 # 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:
 #  #
Line 162 
Line 178 
 #                                 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)
Line 200 
Line 225 
 .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.
Line 252 
Line 278 
   
 # 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
Line 264 
Line 290 
 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
Line 274 
Line 299 
 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
Line 309 
Line 336 
 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)
Line 374 
Line 411 
 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
Line 456 
Line 494 
   
 .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} \
Line 502 
Line 540 
         @${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
Line 551 
Line 595 
                         ${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 \
Line 575 
Line 618 
                         ${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 \
Line 592 
Line 634 
   
 .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 \
Line 608 
Line 652 
 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}; \
Line 621 
Line 666 
                                 ;; \                                  ;; \
                 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
   
Line 704 
Line 729 
   
 .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
Line 776 
Line 806 
   
 _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)
Line 794 
Line 824 
         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)) \
Line 831 
Line 862 
   
 .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)
Line 859 
Line 890 
 .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
   
Line 909 
Line 940 
   
 .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
Line 938 
Line 969 
 .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
   
Line 956 
Line 985 
          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" ; \
Line 967 
Line 996 
          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" ; \
Line 995 
Line 1024 
         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"; \
Line 1049 
Line 1078 
   
 .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
   
 ################################################################  ################################################################
Line 1058 
Line 1087 
   
 .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}
Line 1199 
Line 1228 
 #  #
 .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`"; \
Line 1212 
Line 1241 
                 ${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
   
Line 1225 
Line 1254 
 .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:

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6