Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/Makefile,v rcsdiff: /ftp/cvs/cvsroot/src/Makefile,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.317 retrieving revision 1.327.2.1 diff -u -p -r1.317 -r1.327.2.1 --- src/Makefile 2016/01/14 02:51:25 1.317 +++ src/Makefile 2019/09/01 10:36:26 1.327.2.1 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.317 2016/01/14 02:51:25 christos Exp $ +# $NetBSD: Makefile,v 1.327.2.1 2019/09/01 10:36:26 martin Exp $ # # This is the top-level makefile for building NetBSD. For an outline of @@ -30,6 +30,7 @@ # NOCLEANDIR, if defined, will avoid a `make cleandir' at the start # of the `make build'. # NOINCLUDES will avoid the `make includes' usually done by `make build'. +# NOBINARIES will not build binaries, only includes and libraries # # See mk.conf(5) for more details. # @@ -92,13 +93,12 @@ # obj: creates object directories. # do-distrib-dirs: creates the distribution directories. # includes: installs include files. -# do-lib: builds and installs prerequisites from lib -# if ${MKCOMPAT} != "no". +# do-lib: builds and installs prerequisites from lib. # do-compat-lib: builds and installs prerequisites from compat/lib # if ${MKCOMPAT} != "no". +# do-x11: builds and installs X11 tools and libraries +# from src/external/mit/xorg if ${MKX11} != "no". # do-build: builds and installs the entire system. -# do-x11: builds and installs X11 if ${MKX11} != "no"; either -# X11R7 from src/external/mit/xorg # do-extsrc: builds and installs extsrc if ${MKEXTSRC} != "no". # do-obsolete: installs the obsolete sets (for the postinstall-* targets). # @@ -136,8 +136,12 @@ _SRC_TOP_OBJ_= # _SUBDIR is used to set SUBDIR, after removing directories that have # BUILD_${dir}=no, or that have no ${dir}/Makefile. # -_SUBDIR= tools lib include gnu external crypto/external bin games -_SUBDIR+= libexec sbin usr.bin +_SUBDIR= tools .WAIT lib +.if ${MKLLVM} != "no" +_SUBDIR+= external/bsd/compiler_rt +.endif +_SUBDIR+= include external crypto/external bin +_SUBDIR+= games libexec sbin usr.bin _SUBDIR+= usr.sbin share sys etc tests compat _SUBDIR+= .WAIT rescue .WAIT distrib regress @@ -169,7 +173,8 @@ afterinstall: .PHONY .MAKE ${MAKEDIRTARGET} . postinstall-check .endif -_POSTINSTALL= ${.CURDIR}/usr.sbin/postinstall/postinstall \ +_POSTINSTALL= ${:!cd ${.CURDIR}/usr.sbin/postinstall && \ + ${MAKE} print-objdir!}/postinstall \ -m ${MACHINE} -a ${MACHINE_ARCH} _POSTINSTALL_ENV= \ AWK=${TOOL_AWK:Q} \ @@ -234,14 +239,22 @@ BUILDTARGETS+= includes .endif BUILDTARGETS+= do-lib BUILDTARGETS+= do-compat-lib +.if ${MKLLVM} != "no" +BUILDTARGETS+= do-sanitizer +.if ${MKSANITIZER:Uno} == "yes" +BUILDTARGETS+= do-sanitizer-tools +.endif +.endif .if ${MKX11} != "no" BUILDTARGETS+= do-x11 .endif +.if !defined(NOBINARIES) BUILDTARGETS+= do-build .if ${MKEXTSRC} != "no" BUILDTARGETS+= do-extsrc .endif BUILDTARGETS+= do-obsolete +.endif # # Enforce proper ordering of some rules. @@ -249,7 +262,6 @@ BUILDTARGETS+= do-obsolete .ORDER: ${BUILDTARGETS} includes-lib: .PHONY includes-include includes-sys -includes-gnu: .PHONY includes-lib # # Record the values of variables that might affect the build. @@ -468,6 +480,16 @@ do-lib: .PHONY .MAKE do-compat-lib: .PHONY .MAKE ${MAKEDIRTARGET} compat build_install BOOTSTRAP_SUBDIRS="../../../lib" +do-sanitizer: .PHONY .MAKE + ${MAKEDIRTARGET} external/bsd/compiler_rt all + +do-sanitizer-tools: .PHONY .MAKE +.if !exists(${TOOLDIR}/lib/clang) && ${HAVE_LLVM:Uno} == "yes" + mkdir -p ${TOOLDIR}/lib/clang + cd ${DESTDIR}/usr/lib/clang && \ + ${TOOL_PAX} -rw . ${TOOLDIR}/lib/clang +.endif + do-top-obj: .PHONY .MAKE ${MAKEDIRTARGET} . obj NOSUBDIR= @@ -526,3 +548,4 @@ dependall-distrib depend-distrib all-dis .include .include .include +.include