From owner-svn-src-projects@FreeBSD.ORG Tue May 26 21:51:37 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9EAB43E5; Tue, 26 May 2015 21:51:37 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CA2C6AF; Tue, 26 May 2015 21:51:37 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4QLpbo7008514; Tue, 26 May 2015 21:51:37 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4QLpbp0008513; Tue, 26 May 2015 21:51:37 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201505262151.t4QLpbp0008513@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Tue, 26 May 2015 21:51:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r283590 - projects/bmake/share/mk X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 May 2015 21:51:37 -0000 Author: sjg Date: Tue May 26 21:51:36 2015 New Revision: 283590 URL: https://svnweb.freebsd.org/changeset/base/283590 Log: Include bsd.mkopt.mk before local.sys.mk Also use __DEFAULT_DEPENDENT_OPTIONS for options that generally depend on META_MODE. Deal with MK_META_MODE and MK_AUTO_OBJ directly. Also allow MK_META_FILES if no -B this is very handy for getting meta files from say buildworld Modified: projects/bmake/share/mk/sys.mk Modified: projects/bmake/share/mk/sys.mk ============================================================================== --- projects/bmake/share/mk/sys.mk Tue May 26 21:50:53 2015 (r283589) +++ projects/bmake/share/mk/sys.mk Tue May 26 21:51:36 2015 (r283590) @@ -62,12 +62,18 @@ CFLAGS += -fno-strict-aliasing .endif PO_CFLAGS ?= ${CFLAGS} +# cp(1) is used to copy source files to ${.OBJDIR}, make sure it can handle +# read-only files as non-root by passing -f. +CP ?= cp -f + +CPP ?= cpp + # C Type Format data is required for DTrace CTFFLAGS ?= -L VERSION CTFCONVERT ?= ctfconvert CTFMERGE ?= ctfmerge -DTRACE ?= dtrace + .if defined(CFLAGS) && (${CFLAGS:M-g} != "") CTFFLAGS += -g .endif @@ -76,7 +82,8 @@ CXX ?= c++ CXXFLAGS ?= ${CFLAGS:N-std=*:N-Wnested-externs:N-W*-prototypes:N-Wno-pointer-sign:N-Wold-style-definition} PO_CXXFLAGS ?= ${CXXFLAGS} -CPP ?= cpp +DTRACE ?= dtrace +DTRACEFLAGS ?= -C -x nolibs .if empty(.MAKEFLAGS:M-s) ECHO ?= echo @@ -237,21 +244,21 @@ YFLAGS ?= -d ${CTFCONVERT_CMD} .c.o: - ${CC} ${CFLAGS} -c ${.IMPSRC} + ${CC} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} ${CTFCONVERT_CMD} .cc .cpp .cxx .C: ${CXX} ${CXXFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} .cc.o .cpp.o .cxx.o .C.o: - ${CXX} ${CXXFLAGS} -c ${.IMPSRC} + ${CXX} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} .m.o: - ${OBJC} ${OBJCFLAGS} -c ${.IMPSRC} + ${OBJC} ${OBJCFLAGS} -c ${.IMPSRC} -o ${.TARGET} ${CTFCONVERT_CMD} .p.o: - ${PC} ${PFLAGS} -c ${.IMPSRC} + ${PC} ${PFLAGS} -c ${.IMPSRC} -o ${.TARGET} ${CTFCONVERT_CMD} .e .r .F .f: @@ -259,14 +266,15 @@ YFLAGS ?= -d -o ${.TARGET} .e.o .r.o .F.o .f.o: - ${FC} ${RFLAGS} ${EFLAGS} ${FFLAGS} -c ${.IMPSRC} + ${FC} ${RFLAGS} ${EFLAGS} ${FFLAGS} -c ${.IMPSRC} -o ${.TARGET} .S.o: - ${CC} ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} + ${CC} ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET} ${CTFCONVERT_CMD} .asm.o: - ${CC} -x assembler-with-cpp ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} + ${CC} -x assembler-with-cpp ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} \ + -o ${.TARGET} ${CTFCONVERT_CMD} .s.o: @@ -317,6 +325,21 @@ YFLAGS ?= -d rm -f ${.PREFIX}.tmp.c ${CTFCONVERT_CMD} + +# Some options we need now +__DEFAULT_NO_OPTIONS= \ + DIRDEPS_CACHE \ + META_MODE \ + META_FILES \ + + +__DEFAULT_DEPENDENT_OPTIONS= \ + AUTO_OBJ/META_MODE \ + STAGING/META_MODE \ + SYSROOT/META_MODE + +.include + # Set any local definitions first. Place this early, but it needs # MACHINE_CPUARCH to be defined. .sinclude @@ -331,25 +354,14 @@ __MAKE_CONF?=/etc/make.conf # inside the source tree. Needs to be after make.conf .sinclude -# Some options we need now -__DEFAULT_NO_OPTIONS+= \ - AUTO_OBJ \ - META_MODE \ - META_FILES \ - STAGING - -.include - -.if ${MK_AUTO_OBJ} == "yes" -# This needs to be done early - before .PATH is computed -.sinclude -.endif .if ${MK_META_MODE} == "yes" .sinclude -.elif ${MK_META_FILES} == "yes" +.elif ${MK_META_FILES} == "yes" && ${.MAKEFLAGS:U:M-B} == "" .MAKE.MODE= meta verbose -.else -MK_STAGING= no +.endif +.if ${MK_AUTO_OBJ} == "yes" +# This needs to be done early - before .PATH is computed +.sinclude .endif .if defined(__MAKE_SHELL) && !empty(__MAKE_SHELL)