diff options
author | David E. O'Brien <obrien@FreeBSD.org> | 2012-07-06 00:03:45 +0000 |
---|---|---|
committer | David E. O'Brien <obrien@FreeBSD.org> | 2012-07-06 00:03:45 +0000 |
commit | e6157a0b0c42090cb8be77e98726580fe22fc113 (patch) | |
tree | 01dd4b913a6c8ab04560ba6046a5c453f4c8a8c0 | |
parent | 0fae4a3feb6507525100ba80841fb42e993656b0 (diff) | |
download | src-test2-e6157a0b0c42090cb8be77e98726580fe22fc113.tar.gz src-test2-e6157a0b0c42090cb8be77e98726580fe22fc113.zip |
Notes
-rw-r--r-- | ChangeLog | 16 | ||||
-rw-r--r-- | Makefile.in | 14 | ||||
-rw-r--r-- | bsd.after-import.mk | 13 | ||||
-rw-r--r-- | job.c | 14 | ||||
-rw-r--r-- | meta.c | 4 |
5 files changed, 43 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog index be0cdc0a81a5..3f82c8d0ae89 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/Makefile.in b/Makefile.in index 8a56756ee14e..5a1f00487299 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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 diff --git a/bsd.after-import.mk b/bsd.after-import.mk index 255a24c68607..e87026fbf146 100644 --- a/bsd.after-import.mk +++ b/bsd.after-import.mk @@ -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> @@ -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 { /* @@ -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]; |