summaryrefslogtreecommitdiff
path: root/external/mit/xorg/Makefile
blob: 09153e211b13fba9c8fd1c36be1d1625cbc58902 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#	$NetBSD: Makefile,v 1.8 2010/11/12 17:05:48 tsutsui Exp $

# Top level Makefile to cross build xorg inside the NetBSD tree.

.include <bsd.own.mk>

SUBDIR=		tools .WAIT include .WAIT lib .WAIT bin share server etc

.if ${MKUPDATE} == "no" && !defined(NOCLEANDIR)
BUILDTARGETS+=  cleandir
.endif
.if ${MKOBJDIRS} != "no"
BUILDTARGETS+=  obj
.endif
.if !defined(NOINCLUDES)
BUILDTARGETS+=	includes
.endif
BUILDTARGETS+=	do-tools
BUILDTARGETS+=	do-lib
BUILDTARGETS+=	do-build

.ORDER: ${BUILDTARGETS}

START_TIME!=	date

build: check_X11SRCDIR
	@echo "X11 build started at: ${START_TIME}"
.for tgt in ${BUILDTARGETS}
	${MAKEDIRTARGET} . ${tgt}
.endfor
	@echo   "X11 build started at:  ${START_TIME}"
	@printf "X11 build finished at: " && date

do-build:
.for targ in dependall install
	${MAKEDIRTARGET} . ${targ}
.endfor

.for dir in	tools lib
do-${dir:S/\//-/g}:
.  for targ in dependall install
	${MAKEDIRTARGET} ${dir} ${targ}
.  endfor
.endfor

afterinstall: .PHONY
.if !defined(__MINIX)
.if ${MKMAN} != "no"
	${MAKEDIRTARGET} ${NETBSDSRCDIR}/share/man makedb \
	    WHATISDBDIR=${X11MANDIR}
.endif
.endif # !defined(__MINIX)


DISTRIBTARGETS=	\
	bin/proxymngr \
	bin/twm \
	bin/xdm/config \
	bin/xfs \
	bin/xinit \
	bin/xsm \
	etc \
	lib/fontconfig/etc \
	lib/fontconfig/etc/conf.avail \
	lib/fontconfig/etc/conf.d

distribution: check_X11SRCDIR
.for tgt in ${DISTRIBTARGETS}
	${MAKEDIRTARGET} ${tgt} configinstall
.endfor


check_X11SRCDIR: .PHONY .NOTMAIN
.if !defined(X11SRCDIR)
	@echo
	@echo "ERROR: setenv X11SRCDIR before doing that!"
	@false
.elif !exists(${X11SRCDIR.X11})
	@echo
	@echo "ERROR: X11SRCDIR.X11 \`${X11SRCDIR.X11}' does not exist"
	@false
.else
	@true
.endif

.include <bsd.subdir.mk>