Cleanup the fix for dependency handling. This explicitly checks wether
[dragonfly.git] / share / mk / bsd.port.mk
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/Attic/bsd.port.mk,v 1.10 2004/01/25 19:09:39 joerg 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 the port does not exist in /usr/dfports/<portpath> use the original
23 # FreeBSD port.  Also process as per normal if BEFOREPORTMK is set so
24 # any expected variables are set.
25 #
26 .include <bsd.own.mk>
27 .include "${PORTSDIR}/Mk/bsd.port.mk"
28
29 .else
30
31 .undef BEFOREPORTMK
32 .undef AFTERPORTMK
33
34 # Otherwise retarget to the DragonFly override port.
35 #
36
37 TARGETS+=       all
38 TARGETS+=       build
39 TARGETS+=       checksum
40 TARGETS+=       clean
41 TARGETS+=       clean-for-cdrom
42 TARGETS+=       clean-for-cdrom-list
43 TARGETS+=       clean-restricted
44 TARGETS+=       clean-restricted-list
45 TARGETS+=       configure
46 TARGETS+=       deinstall
47 TARGETS+=       depend
48 TARGETS+=       depends
49 TARGETS+=       describe
50 TARGETS+=       distclean
51 TARGETS+=       extract
52 TARGETS+=       fetch
53 TARGETS+=       fetch-list
54 TARGETS+=       ignorelist
55 TARGETS+=       makesum
56 TARGETS+=       maintainer
57 TARGETS+=       package
58 TARGETS+=       realinstall
59 TARGETS+=       reinstall
60 TARGETS+=       install
61 TARGETS+=       tags
62
63 .undef PORTSDIR
64 .if !make(package-depends-list) && !make(all-depends-list)
65 .BEGIN:
66         @echo "WARNING, USING DRAGONFLY OVERRIDE ${DFPORTSDIR}/${PORTPATH}"
67         cd ${DFPORTSDIR}/${PORTPATH} && ${MAKE} -B ${.TARGETS}
68 .endif
69
70 ${.TARGETS}:
71
72 .endif
73