From owner-freebsd-current@FreeBSD.ORG Sat Dec 24 00:42:08 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 527751065701; Sat, 24 Dec 2011 00:42:08 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id EB65B8FC14; Sat, 24 Dec 2011 00:42:07 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so13484284vcb.13 for ; Fri, 23 Dec 2011 16:42:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=/T0DQIOb3/vFZwbHb4aOFgoDkLgT/Y3X4Zujh79YIX8=; b=aZZ5JMvh6hOQy4jIaRMBUxAiMVKDvZuqZNgJ44syGHSuk4FLhoxL4jRkKuq5R1Liff oEjCWNQEenov441kDDan6aVBHEx00nJ/gRX2HI13mShcIspVw7MfxQPVMmTy+P/5fuRP 7t2p9PV59VqdnyUpo8QlmtdBW2yZ60PCcPzko= MIME-Version: 1.0 Received: by 10.220.149.193 with SMTP id u1mr10261983vcv.33.1324687326815; Fri, 23 Dec 2011 16:42:06 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.36.5 with HTTP; Fri, 23 Dec 2011 16:42:06 -0800 (PST) Date: Fri, 23 Dec 2011 16:42:06 -0800 X-Google-Sender-Auth: 4sxQOnSIjjKDM-JjmY2PSRt8OBs Message-ID: From: Adrian Chadd To: freebsd-arch@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-current Subject: [patch] bsdbox changes for base system: add LOCAL_ X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 00:42:08 -0000 Hi, Here are two patches which implement some useful features for crunch building: * Add LOCAL_TOOLS_DIR in src/Makefile.inc1, which adds entries to the 'build-tools' target. This is needed for cross-building bsdbox (and any external directory added by LOCAL_DIRS) * If CRUNCH_SUPPRESS_ALL_LINKS is set to 'yes', don't auto-populate the crunch-gen hard links. I may end up changing the latter to CRUNCH_GENERATE_LINKS and default that to yes, then allow the bsdbox build system to change that to 'no', but the intent is the same. I'd like to commit this tomorrow if possible, so I can then follow it up with the bsdbox import. Thanks, Adrian [adrian@pcbsd-macvm] ~/work/freebsd/head/src> svn diff Makefile.inc1 share/mk Index: Makefile.inc1 =================================================================== --- Makefile.inc1 (revision 228757) +++ Makefile.inc1 (working copy) @@ -15,6 +15,8 @@ # -DNO_WWWUPDATE do not update www in ${MAKE} update # -DNO_CTF do not run the DTrace CTF conversion tools on built objects # LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list +# LOCAL_TOOL_DIRS="list of dirs" to add additional dirs to the build-tools +# list # TARGET="machine" to crossbuild world for a different machine type # TARGET_ARCH= may be required when a TARGET supports multiple endians @@ -104,6 +106,8 @@ CLEANDIR= cleandir .endif +LOCAL_TOOL_DIRS?= '' + CVS?= cvs CVSFLAGS?= -A -P -d -I! SVN?= svn @@ -1102,6 +1106,7 @@ bin/csh \ bin/sh \ ${_rescue} \ + ${LOCAL_TOOL_DIRS} \ lib/ncurses/ncurses \ lib/ncurses/ncursesw \ ${_share} \ Index: share/mk/bsd.crunchgen.mk =================================================================== --- share/mk/bsd.crunchgen.mk (revision 228757) +++ share/mk/bsd.crunchgen.mk (working copy) @@ -22,6 +22,8 @@ # Specific links can be suppressed by setting # CRUNCH_SUPPRESS_LINK_$(NAME) to 1. # +# If CRUNCH_SUPPRESS_ALL_LINKS is set to yes, no links will be generated. +# # $FreeBSD$ @@ -39,6 +41,7 @@ .else CANONICALOBJDIR:= /usr/obj${.CURDIR} .endif +CRUNCH_SUPPRESS_ALL_LINKS?= no CLEANFILES+= $(CONF) *.o *.lo *.c *.mk *.cache *.a *.h @@ -51,6 +54,7 @@ .else $(OUTPUTS): $(.CURDIR)/../../$(D)/$(P)/Makefile .endif +.if ${CRUNCH_SUPPRESS_ALL_LINKS} != "yes" .ifndef CRUNCH_SUPPRESS_LINK_${P} LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(P) .endif @@ -59,6 +63,7 @@ LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(A) .endif .endfor +.endif .endfor .endfor