Merge in the Bmake 20120705 release.

This commit is contained in:
David E. O'Brien 2012-07-06 00:09:29 +00:00
commit 40a23d7100
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/projects/bmake/; revision=238156
5 changed files with 43 additions and 18 deletions

View File

@ -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

View File

@ -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

View File

@ -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 ${MAKEFILE} .PRECIOUS
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>

View File

@ -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 {
/*

View File

@ -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 we have a .meta be SILENT */
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];