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

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