Reorganise the way xorg is build. Move build of makestrs into src/tools

as it is needed for the "includes" phase. Make it symlink all necessary
headers in obj to decouple it from "includes" itself, breaking the
dependency cycle. Move the do-x11 target between do-lib and do-build, so
that libraries can get the benefit of build_install (correct .WAIT
behavior) and everything else like "includes" uses the plain SUBDIR
entry in external/mit.
This commit is contained in:
joerg 2015-01-07 20:42:01 +00:00
parent ede4dd9ede
commit 72e6048ca0
6 changed files with 35 additions and 14 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.311 2014/11/05 08:19:17 snj Exp $
# $NetBSD: Makefile,v 1.312 2015/01/07 20:42:01 joerg Exp $
#
# This is the top-level makefile for building NetBSD. For an outline of
@ -231,10 +231,10 @@ BUILDTARGETS+= includes
.endif
BUILDTARGETS+= do-lib
BUILDTARGETS+= do-compat-lib
BUILDTARGETS+= do-build
.if ${MKX11} != "no"
BUILDTARGETS+= do-x11
.endif
BUILDTARGETS+= do-build
.if ${MKEXTSRC} != "no"
BUILDTARGETS+= do-extsrc
.endif
@ -479,7 +479,8 @@ do-build: .PHONY .MAKE
do-x11: .PHONY .MAKE
.if ${MKX11} != "no"
.if ${X11FLAVOUR} == "Xorg"
${MAKEDIRTARGET} external/mit/xorg build
${MAKEDIRTARGET} external/mit/xorg/tools all
${MAKEDIRTARGET} external/mit/xorg/lib build_install
.else
${MAKEDIRTARGET} x11 build
.endif

View File

@ -1,5 +1,11 @@
# $NetBSD: Makefile,v 1.2 2012/02/29 20:07:55 tron Exp $
# $NetBSD: Makefile,v 1.3 2015/01/07 20:42:01 joerg Exp $
.include <bsd.own.mk>
SUBDIR+= expat lua
.if ${MKX11} != "no" && ${X11FLAVOUR} == "Xorg"
SUBDIR+= xorg
.endif
.include <bsd.subdir.mk>

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.31 2015/01/05 03:45:31 mrg Exp $
# $NetBSD: Makefile,v 1.32 2015/01/07 20:42:01 joerg Exp $
# build libraries for xorg
@ -35,4 +35,5 @@ SUBDIR+=libGLU libGLw libXaw6 libXaw libXcursor \
libXdmGreet \
xcb-util
.include <bsd.buildinstall.mk>
.include <bsd.subdir.mk>

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.4 2014/07/09 20:22:56 riastradh Exp $
# $NetBSD: Makefile,v 1.5 2015/01/07 20:42:01 joerg Exp $
.include <bsd.own.mk>
@ -14,4 +14,5 @@ SUBDIR+= makestrs .WAIT
SUBDIR+=bdftopcf fc-cache ucs2any
SUBDIR+=makekeys mkfontscale .WAIT xkbcomp
.include <bsd.buildinstall.mk>
.include <bsd.subdir.mk>

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.1.1.1 2008/07/29 05:01:22 mrg Exp $
# $NetBSD: Makefile,v 1.2 2015/01/07 20:42:02 joerg Exp $
NOMAN= 1
@ -7,12 +7,20 @@ NOMAN= 1
.PATH: ${X11SRCDIR.Xt}/util
HOSTPROG= makestrs
HOST_CPPFLAGS+= -I. -I${DESTDIR}${X11INCDIR}
HOST_CPPFLAGS+= -I.
# Can't use -I${DESTDIR}${X11INCDIR} since pswrap is needed
# to create some header files.
#
BUILDSYMLINKS= ${X11SRCDIR.Xt}/include/X11 X11
DPSRCS+= X11
.for header in Xos.h Xosdefs.h Xarch.h
realdepend realall: X11/${header}
X11/${header}:
mkdir -p X11
rm -f ${header}
ln -s ${X11SRCDIR.xproto}/${header} X11/${header}
.endfor
clean_headers: .PHONY
rm -rf X11
cleandir: clean_headers
.include <bsd.hostprog.mk>

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.179 2014/12/05 01:50:47 pooka Exp $
# $NetBSD: Makefile,v 1.180 2015/01/07 20:42:02 joerg Exp $
.include <bsd.own.mk>
.include <bsd.endian.mk>
@ -211,6 +211,10 @@ SUBDIR+= elftosb
SUBDIR+= mkubootimage
.endif
.if ${MKX11} != "no" && ${X11FLAVOUR} == "Xorg"
SUBDIR+= ../external/mit/xorg/tools/makestrs
.endif
.endif # TOOLCHAIN_BUILDRUMP
check_MKTOOLS: .PHONY .NOTMAIN