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

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.25    ! joerg       2: # $DragonFly: src/share/mk/bsd.port.mk,v 1.24 2005/01/08 11:58:46 dillon 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.24      dillon     84: # WARNING!  Do not use the -B option.  This appears to propogate to the
                     85: # gmake (probably because both use the same environment variable, MAKEFLAGS,
                     86: # to pass make options) where as of version 3.80 -B means 'always-make',
                     87: # which forces all targets, which blows up gnu builds in the ports system
                     88: # because it appears to cause the configure.status target to loop.
                     89: #
1.23      joerg      90: .if !defined(_DFPORTS_REDIRECT)
                     91: _DFPORTS_REDIRECT=
1.14      cpressey   92: .if !make(package-depends-list) && !make(all-depends-list) && \
1.19      joerg      93:     !make(run-depends-list) && !make(build-depends-list) && \
1.25    ! joerg      94:     !make(describe) && !make(package-name)
1.5       dillon     95: .BEGIN:
1.4       dillon     96:        @echo "WARNING, USING DRAGONFLY OVERRIDE ${DFPORTSDIR}/${PORTPATH}"
1.24      dillon     97:        cd ${DFPORTSDIR}/${PORTPATH} && ${MAKE} ${.TARGETS}
1.23      joerg      98: .else
                     99: .BEGIN:
1.24      dillon    100:        @cd ${DFPORTSDIR}/${PORTPATH} && ${MAKE} ${.TARGETS} 
1.23      joerg     101: .endif
1.9       joerg     102: .endif
1.3       dillon    103: 
1.12      joerg     104: .if !empty(.TARGETS)
1.8       joerg     105: ${.TARGETS}:
1.12      joerg     106: .else
                    107: all:
                    108: .MAIN: all
                    109: .endif
1.8       joerg     110: 
1.11      joerg     111: # Hack to get Makefiles with conditional statements working
                    112: XFREE86_VERSION?=      4
                    113: ARCH?=                 i386
                    114: MACHINE_ARCH?=         i386
                    115: HAVE_GNOME?=
1.16      joerg     116: FILESDIR?=             ${.CURDIR}/files
1.18      dillon    117: X_WINDOW_SYSTEM?=      xfree86-4
1.19      joerg     118: CAT?=                  cat
                    119: PREFIX?=               /usr
                    120: PERL_LEVEL?=           5
1.23      joerg     121: LOCALBASE?=            /usr/local
                    122: SED?=                  /usr/bin/sed
                    123: ECHO_CMD?=             echo
                    124: GREP?=                 /usr/bin/grep
                    125: AWK?=                  /usr/bin/awk
                    126: UNAME?=                        /usr/bin/uname
                    127: EXPR?=                 /bin/expr
                    128: HAVE_SDL?=
1.11      joerg     129: 
1.25    ! joerg     130: PKG_SUFX?=             .tgz
        !           131: PKGNAME!=              cd ${DFPORTSDIR}/${PORTPATH}; ${MAKE} -V PKGNAME
        !           132: PKGREPOSITORYSUBDIR?=   All
        !           133: PKGREPOSITORY?=         ${PACKAGES}/${PKGREPOSITORYSUBDIR}
        !           134: .if exists(${PACKAGES})
        !           135: PKGFILE?=               ${PKGREPOSITORY}/${PKGNAME}${PKG_SUFX}
        !           136: .else
        !           137: PKGFILE?=               ${.CURDIR}/${PKGNAME}${PKG_SUFX}
1.15      hmp       138: .endif
                    139:  
1.3       dillon    140: .endif
                    141: