etc/protocols - sync with NetBSD-8
[minix.git] / external / mit / xorg / Makefile
blob09153e211b13fba9c8fd1c36be1d1625cbc58902
1 # $NetBSD: Makefile,v 1.8 2010/11/12 17:05:48 tsutsui Exp $
3 # Top level Makefile to cross build xorg inside the NetBSD tree.
5 .include <bsd.own.mk>
7 SUBDIR= tools .WAIT include .WAIT lib .WAIT bin share server etc
9 .if ${MKUPDATE} == "no" && !defined(NOCLEANDIR)
10 BUILDTARGETS+= cleandir
11 .endif
12 .if ${MKOBJDIRS} != "no"
13 BUILDTARGETS+= obj
14 .endif
15 .if !defined(NOINCLUDES)
16 BUILDTARGETS+= includes
17 .endif
18 BUILDTARGETS+= do-tools
19 BUILDTARGETS+= do-lib
20 BUILDTARGETS+= do-build
22 .ORDER: ${BUILDTARGETS}
24 START_TIME!= date
26 build: check_X11SRCDIR
27 @echo "X11 build started at: ${START_TIME}"
28 .for tgt in ${BUILDTARGETS}
29 ${MAKEDIRTARGET} . ${tgt}
30 .endfor
31 @echo "X11 build started at: ${START_TIME}"
32 @printf "X11 build finished at: " && date
34 do-build:
35 .for targ in dependall install
36 ${MAKEDIRTARGET} . ${targ}
37 .endfor
39 .for dir in tools lib
40 do-${dir:S/\//-/g}:
41 . for targ in dependall install
42 ${MAKEDIRTARGET} ${dir} ${targ}
43 . endfor
44 .endfor
46 afterinstall: .PHONY
47 .if !defined(__MINIX)
48 .if ${MKMAN} != "no"
49 ${MAKEDIRTARGET} ${NETBSDSRCDIR}/share/man makedb \
50 WHATISDBDIR=${X11MANDIR}
51 .endif
52 .endif # !defined(__MINIX)
55 DISTRIBTARGETS= \
56 bin/proxymngr \
57 bin/twm \
58 bin/xdm/config \
59 bin/xfs \
60 bin/xinit \
61 bin/xsm \
62 etc \
63 lib/fontconfig/etc \
64 lib/fontconfig/etc/conf.avail \
65 lib/fontconfig/etc/conf.d
67 distribution: check_X11SRCDIR
68 .for tgt in ${DISTRIBTARGETS}
69 ${MAKEDIRTARGET} ${tgt} configinstall
70 .endfor
73 check_X11SRCDIR: .PHONY .NOTMAIN
74 .if !defined(X11SRCDIR)
75 @echo
76 @echo "ERROR: setenv X11SRCDIR before doing that!"
77 @false
78 .elif !exists(${X11SRCDIR.X11})
79 @echo
80 @echo "ERROR: X11SRCDIR.X11 \`${X11SRCDIR.X11}' does not exist"
81 @false
82 .else
83 @true
84 .endif
86 .include <bsd.subdir.mk>