summaryrefslogtreecommitdiff
path: root/Makefile
blob: 42deae2b05d6464c7a3d556ab8b8840792fbe8d8 (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
# $OpenBSD: Makefile,v 1.1 2006/11/26 14:00:56 matthieu Exp $
.include <bsd.own.mk>

X11BASE?=	/usr/X11R6

SUBDIR= proto data/bitmaps lib app data/xkbdata xserver driver util
.ifndef NOFONTS
SUBDIR+= font
.endif
.ifmake(install)
SUBDIR+= share/mk
.endif

NOOBJS=

build: beforebuild _SUBDIRUSE

bootstrap:
	${SUDO} ${MAKE} distrib-dirs
	cd ${.CURDIR}/share/mk \
		&& ${SUDO} ${MAKE} install

beforebuild: bootstrap
	cd ${.CURDIR}/util/macros \
		&& ${MAKE} -f Makefile.bsd-wrapper \
		&& ${SUDO} ${MAKE} -f Makefile.bsd-wrapper install
	${SUDO} ${MAKE} includes

beforeinstall:
	${MAKE} distrib-dirs
	${MAKE} includes

release:

distrib-dirs:
	if [ ! -d ${DESTDIR}${X11BASE}/. ]; then \
		${INSTALL} -d -o root -g wheel -m 755 ${DESTDIR}${X11BASE}/; \
	fi
	mtree -qdef ${.CURDIR}/etc/mtree/BSD.x11.dist \
		-p ${DESTDIR}${X11BASE}/ -U

update: _SUBDIRUSE

.PHONY: all build beforeinstall install afterinstall release clean cleandir

.include <bsd.subdir.mk>
.include <bsd.xorg.mk>