Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Nov 2015 22:50:23 +0000 (UTC)
From:      "Simon J. Gerraty" <sjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r290956 - head/share/mk
Message-ID:  <201511162250.tAGMoNHF093936@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sjg
Date: Mon Nov 16 22:50:23 2015
New Revision: 290956
URL: https://svnweb.freebsd.org/changeset/base/290956

Log:
  Default MK_META_MODE from MK_DIRDEPS_BUILD
  
  This allows most of the build to simply consider MK_META_MODE
  
  Update to latest dirdeps.mk so we can do:
  
  make -f dirdeps.mk bin/cat.i386
  
  Reviewed by:	bdrewery

Modified:
  head/share/mk/dirdeps.mk
  head/share/mk/local.gendirdeps.mk
  head/share/mk/sys.mk

Modified: head/share/mk/dirdeps.mk
==============================================================================
--- head/share/mk/dirdeps.mk	Mon Nov 16 22:40:49 2015	(r290955)
+++ head/share/mk/dirdeps.mk	Mon Nov 16 22:50:23 2015	(r290956)
@@ -1,5 +1,5 @@
 # $FreeBSD$
-# $Id: dirdeps.mk,v 1.54 2015/06/08 20:55:11 sjg Exp $
+# $Id: dirdeps.mk,v 1.55 2015/10/20 22:04:53 sjg Exp $
 
 # Copyright (c) 2010-2013, Juniper Networks, Inc.
 # All rights reserved.
@@ -243,6 +243,21 @@ DEP_${TARGET_SPEC_VARS:[$i]} := ${_tspec
 DEP_MACHINE := ${_DEP_TARGET_SPEC}
 .endif
 
+.if ${MAKEFILE:T} == ${.PARSEFILE} && empty(DIRDEPS) && ${.TARGETS:Uall:M*/*} != ""
+# This little trick let's us do
+#
+# mk -f dirdeps.mk some/dir.${TARGET_SPEC}
+#
+all:
+${.TARGETS:Nall}: all
+DIRDEPS := ${.TARGETS:M*/*}
+# so that -DNO_DIRDEPS works
+DEP_RELDIR := ${DIRDEPS:R:[1]}
+# disable DIRDEPS_CACHE as it does not like this trick
+MK_DIRDEPS_CACHE = no
+.endif
+
+
 # pickup customizations
 # as below you can use !target(_DIRDEP_USE) to protect things
 # which should only be done once.

Modified: head/share/mk/local.gendirdeps.mk
==============================================================================
--- head/share/mk/local.gendirdeps.mk	Mon Nov 16 22:40:49 2015	(r290955)
+++ head/share/mk/local.gendirdeps.mk	Mon Nov 16 22:50:23 2015	(r290956)
@@ -6,6 +6,7 @@ GENDIRDEPS_HEADER= echo '\# ${FreeBSD:L:
 # supress optional/auto dependecies
 # local.dirdeps.mk will put them in if necessary
 GENDIRDEPS_FILTER+= \
+	Nbin/cat.host \
 	Ngnu/lib/libssp/libssp_nonshared \
 	Ncddl/usr.bin/ctf* \
 	Nlib/clang/include \

Modified: head/share/mk/sys.mk
==============================================================================
--- head/share/mk/sys.mk	Mon Nov 16 22:40:49 2015	(r290955)
+++ head/share/mk/sys.mk	Mon Nov 16 22:50:23 2015	(r290956)
@@ -19,13 +19,12 @@ MACHINE_CPUARCH=${MACHINE_ARCH:C/mips(n3
 
 # Some options we need now
 __DEFAULT_NO_OPTIONS= \
-	DIRDEPS_CACHE \
 	DIRDEPS_BUILD \
-	META_MODE \
-
+	DIRDEPS_CACHE
 
 __DEFAULT_DEPENDENT_OPTIONS= \
 	AUTO_OBJ/DIRDEPS_BUILD \
+	META_MODE/DIRDEPS_BUILD \
 	STAGING/DIRDEPS_BUILD \
 	SYSROOT/DIRDEPS_BUILD
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201511162250.tAGMoNHF093936>