Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Jul 2012 00:03:45 +0000 (UTC)
From:      "David E. O'Brien" <obrien@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org
Subject:   svn commit: r238152 - vendor/NetBSD/bmake/dist
Message-ID:  <201207060003.q6603jYA027272@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: obrien
Date: Fri Jul  6 00:03:45 2012
New Revision: 238152
URL: http://svn.freebsd.org/changeset/base/238152

Log:
  Import the 20120704 release of the "Portable" BSD make tool (from NetBSD).
  
  Submitted by:	Simon Gerraty <sjg@juniper.net>

Modified:
  vendor/NetBSD/bmake/dist/ChangeLog
  vendor/NetBSD/bmake/dist/Makefile.in
  vendor/NetBSD/bmake/dist/bsd.after-import.mk
  vendor/NetBSD/bmake/dist/job.c
  vendor/NetBSD/bmake/dist/meta.c

Modified: vendor/NetBSD/bmake/dist/ChangeLog
==============================================================================
--- vendor/NetBSD/bmake/dist/ChangeLog	Thu Jul  5 23:36:17 2012	(r238151)
+++ vendor/NetBSD/bmake/dist/ChangeLog	Fri Jul  6 00:03:45 2012	(r238152)
@@ -1,3 +1,19 @@
+2012-07-04  Simon J. Gerraty  <sjg@bad.crufty.net>
+
+	* Makefile.in (MAKE_VERSION): bump version to 20120704
+	  Merge with NetBSD make, pick up
+	  o Job_ParseShell should call Shell_Init if it has been
+	    previously called.
+	* Makefile.in: set USE_META based on configure result.
+	  also .PARSEDIR is safer indicator of bmake.
+
+2012-06-26  Simon J. Gerraty  <sjg@bad.crufty.net>
+
+	* Makefile.in: bump version to 20120626
+	  ensure CPPFLAGS is in CFLAGS
+	* meta.c: avoid nested externs
+	* bsd.after-import.mk: avoid ${.CURDIR}/Makefile as target
+	
 2012-06-20  Simon J. Gerraty  <sjg@bad.crufty.net>
 
 	* Makefile.in (MAKE_VERSION): bump version to 20120620

Modified: vendor/NetBSD/bmake/dist/Makefile.in
==============================================================================
--- vendor/NetBSD/bmake/dist/Makefile.in	Thu Jul  5 23:36:17 2012	(r238151)
+++ vendor/NetBSD/bmake/dist/Makefile.in	Fri Jul  6 00:03:45 2012	(r238152)
@@ -1,7 +1,7 @@
 #	$NetBSD: Makefile,v 1.56 2012/05/30 21:54:23 sjg Exp $
 #	@(#)Makefile	5.2 (Berkeley) 12/28/90
 
-#	$Id: Makefile.in,v 1.164 2012/06/20 22:44:26 sjg Exp $
+#	$Id: Makefile.in,v 1.168 2012/07/05 04:10:23 sjg Exp $
 
 PROG=	bmake
 SRCS=	arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c \
@@ -21,13 +21,15 @@ srcdir= @srcdir@
 CC?= @CC@
 
 # Base version on src date
-MAKE_VERSION= 20120620
+MAKE_VERSION= 20120704
 MACHINE=@machine@
 MACHINE_ARCH=@machine_arch@
 DEFAULT_SYS_PATH = @default_sys_path@
 
+CPPFLAGS+= @CPPFLAGS@
+CFLAGS+= ${CPPFLAGS}
 CFLAGS+= -D_PATH_DEFSYSPATH=\"${DEFAULT_SYS_PATH}\"
-CFLAGS+= -I. -I${srcdir} @DEFS@ @CPPFLAGS@ ${XDEFS} -DMAKE_NATIVE
+CFLAGS+= -I. -I${srcdir} @DEFS@ ${XDEFS} -DMAKE_NATIVE
 CFLAGS+= ${CFLAGS_${.TARGET:T}} 
 CFLAGS+= ${COPTS.${.ALLSRC:M*.c:T:u}}
 COPTS.main.c+= "-DMAKE_VERSION=\"${MAKE_VERSION}\""
@@ -39,7 +41,7 @@ LDADD= @LIBS@
 SRCS+= ${LIBOBJS:T:.o=.c}
 .endif
 
-USE_META ?= @use_meta@
+USE_META = @use_meta@
 .if ${USE_META} != "no"
 SRCS+=	meta.c
 CPPFLAGS+= -DUSE_META
@@ -83,7 +85,7 @@ SRCS+= sigcompat.c
 CFLAGS+= -DSIGNAL_FLAGS=SA_RESTART
 .endif
 .endif
-.if defined(.MAKE.LEVEL)
+.if defined(.PARSEDIR)
 .if make(obj) || make(clean)
 SUBDIR+= unit-tests
 .endif
@@ -134,7 +136,7 @@ _mfromdir=${srcdir}
 # sigh, FreeBSD at least includes bsd.subdir.mk via bsd.obj.mk
 # so the inclusion below, results in complaints about re-defined
 # targets.  For NetBSD though we need to explicitly include it.
-.if defined(.MAKE.LEVEL)
+.if defined(.PARSEDIR)
 .if defined(SUBDIR) && !target(${SUBDIR:[1]})
 .-include <bsd.subdir.mk>
 .endif

Modified: vendor/NetBSD/bmake/dist/bsd.after-import.mk
==============================================================================
--- vendor/NetBSD/bmake/dist/bsd.after-import.mk	Thu Jul  5 23:36:17 2012	(r238151)
+++ vendor/NetBSD/bmake/dist/bsd.after-import.mk	Fri Jul  6 00:03:45 2012	(r238152)
@@ -1,4 +1,4 @@
-# $Id: bsd.after-import.mk,v 1.5 2012/06/20 22:45:07 sjg Exp $
+# $Id: bsd.after-import.mk,v 1.6 2012/06/27 18:23:32 sjg Exp $
 
 # This makefile is for use when integrating bmake into a BSD build
 # system.  Use this makefile after importing bmake.
@@ -9,7 +9,7 @@
 # The goal is to allow the benefits of autoconf without
 # the overhead of running configure.
 
-all: ${.CURDIR}/Makefile
+all: _makefile
 all: after-import
 
 # we rely on bmake
@@ -79,8 +79,8 @@ after-import: bootstrap ${MAKEFILE}
 .endfor
 
 # this needs the most work
-${.CURDIR}/Makefile:	bootstrap ${MAKEFILE} .PRECIOUS
-	@echo Generating ${.TARGET:T}
+_makefile:	bootstrap ${MAKEFILE}
+	@echo Generating ${.CURDIR}/Makefile
 	@(echo '# This is a generated file, do NOT edit!'; \
 	echo '# See ${_this:S,${SRCTOP}/,,}'; \
 	echo '#'; echo '# $$${OS}$$'; echo; \
@@ -97,8 +97,9 @@ ${.CURDIR}/Makefile:	bootstrap ${MAKEFIL
 	echo; echo 'after-import: ${_this:S,${SRCTOP},\${SRCTOP},}'; \
 	echo '	cd $${.CURDIR} && $${.MAKE} -f ${_this:S,${SRCTOP},\${SRCTOP},}'; \
 	echo; echo '.sinclude "Makefile.inc"'; \
-	echo ) > ${.TARGET:T}.new
-	@mv ${.TARGET:T}.new ${.TARGET}
+	echo ) > ${.TARGET}
+	@cmp -s ${.TARGET} ${.CURDIR}/Makefile || \
+	    mv ${.TARGET} ${.CURDIR}/Makefile
 
 .include <bsd.obj.mk>
 

Modified: vendor/NetBSD/bmake/dist/job.c
==============================================================================
--- vendor/NetBSD/bmake/dist/job.c	Thu Jul  5 23:36:17 2012	(r238151)
+++ vendor/NetBSD/bmake/dist/job.c	Fri Jul  6 00:03:45 2012	(r238152)
@@ -1,4 +1,4 @@
-/*	$NetBSD: job.c,v 1.162 2012/06/12 19:21:50 joerg Exp $	*/
+/*	$NetBSD: job.c,v 1.163 2012/07/03 21:03:40 sjg Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: job.c,v 1.162 2012/06/12 19:21:50 joerg Exp $";
+static char rcsid[] = "$NetBSD: job.c,v 1.163 2012/07/03 21:03:40 sjg Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)job.c	8.2 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: job.c,v 1.162 2012/06/12 19:21:50 joerg Exp $");
+__RCSID("$NetBSD: job.c,v 1.163 2012/07/03 21:03:40 sjg Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -2441,7 +2441,7 @@ Job_ParseShell(char *line)
 	 * If no path was given, the user wants one of the pre-defined shells,
 	 * yes? So we find the one s/he wants with the help of JobMatchShell
 	 * and set things up the right way. shellPath will be set up by
-	 * Job_Init.
+	 * Shell_Init.
 	 */
 	if (newShell.name == NULL) {
 	    Parse_Error(PARSE_FATAL, "Neither path nor name specified");
@@ -2456,6 +2456,12 @@ Job_ParseShell(char *line)
 	    }
 	    commandShell = sh;
 	    shellName = newShell.name;
+	    if (shellPath) {
+		/* Shell_Init has already been called!  Do it again. */
+		free(UNCONST(shellPath));
+		shellPath = NULL;
+		Shell_Init();
+	    }
 	}
     } else {
 	/*

Modified: vendor/NetBSD/bmake/dist/meta.c
==============================================================================
--- vendor/NetBSD/bmake/dist/meta.c	Thu Jul  5 23:36:17 2012	(r238151)
+++ vendor/NetBSD/bmake/dist/meta.c	Fri Jul  6 00:03:45 2012	(r238152)
@@ -1,4 +1,4 @@
-/*      $NetBSD: meta.c,v 1.24 2011/09/21 14:30:47 christos Exp $ */
+/*      $NetBSD: meta.c,v 1.25 2012/06/27 17:22:58 sjg Exp $ */
 
 /*
  * Implement 'meta' mode.
@@ -68,6 +68,7 @@ static Boolean metaSilent = FALSE;	/* if
 
 extern Boolean forceJobs;
 extern Boolean comatMake;
+extern char    **environ;
 
 #define	MAKE_META_PREFIX	".MAKE.META.PREFIX"
 
@@ -388,7 +389,6 @@ printCMD(void *cmdp, void *mfpp)
 static FILE *
 meta_create(BuildMon *pbm, GNode *gn)
 {
-    extern char **environ;
     meta_file_t mf;
     char buf[MAXPATHLEN];
     char objdir[MAXPATHLEN];



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