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

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.23    ! joerg       2: # $DragonFly: src/share/mk/bsd.port.mk,v 1.22 2004/11/27 13:22:26 joerg Exp $
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: 
                     19: .makeenv UNAME_s
                     20: .makeenv UNAME_v
                     21: .makeenv UNAME_r
                     22: .makeenv OSVERSION
                     23: 
1.9       joerg      24: .if !exists(${DFPORTSDIR}/${PORTPATH}/Makefile)
                     25: 
1.13      joerg      26: .if defined(USE_RC_SUBR)
                     27: .undef USE_RC_SUBR
                     28: RC_SUBR=       /etc/rc.subr
                     29: .endif
                     30: 
1.20      joerg      31: .if defined(USE_GCC)
                     32: .  if ${USE_GCC} == 3.4
                     33: .undef USE_GCC
                     34: CCVER= gcc34
                     35: .makeenv CCVER
                     36: .  endif
                     37: .endif
                     38: 
1.5       dillon     39: # If the port does not exist in /usr/dfports/<portpath> use the original
                     40: # FreeBSD port.  Also process as per normal if BEFOREPORTMK is set so
                     41: # any expected variables are set.
1.3       dillon     42: #
1.1       dillon     43: .include <bsd.own.mk>
                     44: .include "${PORTSDIR}/Mk/bsd.port.mk"
1.3       dillon     45: 
                     46: .else
                     47: 
1.23    ! joerg      48: .if !defined(BEFOREPORTMK)
        !            49: .undef PORTSDIR
        !            50: .endif
        !            51: 
1.5       dillon     52: .undef BEFOREPORTMK
                     53: .undef AFTERPORTMK
                     54: 
1.3       dillon     55: # Otherwise retarget to the DragonFly override port.
                     56: #
                     57: 
                     58: TARGETS+=      all
                     59: TARGETS+=      build
                     60: TARGETS+=      checksum
                     61: TARGETS+=      clean
                     62: TARGETS+=      clean-for-cdrom
                     63: TARGETS+=      clean-for-cdrom-list
                     64: TARGETS+=      clean-restricted
                     65: TARGETS+=      clean-restricted-list
                     66: TARGETS+=      configure
                     67: TARGETS+=      deinstall
                     68: TARGETS+=      depend
                     69: TARGETS+=      depends
                     70: TARGETS+=      describe
                     71: TARGETS+=      distclean
                     72: TARGETS+=      extract
                     73: TARGETS+=      fetch
                     74: TARGETS+=      fetch-list
                     75: TARGETS+=      ignorelist
                     76: TARGETS+=      makesum
                     77: TARGETS+=      maintainer
                     78: TARGETS+=      package
                     79: TARGETS+=      realinstall
                     80: TARGETS+=      reinstall
                     81: TARGETS+=      install
                     82: TARGETS+=      tags
                     83: 
1.23    ! joerg      84: .if !defined(_DFPORTS_REDIRECT)
        !            85: _DFPORTS_REDIRECT=
1.14      cpressey   86: .if !make(package-depends-list) && !make(all-depends-list) && \
1.19      joerg      87:     !make(run-depends-list) && !make(build-depends-list) && \
1.23    ! joerg      88:     !make(describe)
1.5       dillon     89: .BEGIN:
1.4       dillon     90:        @echo "WARNING, USING DRAGONFLY OVERRIDE ${DFPORTSDIR}/${PORTPATH}"
1.5       dillon     91:        cd ${DFPORTSDIR}/${PORTPATH} && ${MAKE} -B ${.TARGETS}
1.23    ! joerg      92: .else
        !            93: .BEGIN:
        !            94:        @cd ${DFPORTSDIR}/${PORTPATH} && ${MAKE} -B ${.TARGETS} 
        !            95: .endif
1.9       joerg      96: .endif
1.3       dillon     97: 
1.12      joerg      98: .if !empty(.TARGETS)
1.8       joerg      99: ${.TARGETS}:
1.12      joerg     100: .else
                    101: all:
                    102: .MAIN: all
                    103: .endif
1.8       joerg     104: 
1.11      joerg     105: # Hack to get Makefiles with conditional statements working
                    106: XFREE86_VERSION?=      4
                    107: ARCH?=                 i386
                    108: MACHINE_ARCH?=         i386
                    109: HAVE_GNOME?=
1.16      joerg     110: FILESDIR?=             ${.CURDIR}/files
1.18      dillon    111: X_WINDOW_SYSTEM?=      xfree86-4
1.19      joerg     112: CAT?=                  cat
                    113: PREFIX?=               /usr
                    114: PERL_LEVEL?=           5
1.23    ! joerg     115: LOCALBASE?=            /usr/local
        !           116: SED?=                  /usr/bin/sed
        !           117: ECHO_CMD?=             echo
        !           118: GREP?=                 /usr/bin/grep
        !           119: AWK?=                  /usr/bin/awk
        !           120: UNAME?=                        /usr/bin/uname
        !           121: EXPR?=                 /bin/expr
        !           122: HAVE_SDL?=
1.11      joerg     123: 
1.15      hmp       124: # WORKAROUND to get portupgrade working
                    125: # Taken from: ${PORTSDIR}/Mk/bsd.port.mk
                    126: .if !defined(PKGNAME)
                    127: PKGNAME=       ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-${PORTVERSION:C/[-_,]/./g}${_SUF1}${_SUF2}
                    128: .endif
                    129:  
1.3       dillon    130: .endif
                    131: