File:  [DragonFly] / src / share / mk / Attic / bsd.port.mk
Revision 1.14: download - view: text, annotated - select for diffs
Mon May 10 04:46:01 2004 UTC (10 years, 7 months ago) by cpressey
Branches: MAIN
CVS tags: HEAD, DragonFly_1_0_REL, DragonFly_1_0_RC1, DragonFly_1_0A_REL
Fix a bug in bsd.port.mk that was causing 'make clean' to fail in some
ports directories with mysterious symptoms like 'cd: can't cd to &&'.

The problem was that the text of the DragonFly port override warning
message was mistakenly being injected into the output of the
'*-depends-list' targets.  Although the message was being explicitly
filtered out if the target was 'all-depends-list', the targets
'build-depends-list' and 'run-depends-list', exercised indirectly by
'make clean', still allowed it to slip through.

Encountered-by: walt <wa1ter@myrealbox.com> and others
Detective-work-by: walt <wa1ter@myrealbox.com>
Patch-written-by: cpressey
Approved-by: dillon

    1: # $FreeBSD: src/share/mk/bsd.port.mk,v 1.303.2.2 2002/07/17 19:08:23 ru Exp $
    2: # $DragonFly: src/share/mk/bsd.port.mk,v 1.14 2004/05/10 04:46:01 cpressey Exp $
    3: 
    4: PORTSDIR?=	/usr/ports
    5: DFPORTSDIR?=	/usr/dfports
    6: PORTPATH!=	/usr/bin/relpath ${PORTSDIR} ${.CURDIR}
    7: 
    8: # Temporary Hack
    9: #
   10: OSVERSION ?= 480102
   11: UNAME_s?= FreeBSD
   12: UNAME_v?=FreeBSD 4.8-CURRENT
   13: UNAME_r?=4.8-CURRENT
   14: 
   15: .makeenv UNAME_s
   16: .makeenv UNAME_v
   17: .makeenv UNAME_r
   18: .makeenv OSVERSION
   19: 
   20: .if !exists(${DFPORTSDIR}/${PORTPATH}/Makefile)
   21: 
   22: .if defined(USE_RC_SUBR)
   23: .undef USE_RC_SUBR
   24: RC_SUBR=	/etc/rc.subr
   25: .endif
   26: 
   27: # If the port does not exist in /usr/dfports/<portpath> use the original
   28: # FreeBSD port.  Also process as per normal if BEFOREPORTMK is set so
   29: # any expected variables are set.
   30: #
   31: .include <bsd.own.mk>
   32: .include "${PORTSDIR}/Mk/bsd.port.mk"
   33: 
   34: .else
   35: 
   36: .undef BEFOREPORTMK
   37: .undef AFTERPORTMK
   38: 
   39: # Otherwise retarget to the DragonFly override port.
   40: #
   41: 
   42: TARGETS+=	all
   43: TARGETS+=	build
   44: TARGETS+=	checksum
   45: TARGETS+=	clean
   46: TARGETS+=	clean-for-cdrom
   47: TARGETS+=	clean-for-cdrom-list
   48: TARGETS+=	clean-restricted
   49: TARGETS+=	clean-restricted-list
   50: TARGETS+=	configure
   51: TARGETS+=	deinstall
   52: TARGETS+=	depend
   53: TARGETS+=	depends
   54: TARGETS+=	describe
   55: TARGETS+=	distclean
   56: TARGETS+=	extract
   57: TARGETS+=	fetch
   58: TARGETS+=	fetch-list
   59: TARGETS+=	ignorelist
   60: TARGETS+=	makesum
   61: TARGETS+=	maintainer
   62: TARGETS+=	package
   63: TARGETS+=	realinstall
   64: TARGETS+=	reinstall
   65: TARGETS+=	install
   66: TARGETS+=	tags
   67: 
   68: .undef PORTSDIR
   69: .if !make(package-depends-list) && !make(all-depends-list) && \
   70:     !make(run-depends-list) && !make(build-depends-list)
   71: .BEGIN:
   72: 	@echo "WARNING, USING DRAGONFLY OVERRIDE ${DFPORTSDIR}/${PORTPATH}"
   73: 	cd ${DFPORTSDIR}/${PORTPATH} && ${MAKE} -B ${.TARGETS}
   74: .endif
   75: 
   76: .if !empty(.TARGETS)
   77: ${.TARGETS}:
   78: .else
   79: all:
   80: .MAIN: all
   81: .endif
   82: 
   83: # Hack to get Makefiles with conditional statements working
   84: XFREE86_VERSION?=	4
   85: ARCH?=			i386
   86: MACHINE_ARCH?=		i386
   87: HAVE_GNOME?=
   88: 
   89: .endif
   90: