Start removing the old build infrastructure for the a.out
[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.13 2004/03/02 15:03:00 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 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 .BEGIN:
71         @echo "WARNING, USING DRAGONFLY OVERRIDE ${DFPORTSDIR}/${PORTPATH}"
72         cd ${DFPORTSDIR}/${PORTPATH} && ${MAKE} -B ${.TARGETS}
73 .endif
74
75 .if !empty(.TARGETS)
76 ${.TARGETS}:
77 .else
78 all:
79 .MAIN: all
80 .endif
81
82 # Hack to get Makefiles with conditional statements working
83 XFREE86_VERSION?=       4
84 ARCH?=                  i386
85 MACHINE_ARCH?=          i386
86 HAVE_GNOME?=
87
88 .endif
89