File:  [DragonFly] / src / share / mk / Attic / bsd.port.mk
Revision 1.3: download - view: text, annotated - select for diffs
Mon Sep 8 23:39:23 2003 UTC (10 years, 11 months ago) by dillon
Branches: MAIN
CVS tags: HEAD
Add bsd.dport.mk, which Makefile's in /usr/dports will use instead of
bsd.port.mk.  Modify bsd.port.mk to check for the existance of the same
port in /usr/dports and, if found, to cd into the dport and run the target
there.

NOTE: /usr/bin/relpath is required (see /usr/src/usr.bin/relpath).

# $FreeBSD: src/share/mk/bsd.port.mk,v 1.303.2.2 2002/07/17 19:08:23 ru Exp $
# $DragonFly: src/share/mk/bsd.port.mk,v 1.3 2003/09/08 23:39:23 dillon Exp $

PORTSDIR?=	/usr/ports
DPORTSDIR?=	/usr/dports
PORTPATH!=	/usr/bin/relpath ${PORTSDIR} ${.CURDIR}

.if !exists(${DPORTSDIR}/${PORTPATH}/Makefile)
# If the port does not exist in /usr/dports/<portpath> use the original
# FreeBSD port
#
.include <bsd.own.mk>
.include "${PORTSDIR}/Mk/bsd.port.mk"

.else

# Otherwise retarget to the DragonFly override port.
#

TARGETS+=	all
TARGETS+=	build
TARGETS+=	checksum
TARGETS+=	clean
TARGETS+=	clean-for-cdrom
TARGETS+=	clean-for-cdrom-list
TARGETS+=	clean-restricted
TARGETS+=	clean-restricted-list
TARGETS+=	configure
TARGETS+=	deinstall
TARGETS+=	depend
TARGETS+=	depends
TARGETS+=	describe
TARGETS+=	distclean
TARGETS+=	extract
TARGETS+=	fetch
TARGETS+=	fetch-list
TARGETS+=	ignorelist
TARGETS+=	makesum
TARGETS+=	maintainer
TARGETS+=	package
TARGETS+=	realinstall
TARGETS+=	reinstall
TARGETS+=	install
TARGETS+=	tags

.for __target in ${TARGETS}
.if !target(${__target})
${__target}:
	@echo "WARNING, USING DRAGONFLY OVERRIDE ${DPORTSDIR}/${PORTPATH}"
	cd ${DPORTSDIR}/${PORTPATH} && ${MAKE} -B ${.TARGET}
.endif
.endfor

.endif