Hello community, here is the log from the commit of package bmake for openSUSE:Factory checked in at 2015-10-06 13:27:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/bmake (Old) and /work/SRC/openSUSE:Factory/.bmake.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "bmake" Changes: -------- --- /work/SRC/openSUSE:Factory/bmake/bmake.changes 2015-08-07 00:24:21.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.bmake.new/bmake.changes 2015-10-06 13:27:57.000000000 +0200 @@ -1,0 +2,10 @@ +Mon Oct 5 20:26:15 UTC 2015 - [email protected] + +- Update to 20150910 + * Merge with NetBSD make, pick up + + main.c: with -w print Enter/Leaving messages for objdir too + if necessary. + + centralize shell metachar handling + * FILES: add metachar.[ch] + +------------------------------------------------------------------- Old: ---- bmake-20150606.tar.gz New: ---- bmake-20150910.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ bmake.spec ++++++ --- /var/tmp/diff_new_pack.iIebLC/_old 2015-10-06 13:27:58.000000000 +0200 +++ /var/tmp/diff_new_pack.iIebLC/_new 2015-10-06 13:27:58.000000000 +0200 @@ -17,7 +17,7 @@ Name: bmake -Version: 20150606 +Version: 20150910 Release: 0 Summary: The NetBSD make(1) tool License: BSD-2-Clause and BSD-3-Clause and BSD-4-Clause ++++++ bmake-20150606.tar.gz -> bmake-20150910.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/ChangeLog new/bmake/ChangeLog --- old/bmake/ChangeLog 2015-06-07 18:07:34.000000000 +0200 +++ new/bmake/ChangeLog 2015-09-10 20:08:42.000000000 +0200 @@ -1,3 +1,13 @@ +2015-09-10 Simon J. Gerraty <[email protected]> + + * Makefile (MAKE_VERSION): 20150910 + Merge with NetBSD make, pick up + o main.c: with -w print Enter/Leaving messages for objdir too + if necessary. + o centralize shell metachar handling + + * FILES: add metachar.[ch] + 2015-06-06 Simon J. Gerraty <[email protected]> * Makefile (MAKE_VERSION): 20150606 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/FILES new/bmake/FILES --- old/bmake/FILES 2015-05-05 23:58:50.000000000 +0200 +++ new/bmake/FILES 2015-09-10 20:08:12.000000000 +0200 @@ -71,6 +71,8 @@ makefile.in meta.c meta.h +metachar.c +metachar.h missing/sys/cdefs.h mkdeps.sh nonints.h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/Makefile new/bmake/Makefile --- old/bmake/Makefile 2015-06-07 18:07:34.000000000 +0200 +++ new/bmake/Makefile 2015-09-10 20:09:04.000000000 +0200 @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.39 2015/06/07 15:54:37 sjg Exp $ +# $Id: Makefile,v 1.41 2015/09/10 18:09:04 sjg Exp $ # Base version on src date -MAKE_VERSION= 20150606 +MAKE_VERSION= 20150910 PROG= bmake @@ -18,6 +18,7 @@ make.c \ make_malloc.c \ meta.c \ + metachar.c \ parse.c \ str.c \ strlist.c \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/compat.c new/bmake/compat.c --- old/bmake/compat.c 2014-11-06 02:48:15.000000000 +0100 +++ new/bmake/compat.c 2015-09-10 20:03:31.000000000 +0200 @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.96 2014/09/07 20:55:34 joerg Exp $ */ +/* $NetBSD: compat.c,v 1.100 2015/06/19 14:32:04 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: compat.c,v 1.96 2014/09/07 20:55:34 joerg Exp $"; +static char rcsid[] = "$NetBSD: compat.c,v 1.100 2015/06/19 14:32:04 christos Exp $"; #else #include <sys/cdefs.h> #ifndef lint #if 0 static char sccsid[] = "@(#)compat.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: compat.c,v 1.96 2014/09/07 20:55:34 joerg Exp $"); +__RCSID("$NetBSD: compat.c,v 1.100 2015/06/19 14:32:04 christos Exp $"); #endif #endif /* not lint */ #endif @@ -111,37 +111,14 @@ #include "hash.h" #include "dir.h" #include "job.h" +#include "metachar.h" #include "pathnames.h" -/* - * The following array is used to make a fast determination of which - * characters are interpreted specially by the shell. If a command - * contains any of these characters, it is executed by the shell, not - * directly by us. - */ - -static char meta[256]; static GNode *curTarg = NULL; static GNode *ENDNode; static void CompatInterrupt(int); -static void -Compat_Init(void) -{ - const char *cp; - - Shell_Init(); /* setup default shell */ - - for (cp = "~#=|^(){};&<>*?[]:$`\\\n"; *cp != '\0'; cp++) { - meta[(unsigned char) *cp] = 1; - } - /* - * The null character serves as a sentinel in the string. - */ - meta[0] = 1; -} - /*- *----------------------------------------------------------------------- * CompatInterrupt -- @@ -271,8 +248,8 @@ break; case '+': doIt = TRUE; - if (!meta[0]) /* we came here from jobs */ - Compat_Init(); + if (!shellName) /* we came here from jobs */ + Shell_Init(); break; } cmd++; @@ -300,11 +277,13 @@ * Search for meta characters in the command. If there are no meta * characters, there's no need to execute a shell to execute the * command. + * + * Additionally variable assignments and empty commands + * go to the shell. Therefore treat '=' and ':' like shell + * meta characters as documented in make(1). */ - for (cp = cmd; !meta[(unsigned char)*cp]; cp++) { - continue; - } - useShell = (*cp != '\0'); + + useShell = needshell(cmd, FALSE); #endif /* @@ -512,8 +491,8 @@ GNode *gn = (GNode *)gnp; GNode *pgn = (GNode *)pgnp; - if (!meta[0]) /* we came here from jobs */ - Compat_Init(); + if (!shellName) /* we came here from jobs */ + Shell_Init(); if (gn->made == UNMADE && (gn == pgn || (pgn->type & OP_MADE) == 0)) { /* * First mark ourselves to be made, then apply whatever transformations @@ -693,7 +672,8 @@ GNode *gn = NULL;/* Current root target */ int errors; /* Number of targets not remade due to errors */ - Compat_Init(); + if (!shellName) + Shell_Init(); if (bmake_signal(SIGINT, SIG_IGN) != SIG_IGN) { bmake_signal(SIGINT, CompatInterrupt); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/main.c new/bmake/main.c --- old/bmake/main.c 2015-04-01 17:04:04.000000000 +0200 +++ new/bmake/main.c 2015-09-10 20:03:31.000000000 +0200 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.232 2015/03/26 22:20:42 sjg Exp $ */ +/* $NetBSD: main.c,v 1.233 2015/09/10 17:15:11 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.232 2015/03/26 22:20:42 sjg Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.233 2015/09/10 17:15:11 sjg Exp $"; #else #include <sys/cdefs.h> #ifndef lint @@ -81,7 +81,7 @@ #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.232 2015/03/26 22:20:42 sjg Exp $"); +__RCSID("$NetBSD: main.c,v 1.233 2015/09/10 17:15:11 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -172,6 +172,7 @@ Boolean queryFlag; /* -q flag */ Boolean touchFlag; /* -t flag */ Boolean enterFlag; /* -w flag */ +Boolean enterFlagObj; /* -w and objdir != srcdir */ Boolean ignoreErrors; /* -i flag */ Boolean beSilent; /* -s flag */ Boolean oldVars; /* variable substitution style */ @@ -741,6 +742,8 @@ setenv("PWD", objdir, 1); Dir_InitDot(); rc = TRUE; + if (enterFlag && strcmp(objdir, curdir) != 0) + enterFlagObj = TRUE; } } @@ -1266,6 +1269,9 @@ doing_depend = FALSE; } + if (enterFlagObj) + printf("%s: Entering directory `%s'\n", progname, objdir); + MakeMode(NULL); Var_Append("MFLAGS", Var_Value(MAKEFLAGS, VAR_GLOBAL, &p1), VAR_GLOBAL); @@ -1406,6 +1412,8 @@ Trace_Log(MAKEEND, 0); + if (enterFlagObj) + printf("%s: Leaving directory `%s'\n", progname, objdir); if (enterFlag) printf("%s: Leaving directory `%s'\n", progname, curdir); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/make-bootstrap.sh.in new/bmake/make-bootstrap.sh.in --- old/bmake/make-bootstrap.sh.in 2014-01-02 21:42:07.000000000 +0100 +++ new/bmake/make-bootstrap.sh.in 2015-09-10 20:07:05.000000000 +0200 @@ -52,7 +52,7 @@ } BASE_OBJECTS="arch.o buf.o compat.o cond.o dir.o for.o getopt hash.o \ -job.o make.o make_malloc.o parse.o sigcompat.o str.o strlist.o \ +job.o make.o make_malloc.o metachar.o parse.o sigcompat.o str.o strlist.o \ suff.o targ.o trace.o var.o util.o" LST_OBJECTS="lstAppend.o lstDupl.o lstInit.o lstOpen.o \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/metachar.c new/bmake/metachar.c --- old/bmake/metachar.c 1970-01-01 01:00:00.000000000 +0100 +++ new/bmake/metachar.c 2015-09-10 19:39:39.000000000 +0200 @@ -0,0 +1,88 @@ +/* $NetBSD: metachar.c,v 1.5 2015/06/19 08:03:35 mlelstv Exp $ */ + +/*- + * Copyright (c) 2015 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#if HAVE_NBTOOL_CONFIG_H +#include "nbtool_config.h" +#endif + +#if defined(MAKE_NATIVE) || defined(HAVE_NBTOOL_CONFIG_H) +#include <sys/cdefs.h> +#endif + +#if defined(__RCSID) && !defined(lint) +__RCSID("$NetBSD: metachar.c,v 1.5 2015/06/19 08:03:35 mlelstv Exp $"); +#endif + +#include "metachar.h" +/* + * The following array is used to make a fast determination of which + * characters are interpreted specially by the shell. If a command + * contains any of these characters, it is executed by the shell, not + * directly by us. + * + * perhaps move it to ctype? + */ + +unsigned char _metachar[128] = { +// nul soh stx etx eot enq ack bel + 1, 0, 0, 0, 0, 0, 0, 0, +// bs ht nl vt np cr so si + 0, 0, 1, 0, 0, 0, 0, 0, +// dle dc1 dc2 dc3 dc4 nak syn etb + 0, 0, 0, 0, 0, 0, 0, 0, +// can em sub esc fs gs rs us + 0, 0, 0, 0, 0, 0, 0, 0, +// sp ! " # $ % & ' + 0, 1, 1, 1, 1, 0, 1, 1, +// ( ) * + , - . / + 1, 1, 1, 0, 0, 0, 0, 0, +// 0 1 2 3 4 5 6 7 + 0, 0, 0, 0, 0, 0, 0, 0, +// 8 9 : ; < = > ? + 0, 0, 0, 1, 1, 0, 1, 1, +// @ A B C D E F G + 0, 0, 0, 0, 0, 0, 0, 0, +// H I J K L M N O + 0, 0, 0, 0, 0, 0, 0, 0, +// P Q R S T U V W + 0, 0, 0, 0, 0, 0, 0, 0, +// X Y Z [ \ ] ^ _ + 0, 0, 0, 1, 1, 1, 1, 0, +// ` a b c d e f g + 1, 0, 0, 0, 0, 0, 0, 0, +// h i j k l m n o + 0, 0, 0, 0, 0, 0, 0, 0, +// p q r s t u v w + 0, 0, 0, 0, 0, 0, 0, 0, +// x y z { | } ~ del + 0, 0, 0, 1, 1, 1, 1, 0, +}; + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/metachar.h new/bmake/metachar.h --- old/bmake/metachar.h 1970-01-01 01:00:00.000000000 +0100 +++ new/bmake/metachar.h 2015-09-10 19:39:39.000000000 +0200 @@ -0,0 +1,61 @@ +/* $NetBSD: metachar.h,v 1.4 2015/06/21 20:26:02 christos Exp $ */ + +/*- + * Copyright (c) 2015 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef _METACHAR_H +#define _METACHAR_H + +#include <ctype.h> + +extern unsigned char _metachar[]; + +#define ismeta(c) _metachar[(c) & 0x7f] + +static inline int +hasmeta(const char *cmd) +{ + while (!ismeta(*cmd)) + cmd++; + + return *cmd != '\0'; +} + +static inline int +needshell(const char *cmd, int white) +{ + while (!ismeta(*cmd) && *cmd != ':' && *cmd != '=') { + if (white && isspace((unsigned char)*cmd)) + break; + cmd++; + } + + return *cmd != '\0'; +} + +#endif /* _METACHAR_H */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/mk/ChangeLog new/bmake/mk/ChangeLog --- old/bmake/mk/ChangeLog 2015-06-10 22:06:12.000000000 +0200 +++ new/bmake/mk/ChangeLog 2015-09-10 07:53:52.000000000 +0200 @@ -1,3 +1,31 @@ +2015-09-02 Simon J. Gerraty <[email protected]> + + * rst2htm.mk: allow for per target flags etc. + +2015-09-01 Simon J. Gerraty <[email protected]> + + * install-mk (MK_VERSION): 20150901 + + * doc.mk: create dir if needed use DOC_INSTALL_OWN + +2015-06-15 Simon J. Gerraty <[email protected]> + + * install-mk (MK_VERSION): 20150615 + + * auto.obj.mk: allow use of MAKEOBJDIRPREFIX too. + Follow make's normal precedence rules. + + * gendirdeps.mk: allow customization of the header. + eg. for FreeBSD: + GENDIRDEPS_HEADER= echo '\# ${FreeBSD:L:@v@$$$v$$ @:M*F*}'; + + * meta.autodep.mk: ignore dirdeps.cache* + + * meta.stage.mk: when bootstrapping options it can be handy to + throw warnings rather than errors for staging conflicts. + + * meta.sys.mk: include local.meta.sys.mk for customization + 2015-06-06 Simon J. Gerraty <[email protected]> * install-mk (MK_VERSION): 20150606 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/mk/auto.obj.mk new/bmake/mk/auto.obj.mk --- old/bmake/mk/auto.obj.mk 2015-04-16 19:03:50.000000000 +0200 +++ new/bmake/mk/auto.obj.mk 2015-09-10 07:53:52.000000000 +0200 @@ -1,4 +1,4 @@ -# $Id: auto.obj.mk,v 1.10 2015/04/16 16:59:00 sjg Exp $ +# $Id: auto.obj.mk,v 1.11 2015/06/16 06:28:21 sjg Exp $ # # @(#) Copyright (c) 2004, Simon J. Gerraty # @@ -40,7 +40,10 @@ .if !defined(NOOBJ) && !defined(NO_OBJ) && ${MKOBJDIRS:Uno} == auto # Use __objdir here so it is easier to tweak without impacting # the logic. -__objdir?= ${MAKEOBJDIR} +.if !empty(MAKEOBJDIRPREFIX) && exists(${MAKEOBJDIRPREFIX}) +__objdir?= ${MAKEOBJDIRPREFIX}${.CURDIR} +.endif +__objdir?= ${MAKEOBJDIR:Uobj} __objdir:= ${__objdir:tA} .if ${.OBJDIR} != ${__objdir} # We need to chdir, make the directory if needed diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/mk/doc.mk new/bmake/mk/doc.mk --- old/bmake/mk/doc.mk 2012-11-11 23:37:02.000000000 +0100 +++ new/bmake/mk/doc.mk 2015-09-10 07:53:52.000000000 +0200 @@ -1,4 +1,4 @@ -# $Id: doc.mk,v 1.4 2012/11/11 22:37:02 sjg Exp $ +# $Id: doc.mk,v 1.5 2015/09/08 06:15:31 sjg Exp $ .if !target(__${.PARSEFILE}__) __${.PARSEFILE}__: @@ -47,17 +47,19 @@ .else FILES?= ${SRCS} install: - ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 \ - Makefile ${FILES} ${EXTRA} ${DESTDIR}${BINDIR}/${DIR} + test -d ${DESTDIR}${DOCDIR}/${DIR} || \ + ${INSTALL} -d ${DOC_INSTALL_OWN} -m ${DIRMODE} ${DESTDIR}${DOCDIR}/${DIR} + ${INSTALL} ${COPY} ${DOC_INSTALL_OWN} -m ${DOCMODE} \ + Makefile ${FILES} ${EXTRA} ${DESTDIR}${DOCDIR}/${DIR} .endif spell: ${SRCS} spell ${SRCS} | sort | comm -23 - spell.ok > paper.spell -BINDIR?= /usr/share/doc -BINGRP?= bin -BINOWN?= bin -BINMODE?= 444 - .include <own.mk> + +.if !empty(DOCOWN) +DOC_INSTALL_OWN?= -o ${DOCOWN} -g ${DOGGRP} +.endif + .endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/mk/gendirdeps.mk new/bmake/mk/gendirdeps.mk --- old/bmake/mk/gendirdeps.mk 2015-06-10 22:06:12.000000000 +0200 +++ new/bmake/mk/gendirdeps.mk 2015-09-10 07:53:52.000000000 +0200 @@ -1,4 +1,4 @@ -# $Id: gendirdeps.mk,v 1.27 2015/06/08 20:55:11 sjg Exp $ +# $Id: gendirdeps.mk,v 1.28 2015/06/16 06:28:46 sjg Exp $ # Copyright (c) 2010-2013, Juniper Networks, Inc. # All rights reserved. @@ -310,7 +310,7 @@ # The sed command at the end of the stream, allows for the filters # to output _{VAR} tokens which we will turn into proper ${VAR} references. ${_DEPENDFILE}: ${CAT_DEPEND:M.depend} ${META_FILES:O:u:@m@${exists($m):?$m:}@} ${_this} ${META2DEPS} - @(echo '# Autogenerated - do NOT edit!'; echo; \ + @(${GENDIRDEPS_HEADER} echo '# Autogenerated - do NOT edit!'; echo; \ echo 'DIRDEPS = \'; \ echo '${DIRDEPS:@d@ $d \\${.newline}@}'; echo; \ ${_include_src_dirdeps} \ @@ -330,7 +330,7 @@ all: ${_DEPENDFILE} ${_DEPENDFILE}: ${MAKEFILE} ${_this} - @(echo '# Autogenerated - do NOT edit!'; echo; \ + @(${GENDIRDEPS_HEADER} echo '# Autogenerated - do NOT edit!'; echo; \ echo 'DIRDEPS = \'; \ echo '${DIRDEPS:@d@ $d \\${.newline}@}'; echo; \ echo '.include <dirdeps.mk>'; \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/mk/host-target.mk new/bmake/mk/host-target.mk --- old/bmake/mk/host-target.mk 2014-05-23 00:09:03.000000000 +0200 +++ new/bmake/mk/host-target.mk 2015-09-10 20:43:13.000000000 +0200 @@ -1,5 +1,5 @@ # RCSid: -# $Id: host-target.mk,v 1.7 2014/05/16 17:54:52 sjg Exp $ +# $Id: host-target.mk,v 1.9 2015/09/10 18:42:57 sjg Exp $ # Host platform information; may be overridden .if !defined(_HOST_OSNAME) @@ -10,16 +10,25 @@ _HOST_OSREL != uname -r .export _HOST_OSREL .endif +.if !defined(_HOST_MACHINE) +_HOST_MACHINE != uname -m +.export _HOST_MACHINE +.endif .if !defined(_HOST_ARCH) -_HOST_ARCH != uname -p 2>/dev/null || uname -m +# for NetBSD prefer $MACHINE (amd64 rather than x86_64) +.if ${_HOST_OSNAME:NNetBSD} == "" +_HOST_ARCH := ${_HOST_MACHINE} +.else +_HOST_ARCH != uname -p 2> /dev/null || uname -m # uname -p may produce garbage on linux .if ${_HOST_ARCH:[\#]} > 1 -_HOST_ARCH != uname -m +_HOST_ARCH := ${_HOST_MACHINE} +.endif .endif .export _HOST_ARCH .endif .if !defined(HOST_MACHINE) -HOST_MACHINE != uname -m +HOST_MACHINE := ${_HOST_MACHINE} .export HOST_MACHINE .endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/mk/install-mk new/bmake/mk/install-mk --- old/bmake/mk/install-mk 2015-06-10 22:06:12.000000000 +0200 +++ new/bmake/mk/install-mk 2015-09-10 07:53:52.000000000 +0200 @@ -55,7 +55,7 @@ # Simon J. Gerraty <[email protected]> # RCSid: -# $Id: install-mk,v 1.112 2015/06/08 20:55:11 sjg Exp $ +# $Id: install-mk,v 1.113 2015/09/08 06:15:31 sjg Exp $ # # @(#) Copyright (c) 1994 Simon J. Gerraty # @@ -70,7 +70,7 @@ # [email protected] # -MK_VERSION=20150606 +MK_VERSION=20150901 OWNER= GROUP= MODE=444 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/mk/meta.autodep.mk new/bmake/mk/meta.autodep.mk --- old/bmake/mk/meta.autodep.mk 2014-08-30 23:47:23.000000000 +0200 +++ new/bmake/mk/meta.autodep.mk 2015-09-10 07:53:52.000000000 +0200 @@ -1,4 +1,4 @@ -# $Id: meta.autodep.mk,v 1.36 2014/08/02 23:10:29 sjg Exp $ +# $Id: meta.autodep.mk,v 1.37 2015/06/16 06:29:17 sjg Exp $ # # @(#) Copyright (c) 2010, Simon J. Gerraty @@ -97,6 +97,8 @@ # for example the result of running configure # just make sure this is not empty META_FILE_FILTER ?= N.meta +# never consider these +META_FILE_FILTER += Ndirdeps.cache* .if !empty(DPADD) # if we have any non-libs in DPADD, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/mk/meta.stage.mk new/bmake/mk/meta.stage.mk --- old/bmake/mk/meta.stage.mk 2015-06-07 18:07:35.000000000 +0200 +++ new/bmake/mk/meta.stage.mk 2015-09-10 07:53:52.000000000 +0200 @@ -1,4 +1,4 @@ -# $Id: meta.stage.mk,v 1.35 2015/05/20 06:40:33 sjg Exp $ +# $Id: meta.stage.mk,v 1.36 2015/06/16 06:32:08 sjg Exp $ # # @(#) Copyright (c) 2011, Simon J. Gerraty # @@ -59,14 +59,23 @@ ln $$1 $$2 2> /dev/null || \ cp -p $$1 $$2; } +# a staging conflict should cause an error +# a warning is handy when bootstapping different options. +STAGE_CONFLICT?= ERROR +.if ${STAGE_CONFLICT:tl} == "error" +STAGE_CONFLICT_ACTION= exit 1; +.else +STAGE_CONFLICT_ACTION= +.endif + # it is an error for more than one src dir to try and stage # the same file STAGE_DIRDEP_SCRIPT = ${LN_CP_SCRIPT}; StageDirdep() { \ t=$$1; \ if [ -s $$t.dirdep ]; then \ cmp -s .dirdep $$t.dirdep && return; \ - echo "ERROR: $$t installed by `cat $$t.dirdep` not ${_dirdep}" >&2; \ - exit 1; \ + echo "${STAGE_CONFLICT}: $$t installed by `cat $$t.dirdep` not ${_dirdep}" >&2; \ + ${STAGE_CONFLICT_ACTION} \ fi; \ LnCp .dirdep $$t.dirdep || exit 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/mk/meta.sys.mk new/bmake/mk/meta.sys.mk --- old/bmake/mk/meta.sys.mk 2015-06-07 18:07:35.000000000 +0200 +++ new/bmake/mk/meta.sys.mk 2015-09-10 07:53:52.000000000 +0200 @@ -1,4 +1,4 @@ -# $Id: meta.sys.mk,v 1.21 2015/06/01 22:43:49 sjg Exp $ +# $Id: meta.sys.mk,v 1.22 2015/06/16 06:31:05 sjg Exp $ # # @(#) Copyright (c) 2010, Simon J. Gerraty @@ -20,6 +20,10 @@ .if ${MAKE_VERSION:U0} > 20100901 .if !target(.ERROR) +.-include "local.meta.sys.mk" + +# absoulte path to what we are reading. +_PARSEDIR = ${.PARSEDIR:tA} META_MODE += meta verbose .MAKE.MODE ?= ${META_MODE} @@ -69,6 +73,7 @@ # for example, if using Makefild.depend for multiple machines, # allowing only MACHINE0 to update can keep things simple. MACHINE0 := ${MACHINE} +.export MACHINE0 .if defined(PYTHON) && exists(${PYTHON}) # we prefer the python version of this - it is much faster diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/mk/own.mk new/bmake/mk/own.mk --- old/bmake/mk/own.mk 2015-04-16 19:03:50.000000000 +0200 +++ new/bmake/mk/own.mk 2015-09-10 07:53:52.000000000 +0200 @@ -1,4 +1,4 @@ -# $Id: own.mk,v 1.28 2015/04/16 16:59:00 sjg Exp $ +# $Id: own.mk,v 1.29 2015/09/08 06:15:31 sjg Exp $ .if !target(__${.PARSEFILE}__) __${.PARSEFILE}__: @@ -133,7 +133,9 @@ .for x in BIN CONF DOC INFO KMOD LIB MAN NLS SHARE $xOWN= ${USER} $xGRP= ${USERGRP} +$x_INSTALL_OWN= .endfor +PROG_INSTALL_OWN= .endif .endif @@ -143,6 +145,7 @@ BINOWN?= root BINMODE?= 555 NONBINMODE?= 444 +DIRMODE?= 755 # Define MANZ to have the man pages compressed (gzip) #MANZ= 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/mk/rst2htm.mk new/bmake/mk/rst2htm.mk --- old/bmake/mk/rst2htm.mk 2014-04-06 00:51:55.000000000 +0200 +++ new/bmake/mk/rst2htm.mk 2015-09-10 07:53:52.000000000 +0200 @@ -1,4 +1,4 @@ -# $Id: rst2htm.mk,v 1.9 2014/02/22 01:52:41 sjg Exp $ +# $Id: rst2htm.mk,v 1.10 2015/09/08 22:17:46 sjg Exp $ # # @(#) Copyright (c) 2009, Simon J. Gerraty # @@ -26,7 +26,12 @@ RST2S5 ?= rst2s5.py # the following will run RST2S5 if the target name contains the word 'slides' # otherwise it uses RST2HTML -RST2HTM = ${"${.TARGET:T:M*slides*}":?${RST2S5} ${RST2S5_FLAGS}:${RST2HTML} ${RST2HTML_FLAGS}} +RST2HTM = ${"${.TARGET:T:M*slides*}":?${RST2S5}:${RST2HTML}} +RST2HTM_SLIDES_FLAGS ?= ${RST2S5_FLAGS} +RST2HTM_DOC_FLAGS ?= ${RST2HTML_FLAGS} +RST2HTM_FLAGS ?= ${"${.TARGET:T:M*slides*}":?${RST2HTM_SLIDES_FLAGS}:${RST2HTM_DOC_FLAGS}} + +RST2PDF_FLAGS ?= ${"${.TARGET:T:M*slides*}":?${RST2PDF_SLIDES_FLAGS}:${RST2PDF_DOC_FLAGS}} RST_SUFFIXES ?= .rst .txt @@ -37,10 +42,10 @@ .SUFFIXES: ${RST_SUFFIXES} .htm .pdf ${RST_SUFFIXES:@s@$s.htm@}: - ${RST2HTM} ${.IMPSRC} ${.TARGET} + ${RST2HTM} ${RST2HTM_FLAGS} ${FLAGS.${.TARGET}} ${.IMPSRC} ${.TARGET} ${RST_SUFFIXES:@s@$s.pdf@}: - ${RST2PDF} ${.IMPSRC} ${.TARGET} + ${RST2PDF} ${RST2PDF_FLAGS} ${FLAGS.${.TARGET}} ${.IMPSRC} ${.TARGET} .for s in ${RSTSRCS:O:u} ${s:R:T}.htm: $s diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/os.sh new/bmake/os.sh --- old/bmake/os.sh 2014-05-23 00:09:02.000000000 +0200 +++ new/bmake/os.sh 2015-09-10 07:53:51.000000000 +0200 @@ -17,7 +17,7 @@ # Simon J. Gerraty <[email protected]> # RCSid: -# $Id: os.sh,v 1.46 2014/05/19 16:38:09 sjg Exp $ +# $Id: os.sh,v 1.47 2015/09/10 05:53:10 sjg Exp $ # # @(#) Copyright (c) 1994 Simon J. Gerraty # @@ -137,7 +137,10 @@ # NetBSD at least has good backward compatibility # so NetBSD/i386 is good enough case $OS in - NetBSD) SHARE_ARCH=$OS/${MACHINE_ARCH:-$MACHINE};; + NetBSD) + HOST_ARCH=$MACHINE + SHARE_ARCH=$OS/$HOST + ;; OpenBSD) arch=`Which arch /usr/bin:/usr/ucb:$PATH` MACHINE_ARCH=`$arch -s` @@ -203,13 +206,14 @@ TMP_DIRS=${TMP_DIRS:-"/tmp /var/tmp"} MACHINE_ARCH=${MACHINE_ARCH:-$MACHINE} +HOST_ARCH=${HOST_ARCH:-$MACHINE_ARCH} # we mount server:/share/arch/$SHARE_ARCH as /usr/local -SHARE_ARCH=${SHARE_ARCH:-$OS/$OSMAJOR.X/$MACHINE_ARCH} +SHARE_ARCH=${SHARE_ARCH:-$OS/$OSMAJOR.X/$HOST_ARCH} LN=${LN:-ln} TR=${TR:-tr} # Some people like have /share/$HOST_TARGET/bin etc. -HOST_TARGET=`echo ${OS}${OSMAJOR}-${MACHINE_ARCH} | toLower` +HOST_TARGET=`echo ${OS}${OSMAJOR}-$HOST_ARCH | toLower` export HOST_TARGET case `echo -n .` in -n*) N=; C="\c";; *) N=-n; C=;; esac diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/var.c new/bmake/var.c --- old/bmake/var.c 2015-05-05 23:58:16.000000000 +0200 +++ new/bmake/var.c 2015-09-10 20:03:31.000000000 +0200 @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.192 2015/05/05 21:51:09 sjg Exp $ */ +/* $NetBSD: var.c,v 1.195 2015/06/19 14:25:16 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: var.c,v 1.192 2015/05/05 21:51:09 sjg Exp $"; +static char rcsid[] = "$NetBSD: var.c,v 1.195 2015/06/19 14:25:16 christos Exp $"; #else #include <sys/cdefs.h> #ifndef lint #if 0 static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: var.c,v 1.192 2015/05/05 21:51:09 sjg Exp $"); +__RCSID("$NetBSD: var.c,v 1.195 2015/06/19 14:25:16 christos Exp $"); #endif #endif /* not lint */ #endif @@ -138,6 +138,7 @@ #include "buf.h" #include "dir.h" #include "job.h" +#include "metachar.h" extern int makelevel; /* @@ -2245,7 +2246,7 @@ /*- *----------------------------------------------------------------------- * VarQuote -- - * Quote shell meta-characters in the string + * Quote shell meta-characters and space characters in the string * * Results: * The quoted string @@ -2260,29 +2261,25 @@ { Buffer buf; - /* This should cover most shells :-( */ - static const char meta[] = "\n \t'`\";&<>()|*?{}[]\\$!#^~"; const char *newline; - size_t len, nlen; + size_t nlen; if ((newline = Shell_GetNewline()) == NULL) newline = "\\\n"; nlen = strlen(newline); Buf_Init(&buf, 0); - while (*str != '\0') { - if ((len = strcspn(str, meta)) != 0) { - Buf_AddBytes(&buf, len, str); - str += len; - } else if (*str == '\n') { + + for (; *str != '\0'; str++) { + if (*str == '\n') { Buf_AddBytes(&buf, nlen, newline); - ++str; - } else { - Buf_AddByte(&buf, '\\'); - Buf_AddByte(&buf, *str); - ++str; + continue; } + if (isspace((unsigned char)*str) || ismeta((unsigned char)*str)) + Buf_AddByte(&buf, '\\'); + Buf_AddByte(&buf, *str); } + str = Buf_Destroy(&buf, FALSE); if (DEBUG(VAR)) fprintf(debug_file, "QuoteMeta: [%s]\n", str);
