From owner-svn-src-all@FreeBSD.ORG Fri Nov 16 01:37:26 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 50A1CE03; Fri, 16 Nov 2012 01:37:26 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 29F578FC13; Fri, 16 Nov 2012 01:37:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAG1bQAT092971; Fri, 16 Nov 2012 01:37:26 GMT (envelope-from sjg@svn.freebsd.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAG1bPdZ092958; Fri, 16 Nov 2012 01:37:25 GMT (envelope-from sjg@svn.freebsd.org) Message-Id: <201211160137.qAG1bPdZ092958@svn.freebsd.org> From: "Simon J. Gerraty" Date: Fri, 16 Nov 2012 01:37:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243115 - in head: contrib/bmake contrib/bmake/unit-tests usr.bin/bmake usr.bin/bmake/unit-tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 01:37:26 -0000 Author: sjg Date: Fri Nov 16 01:37:25 2012 New Revision: 243115 URL: http://svnweb.freebsd.org/changeset/base/243115 Log: Merge bmake-20121111 Also pay attention to MK_SHARED_TOOLCHAIN. Approved by: marcel (mentor) Added: head/contrib/bmake/unit-tests/order - copied unchanged from r243106, vendor/NetBSD/bmake/dist/unit-tests/order Modified: head/contrib/bmake/ChangeLog head/contrib/bmake/FILES head/contrib/bmake/Makefile.in head/contrib/bmake/cond.c head/contrib/bmake/make.c head/contrib/bmake/unit-tests/Makefile.in head/contrib/bmake/unit-tests/test.exp head/usr.bin/bmake/Makefile head/usr.bin/bmake/Makefile.inc head/usr.bin/bmake/unit-tests/Makefile Directory Properties: head/contrib/bmake/ (props changed) Modified: head/contrib/bmake/ChangeLog ============================================================================== --- head/contrib/bmake/ChangeLog Fri Nov 16 01:24:11 2012 (r243114) +++ head/contrib/bmake/ChangeLog Fri Nov 16 01:37:25 2012 (r243115) @@ -1,3 +1,28 @@ +2012-11-11 Simon J. Gerraty + + * Makefile.in (MAKE_VERSION): 20121111 + fix generation of bmake.cat1 + +2012-11-09 Simon J. Gerraty + + * Makefile.in (MAKE_VERSION): 20121109 + Merge with NetBSD make, pick up + o make.c: MakeBuildChild: return 0 so search continues if a + .ORDER dependency is detected. + o unit-tests/order: test the above + +2012-11-02 Simon J. Gerraty + + * Makefile.in (MAKE_VERSION): 20121102 + Merge with NetBSD make, pick up + o cond.c: allow cond_state[] to grow. + In meta mode with a very large tree, we can hit the limit + while processing dirdeps. + +2012-10-25 Simon J. Gerraty + + * Makefile.in: we need to use ${srcdir} not ${.CURDIR} + 2012-10-10 Simon J. Gerraty * Makefile.in (MAKE_VERSION): 20121010 Modified: head/contrib/bmake/FILES ============================================================================== --- head/contrib/bmake/FILES Fri Nov 16 01:24:11 2012 (r243114) +++ head/contrib/bmake/FILES Fri Nov 16 01:37:25 2012 (r243115) @@ -110,6 +110,7 @@ unit-tests/modmisc unit-tests/modorder unit-tests/modts unit-tests/modword +unit-tests/order unit-tests/phony-end unit-tests/posix unit-tests/qequals Modified: head/contrib/bmake/Makefile.in ============================================================================== --- head/contrib/bmake/Makefile.in Fri Nov 16 01:24:11 2012 (r243114) +++ head/contrib/bmake/Makefile.in Fri Nov 16 01:37:25 2012 (r243115) @@ -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.174 2012/10/10 18:46:24 sjg Exp $ +# $Id: Makefile.in,v 1.178 2012/11/15 16:48:59 sjg Exp $ PROG= bmake SRCS= arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c \ @@ -21,7 +21,7 @@ srcdir= @srcdir@ CC?= @CC@ # Base version on src date -MAKE_VERSION= 20121010 +MAKE_VERSION= 20121111 MACHINE=@machine@ MACHINE_ARCH=@machine_arch@ DEFAULT_SYS_PATH = @default_sys_path@ @@ -114,7 +114,7 @@ ${MAN}: make.1 my.history @echo making ${PROG}.1 @sed -e 's/^.Nx/NetBSD/' -e '/^.Nm/s/make/${PROG}/' \ -e '/^.Sh HISTORY/rmy.history' \ - -e '/^.Sh HISTORY/,$$s,^.Nm,make,' ${.CURDIR}/make.1 > $@ + -e '/^.Sh HISTORY/,$$s,^.Nm,make,' ${srcdir}/make.1 > $@ .endif Modified: head/contrib/bmake/cond.c ============================================================================== --- head/contrib/bmake/cond.c Fri Nov 16 01:24:11 2012 (r243114) +++ head/contrib/bmake/cond.c Fri Nov 16 01:37:25 2012 (r243115) @@ -1,4 +1,4 @@ -/* $NetBSD: cond.c,v 1.64 2012/06/12 19:21:50 joerg Exp $ */ +/* $NetBSD: cond.c,v 1.67 2012/11/03 13:59:27 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: cond.c,v 1.64 2012/06/12 19:21:50 joerg Exp $"; +static char rcsid[] = "$NetBSD: cond.c,v 1.67 2012/11/03 13:59:27 christos Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)cond.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: cond.c,v 1.64 2012/06/12 19:21:50 joerg Exp $"); +__RCSID("$NetBSD: cond.c,v 1.67 2012/11/03 13:59:27 christos Exp $"); #endif #endif /* not lint */ #endif @@ -1227,7 +1227,8 @@ do_Cond_EvalExpression(Boolean *value) int Cond_Eval(char *line) { - #define MAXIF 128 /* maximum depth of .if'ing */ +#define MAXIF 128 /* maximum depth of .if'ing */ +#define MAXIF_BUMP 32 /* how much to grow by */ enum if_states { IF_ACTIVE, /* .if or .elif part active */ ELSE_ACTIVE, /* .else part active */ @@ -1235,7 +1236,8 @@ Cond_Eval(char *line) SKIP_TO_ELSE, /* has been true, but not seen '.else' */ SKIP_TO_ENDIF /* nothing else to execute */ }; - static enum if_states cond_state[MAXIF + 1] = { IF_ACTIVE }; + static enum if_states *cond_state = NULL; + static unsigned int max_if_depth = MAXIF; const struct If *ifp; Boolean isElif; @@ -1244,7 +1246,10 @@ Cond_Eval(char *line) enum if_states state; level = PARSE_FATAL; - + if (!cond_state) { + cond_state = bmake_malloc(max_if_depth * sizeof(*cond_state)); + cond_state[0] = IF_ACTIVE; + } /* skip leading character (the '.') and any whitespace */ for (line++; *line == ' ' || *line == '\t'; line++) continue; @@ -1261,8 +1266,6 @@ Cond_Eval(char *line) } /* Return state for previous conditional */ cond_depth--; - if (cond_depth > MAXIF) - return COND_SKIP; return cond_state[cond_depth] <= ELSE_ACTIVE ? COND_PARSE : COND_SKIP; } @@ -1275,8 +1278,6 @@ Cond_Eval(char *line) return COND_PARSE; } - if (cond_depth > MAXIF) - return COND_SKIP; state = cond_state[cond_depth]; switch (state) { case SEARCH_FOR_ELIF: @@ -1325,9 +1326,6 @@ Cond_Eval(char *line) Parse_Error(level, "if-less elif"); return COND_PARSE; } - if (cond_depth > MAXIF) - /* Error reported when we saw the .if ... */ - return COND_SKIP; state = cond_state[cond_depth]; if (state == SKIP_TO_ENDIF || state == ELSE_ACTIVE) { Parse_Error(PARSE_WARNING, "extra elif"); @@ -1341,10 +1339,15 @@ Cond_Eval(char *line) } } else { /* Normal .if */ - if (cond_depth >= MAXIF) { - cond_depth++; - Parse_Error(PARSE_FATAL, "Too many nested if's. %d max.", MAXIF); - return COND_SKIP; + if (cond_depth + 1 >= max_if_depth) { + /* + * This is rare, but not impossible. + * In meta mode, dirdeps.mk (only runs at level 0) + * can need more than the default. + */ + max_if_depth += MAXIF_BUMP; + cond_state = bmake_realloc(cond_state, max_if_depth * + sizeof(*cond_state)); } state = cond_state[cond_depth]; cond_depth++; Modified: head/contrib/bmake/make.c ============================================================================== --- head/contrib/bmake/make.c Fri Nov 16 01:24:11 2012 (r243114) +++ head/contrib/bmake/make.c Fri Nov 16 01:37:25 2012 (r243115) @@ -1,4 +1,4 @@ -/* $NetBSD: make.c,v 1.87 2012/06/12 19:21:51 joerg Exp $ */ +/* $NetBSD: make.c,v 1.88 2012/11/09 18:53:05 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: make.c,v 1.87 2012/06/12 19:21:51 joerg Exp $"; +static char rcsid[] = "$NetBSD: make.c,v 1.88 2012/11/09 18:53:05 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)make.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: make.c,v 1.87 2012/06/12 19:21:51 joerg Exp $"); +__RCSID("$NetBSD: make.c,v 1.88 2012/11/09 18:53:05 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -1032,7 +1032,7 @@ MakeBuildChild(void *v_cn, void *toBeMad if (cn->order_pred && Lst_ForEach(cn->order_pred, MakeCheckOrder, 0)) { /* Can't build this (or anything else in this child list) yet */ cn->made = DEFERRED; - return 1; + return 0; /* but keep looking */ } if (DEBUG(MAKE)) @@ -1055,7 +1055,7 @@ MakeBuildChild(void *v_cn, void *toBeMad return cn->type & OP_WAIT && cn->unmade > 0; } -/* When a .ORDER RHS node completes we do this on each LHS */ +/* When a .ORDER LHS node completes we do this on each RHS */ static int MakeBuildParent(void *v_pn, void *toBeMade_next) { Modified: head/contrib/bmake/unit-tests/Makefile.in ============================================================================== --- head/contrib/bmake/unit-tests/Makefile.in Fri Nov 16 01:24:11 2012 (r243114) +++ head/contrib/bmake/unit-tests/Makefile.in Fri Nov 16 01:37:25 2012 (r243115) @@ -1,6 +1,6 @@ -# $Id: Makefile.in,v 1.38 2012/06/19 23:38:48 sjg Exp $ +# $Id: Makefile.in,v 1.39 2012/11/09 19:16:10 sjg Exp $ # -# $NetBSD: Makefile,v 1.34 2012/06/19 23:25:53 sjg Exp $ +# $NetBSD: Makefile,v 1.35 2012/11/09 19:08:28 sjg Exp $ # # Unit tests for make(1) # The main targets are: @@ -40,6 +40,7 @@ SUBFILES= \ modorder \ modts \ modword \ + order \ phony-end \ posix \ qequals \ @@ -52,6 +53,7 @@ SUBFILES= \ all: ${SUBFILES} flags.doterror= +flags.order=-j1 # the tests are actually done with sub-makes. .PHONY: ${SUBFILES} Copied: head/contrib/bmake/unit-tests/order (from r243106, vendor/NetBSD/bmake/dist/unit-tests/order) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/bmake/unit-tests/order Fri Nov 16 01:37:25 2012 (r243115, copy of r243106, vendor/NetBSD/bmake/dist/unit-tests/order) @@ -0,0 +1,20 @@ +# $NetBSD: order,v 1.1 2012/11/09 19:08:28 sjg Exp $ + +# Test that .ORDER is handled correctly. +# The explicit dependency the.o: the.h will make us examine the.h +# the .ORDER will prevent us building it immediately, +# we should then examine the.c rather than stop. + +all: the.o + +.ORDER: the.c the.h + +the.c the.h: + @echo Making $@ + +.SUFFIXES: .o .c + +.c.o: + @echo Making $@ from $? + +the.o: the.h Modified: head/contrib/bmake/unit-tests/test.exp ============================================================================== --- head/contrib/bmake/unit-tests/test.exp Fri Nov 16 01:24:11 2012 (r243114) +++ head/contrib/bmake/unit-tests/test.exp Fri Nov 16 01:37:25 2012 (r243115) @@ -310,6 +310,9 @@ LIST:tw:C/ /,/g="one two three four five LIST:tw:C/ /,/1g="one two three four five six" LIST:tw:tW:C/ /,/="one,two three four five six" LIST:tW:tw:C/ /,/="one two three four five six" +Making the.c +Making the.h +Making the.o from the.h the.c .TARGET="phony" .PREFIX="phony" .IMPSRC="" .TARGET="all" .PREFIX="all" .IMPSRC="" .TARGET="ok" .PREFIX="ok" .IMPSRC="" Modified: head/usr.bin/bmake/Makefile ============================================================================== --- head/usr.bin/bmake/Makefile Fri Nov 16 01:24:11 2012 (r243114) +++ head/usr.bin/bmake/Makefile Fri Nov 16 01:37:25 2012 (r243115) @@ -13,7 +13,7 @@ CFLAGS+= -I${.CURDIR} # $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.174 2012/10/10 18:46:24 sjg Exp $ +# $Id: Makefile.in,v 1.178 2012/11/15 16:48:59 sjg Exp $ PROG?= ${.CURDIR:T} SRCS= arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c \ @@ -33,7 +33,7 @@ srcdir= ${SRCTOP}/contrib/bmake CC?= gcc # Base version on src date -MAKE_VERSION= 20121010 +MAKE_VERSION= 20121111 DEFAULT_SYS_PATH = .../share/mk:/usr/share/mk CPPFLAGS+= Modified: head/usr.bin/bmake/Makefile.inc ============================================================================== --- head/usr.bin/bmake/Makefile.inc Fri Nov 16 01:24:11 2012 (r243114) +++ head/usr.bin/bmake/Makefile.inc Fri Nov 16 01:37:25 2012 (r243115) @@ -11,4 +11,8 @@ PROG= make .endif +.if ${MK_SHARED_TOOLCHAIN} == "no" +NO_SHARED?= YES +.endif + WARNS=3 Modified: head/usr.bin/bmake/unit-tests/Makefile ============================================================================== --- head/usr.bin/bmake/unit-tests/Makefile Fri Nov 16 01:24:11 2012 (r243114) +++ head/usr.bin/bmake/unit-tests/Makefile Fri Nov 16 01:37:25 2012 (r243115) @@ -5,9 +5,9 @@ SRCTOP?= ${.CURDIR:H:H:H} -# $Id: Makefile.in,v 1.38 2012/06/19 23:38:48 sjg Exp $ +# $Id: Makefile.in,v 1.39 2012/11/09 19:16:10 sjg Exp $ # -# $NetBSD: Makefile,v 1.34 2012/06/19 23:25:53 sjg Exp $ +# $NetBSD: Makefile,v 1.35 2012/11/09 19:08:28 sjg Exp $ # # Unit tests for make(1) # The main targets are: @@ -47,6 +47,7 @@ SUBFILES= \ modorder \ modts \ modword \ + order \ phony-end \ posix \ qequals \ @@ -59,6 +60,7 @@ SUBFILES= \ all: ${SUBFILES} flags.doterror= +flags.order=-j1 # the tests are actually done with sub-makes. .PHONY: ${SUBFILES}