Annotation of src/share/mk/bsd.port.mk, revision 1.29

1.1       dillon      1: # $FreeBSD: src/share/mk/bsd.port.mk,v 1.303.2.2 2002/07/17 19:08:23 ru Exp $
1.27      joerg       2: # $DragonFly$
1.1       dillon      3: 
                      4: PORTSDIR?=     /usr/ports
1.4       dillon      5: DFPORTSDIR?=   /usr/dfports
1.3       dillon      6: PORTPATH!=     /usr/bin/relpath ${PORTSDIR} ${.CURDIR}
1.1       dillon      7: 
1.17      joerg       8: .if !defined(DFOSVERSION)
                      9: DFOSVERSION!=  /sbin/sysctl -n kern.osreldate
                     10: .endif
                     11: 
1.7       dillon     12: # Temporary Hack
                     13: #
                     14: OSVERSION ?= 480102
                     15: UNAME_s?= FreeBSD
                     16: UNAME_v?=FreeBSD 4.8-CURRENT
                     17: UNAME_r?=4.8-CURRENT
                     18: 
1.27      joerg      19: # override for bsd.port.mk
1.28      joerg      20: PERL_VERSION?= 5.8.6
                     21: PERL_VER?=     5.8.6
1.27      joerg      22: 
1.7       dillon     23: .makeenv UNAME_s
                     24: .makeenv UNAME_v
                     25: .makeenv UNAME_r
                     26: .makeenv OSVERSION
                     27: 
1.29    ! joerg      28: # handle both native and override ports
        !            29: .undef USE_GETOPT_LONG
1.9       joerg      30: 
1.13      joerg      31: .if defined(USE_RC_SUBR)
                     32: .undef USE_RC_SUBR
                     33: RC_SUBR=       /etc/rc.subr
                     34: .endif
                     35: 
1.29    ! joerg      36: .if !exists(${DFPORTSDIR}/${PORTPATH}/Makefile)
        !            37: 
1.20      joerg      38: .if defined(USE_GCC)
                     39: .  if ${USE_GCC} == 3.4
                     40: .undef USE_GCC
                     41: CCVER= gcc34
                     42: .makeenv CCVER
                     43: .  endif
                     44: .endif
                     45: 
1.5       dillon     46: # If the port does not exist in /usr/dfports/<portpath> use the original
                     47: # FreeBSD port.  Also process as per normal if BEFOREPORTMK is set so
                     48: # any expected variables are set.
1.3       dillon     49: #
1.1       dillon     50: .include <bsd.own.mk>
                     51: .include "${PORTSDIR}/Mk/bsd.port.mk"
1.3       dillon     52: 
                     53: .else
                     54: 
1.23      joerg      55: .if !defined(BEFOREPORTMK)
                     56: .undef PORTSDIR
                     57: .endif
                     58: 
1.5       dillon     59: .undef BEFOREPORTMK
                     60: .undef AFTERPORTMK
                     61: 
1.3       dillon     62: # Otherwise retarget to the DragonFly override port.
                     63: #
                     64: 
                     65: TARGETS+=      all
                     66: TARGETS+=      build
                     67: TARGETS+=      checksum
                     68: TARGETS+=      clean
                     69: TARGETS+=      clean-for-cdrom
                     70: TARGETS+=      clean-for-cdrom-list
                     71: TARGETS+=      clean-restricted
                     72: TARGETS+=      clean-restricted-list
                     73: TARGETS+=      configure
                     74: TARGETS+=      deinstall
                     75: TARGETS+=      depend
                     76: TARGETS+=      depends
                     77: TARGETS+=      describe
                     78: TARGETS+=      distclean
                     79: TARGETS+=      extract
                     80: TARGETS+=      fetch
                     81: TARGETS+=      fetch-list
                     82: TARGETS+=      ignorelist
                     83: TARGETS+=      makesum
                     84: TARGETS+=      maintainer
                     85: TARGETS+=      package
                     86: TARGETS+=      realinstall
                     87: TARGETS+=      reinstall
                     88: TARGETS+=      install
                     89: TARGETS+=      tags
                     90: 
1.24      dillon     91: # WARNING!  Do not use the -B option.  This appears to propogate to the
                     92: # gmake (probably because both use the same environment variable, MAKEFLAGS,
                     93: # to pass make options) where as of version 3.80 -B means 'always-make',
                     94: # which forces all targets, which blows up gnu builds in the ports system
                     95: # because it appears to cause the configure.status target to loop.
                     96: #
1.23      joerg      97: .if !defined(_DFPORTS_REDIRECT)
                     98: _DFPORTS_REDIRECT=
1.14      cpressey   99: .if !make(package-depends-list) && !make(all-depends-list) && \
1.19      joerg     100:     !make(run-depends-list) && !make(build-depends-list) && \
1.25      joerg     101:     !make(describe) && !make(package-name)
1.5       dillon    102: .BEGIN:
1.4       dillon    103:        @echo "WARNING, USING DRAGONFLY OVERRIDE ${DFPORTSDIR}/${PORTPATH}"
1.24      dillon    104:        cd ${DFPORTSDIR}/${PORTPATH} && ${MAKE} ${.TARGETS}
1.23      joerg     105: .else
                    106: .BEGIN:
1.24      dillon    107:        @cd ${DFPORTSDIR}/${PORTPATH} && ${MAKE} ${.TARGETS} 
1.23      joerg     108: .endif
1.9       joerg     109: .endif
1.3       dillon    110: 
1.12      joerg     111: .if !empty(.TARGETS)
1.8       joerg     112: ${.TARGETS}:
1.12      joerg     113: .else
                    114: all:
                    115: .MAIN: all
                    116: .endif
1.8       joerg     117: 
1.11      joerg     118: # Hack to get Makefiles with conditional statements working
                    119: XFREE86_VERSION?=      4
                    120: ARCH?=                 i386
                    121: MACHINE_ARCH?=         i386
                    122: HAVE_GNOME?=
1.16      joerg     123: FILESDIR?=             ${.CURDIR}/files
1.18      dillon    124: X_WINDOW_SYSTEM?=      xfree86-4
1.19      joerg     125: CAT?=                  cat
                    126: PREFIX?=               /usr
                    127: PERL_LEVEL?=           5
1.23      joerg     128: LOCALBASE?=            /usr/local
                    129: SED?=                  /usr/bin/sed
                    130: ECHO_CMD?=             echo
                    131: GREP?=                 /usr/bin/grep
                    132: AWK?=                  /usr/bin/awk
                    133: UNAME?=                        /usr/bin/uname
                    134: EXPR?=                 /bin/expr
                    135: HAVE_SDL?=
1.11      joerg     136: 
1.25      joerg     137: PKG_SUFX?=             .tgz
                    138: PKGNAME!=              cd ${DFPORTSDIR}/${PORTPATH}; ${MAKE} -V PKGNAME
1.26      joerg     139: .for _CATEGORY in ${CATEGORIES}
                    140: PKGCATEGORY?=   ${_CATEGORY}
                    141: .endfor
                    142: _PORTDIRNAME=   ${.CURDIR:T}
                    143: PORTDIRNAME?=   ${_PORTDIRNAME}
                    144: PKGORIGIN?=             ${PKGCATEGORY}/${PORTDIRNAME}
                    145: 
1.25      joerg     146: PKGREPOSITORYSUBDIR?=   All
                    147: PKGREPOSITORY?=         ${PACKAGES}/${PKGREPOSITORYSUBDIR}
                    148: .if exists(${PACKAGES})
                    149: PKGFILE?=               ${PKGREPOSITORY}/${PKGNAME}${PKG_SUFX}
                    150: .else
                    151: PKGFILE?=               ${.CURDIR}/${PKGNAME}${PKG_SUFX}
1.15      hmp       152: .endif
                    153:  
1.3       dillon    154: .endif
                    155: