Patrick Welche <prlw1@cam.ac.uk>
[netbsd-mini2440.git] / external / mit / xorg / Makefile
blob91506bc6eeeff5e772bb2b71a442ca60478d5462
1 # $NetBSD: Makefile,v 1.6 2009/04/20 15:39:46 jnemeth 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
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 ${MKMAN} != "no"
48 ${MAKEDIRTARGET} ${NETBSDSRCDIR}/share/man makedb \
49 WHATISDBDIR=${X11MANDIR}
50 .endif
53 DISTRIBTARGETS= \
54 bin/proxymngr \
55 bin/twm \
56 bin/xdm/config \
57 bin/xfs \
58 bin/xinit \
59 bin/xsm \
60 lib/fontconfig/etc \
61 lib/fontconfig/etc/conf.avail \
62 lib/fontconfig/etc/conf.d
64 distribution: check_X11SRCDIR
65 .for tgt in ${DISTRIBTARGETS}
66 ${MAKEDIRTARGET} ${tgt} configinstall
67 .endfor
70 check_X11SRCDIR: .PHONY .NOTMAIN
71 .if !defined(X11SRCDIR)
72 @echo
73 @echo "ERROR: setenv X11SRCDIR before doing that!"
74 @false
75 .elif !exists(${X11SRCDIR.X11})
76 @echo
77 @echo "ERROR: X11SRCDIR.X11 \`${X11SRCDIR.X11}' does not exist"
78 @false
79 .else
80 @true
81 .endif
83 .include <bsd.subdir.mk>