Hello community, here is the log from the commit of package bmake for openSUSE:Factory checked in at 2015-12-29 12:59:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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-11-17 14:22:44.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.bmake.new/bmake.changes 2015-12-29 12:59:49.000000000 +0100 @@ -1,0 +2,11 @@ +Sun Dec 27 19:38:53 UTC 2015 - mplus...@suse.com + +- Update to 20151220 + * suff.c: re-initialize suffNull when clearing suffixes. + * cond.c: CondCvtArg: avoid access beyond end of empty buffer. + * meta.c: meta_oodate: use lstat(2) for checking link target in + case it is a symlink. + * var.c: avoid calling brk_string and Var_Export1 with empty + strings. + +------------------------------------------------------------------- Old: ---- bmake-20151022.tar.gz New: ---- bmake-20151220.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ bmake.spec ++++++ --- /var/tmp/diff_new_pack.v8iYsX/_old 2015-12-29 12:59:50.000000000 +0100 +++ /var/tmp/diff_new_pack.v8iYsX/_new 2015-12-29 12:59:50.000000000 +0100 @@ -17,7 +17,7 @@ Name: bmake -Version: 20151022 +Version: 20151220 Release: 0 Summary: The NetBSD make(1) tool License: BSD-2-Clause and BSD-3-Clause and BSD-4-Clause ++++++ bmake-20151022.tar.gz -> bmake-20151220.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/ChangeLog new/bmake/ChangeLog --- old/bmake/ChangeLog 2015-10-25 06:20:23.000000000 +0100 +++ new/bmake/ChangeLog 2015-12-20 23:55:06.000000000 +0100 @@ -1,3 +1,26 @@ +2015-12-20 Simon J. Gerraty <s...@bad.crufty.net> + + * Makefile (MAKE_VERSION): 20151220 + Merge with NetBSD make, pick up + o suff.c: re-initialize suffNull when clearing suffixes. + +2015-12-01 Simon J. Gerraty <s...@bad.crufty.net> + + * Makefile (MAKE_VERSION): 20151201 + Merge with NetBSD make, pick up + o cond.c: CondCvtArg: avoid access beyond end of empty buffer. + o meta.c: meta_oodate: use lstat(2) for checking link target + in case it is a symlink. + o var.c: avoid calling brk_string and Var_Export1 with empty + strings. + +2015-11-26 Simon J. Gerraty <s...@bad.crufty.net> + + * Makefile (MAKE_VERSION): 20151126 + Merge with NetBSD make, pick up + o parse.c: ParseTrackInput don't access beyond + end of old value. + 2015-10-22 Simon J. Gerraty <s...@bad.crufty.net> * Makefile (MAKE_VERSION): 20151022 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/Makefile new/bmake/Makefile --- old/bmake/Makefile 2015-10-24 00:46:36.000000000 +0200 +++ new/bmake/Makefile 2015-12-20 23:55:06.000000000 +0100 @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.45 2015/10/23 22:46:36 sjg Exp $ +# $Id: Makefile,v 1.49 2015/12/20 22:54:40 sjg Exp $ # Base version on src date -MAKE_VERSION= 20151022 +MAKE_VERSION= 20151220 PROG= bmake diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/cond.c new/bmake/cond.c --- old/bmake/cond.c 2015-10-11 07:17:09.000000000 +0200 +++ new/bmake/cond.c 2015-12-02 01:36:53.000000000 +0100 @@ -1,4 +1,4 @@ -/* $NetBSD: cond.c,v 1.69 2015/10/11 04:51:24 sjg Exp $ */ +/* $NetBSD: cond.c,v 1.71 2015/12/02 00:28:24 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: cond.c,v 1.69 2015/10/11 04:51:24 sjg Exp $"; +static char rcsid[] = "$NetBSD: cond.c,v 1.71 2015/12/02 00:28:24 sjg Exp $"; #else #include <sys/cdefs.h> #ifndef lint #if 0 static char sccsid[] = "@(#)cond.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: cond.c,v 1.69 2015/10/11 04:51:24 sjg Exp $"); +__RCSID("$NetBSD: cond.c,v 1.71 2015/12/02 00:28:24 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -490,6 +490,10 @@ double d_val; errno = 0; + if (!*str) { + *value = (double)0; + return TRUE; + } l_val = strtoul(str, &eptr, str[1] == 'x' ? 16 : 10); ech = *eptr; if (ech == 0 && errno != ERANGE) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/main.c new/bmake/main.c --- old/bmake/main.c 2015-10-25 00:41:37.000000000 +0200 +++ new/bmake/main.c 2015-11-27 06:24:02.000000000 +0100 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.234 2015/10/11 04:51:24 sjg Exp $ */ +/* $NetBSD: main.c,v 1.235 2015/10/25 05:24:44 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.234 2015/10/11 04:51:24 sjg Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.235 2015/10/25 05:24:44 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.234 2015/10/11 04:51:24 sjg Exp $"); +__RCSID("$NetBSD: main.c,v 1.235 2015/10/25 05:24:44 sjg Exp $"); #endif #endif /* not lint */ #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/meta.c new/bmake/meta.c --- old/bmake/meta.c 2015-10-23 23:45:42.000000000 +0200 +++ new/bmake/meta.c 2015-12-01 00:45:05.000000000 +0100 @@ -1,4 +1,4 @@ -/* $NetBSD: meta.c,v 1.40 2015/10/11 04:51:24 sjg Exp $ */ +/* $NetBSD: meta.c,v 1.41 2015/11/30 23:37:56 sjg Exp $ */ /* * Implement 'meta' mode. @@ -1187,7 +1187,8 @@ if ((strstr("tmp", p))) break; - if (stat(p, &fs) < 0) { + if ((link_src != NULL && lstat(p, &fs) < 0) || + (link_src == NULL && stat(p, &fs) < 0)) { Lst_AtEnd(missingFiles, bmake_strdup(p)); } break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/mk/ChangeLog new/bmake/mk/ChangeLog --- old/bmake/mk/ChangeLog 2015-10-24 00:28:43.000000000 +0200 +++ new/bmake/mk/ChangeLog 2015-12-20 23:55:07.000000000 +0100 @@ -1,3 +1,29 @@ +2015-12-12 Simon J. Gerraty <s...@bad.crufty.net> + + * install-mk (MK_VERSION): 20151212 + * auto.obj.mk: do not require MAKEOBJDIRPREFIX to exist. + only apply :tA to __objdir when comparing to .OBJDIR + +2015-11-14 Simon J. Gerraty <s...@bad.crufty.net> + + * install-mk (MK_VERSION): 20151111 + + * meta.sys.mk: include sys.dependfile.mk + + * sys.mk (OPTIONS_DEFAULT_NO): use options.mk + to set MK_AUTO_OBJ and MK_DIRDEPS_BUILD + include local.sys.env.mk early + include local.sys.mk later + + * own.mk (OPTIONS_DEFAULT_NO): AUTO_OBJ etc moved to sys.mk + +2015-11-13 Simon J. Gerraty <s...@bad.crufty.net> + + * meta.sys.mk (META_COOKIE_TOUCH): + add ${META_COOKIE_TOUCH} to the end of scripts to touch cookie + + * meta.stage.mk: stage_libs should ignore SYMLINKS. + 2015-10-23 Simon J. Gerraty <s...@bad.crufty.net> * install-mk (MK_VERSION): 20151022 @@ -466,7 +492,7 @@ needed. * gendirdeps.mk: only produce unqualified deps if no .MAKE.DEPENDFILE_PREFERENCE ends in .${MACHINE} - * meta.subdir.mk: apply SUBDIREPS_FILTER + * meta.subdir.mk: apply SUBDIRDEPS_FILTER 2012-04-20 Simon J. Gerraty <s...@bad.crufty.net> 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-09-10 07:53:52.000000000 +0200 +++ new/bmake/mk/auto.obj.mk 2015-12-20 23:55:07.000000000 +0100 @@ -1,4 +1,4 @@ -# $Id: auto.obj.mk,v 1.11 2015/06/16 06:28:21 sjg Exp $ +# $Id: auto.obj.mk,v 1.12 2015/12/16 01:57:06 sjg Exp $ # # @(#) Copyright (c) 2004, Simon J. Gerraty # @@ -40,12 +40,12 @@ .if !defined(NOOBJ) && !defined(NO_OBJ) && ${MKOBJDIRS:Uno} == auto # Use __objdir here so it is easier to tweak without impacting # the logic. -.if !empty(MAKEOBJDIRPREFIX) && exists(${MAKEOBJDIRPREFIX}) +.if !empty(MAKEOBJDIRPREFIX) __objdir?= ${MAKEOBJDIRPREFIX}${.CURDIR} .endif __objdir?= ${MAKEOBJDIR:Uobj} -__objdir:= ${__objdir:tA} -.if ${.OBJDIR} != ${__objdir} +__objdir:= ${__objdir} +.if ${.OBJDIR:tA} != ${__objdir:tA} # We need to chdir, make the directory if needed .if !exists(${__objdir}/) && \ (${.TARGETS} == "" || ${.TARGETS:Nclean*:N*clean:Ndestroy*} != "") @@ -53,11 +53,10 @@ __objdir_made != echo ${__objdir}/; umask ${OBJDIR_UMASK:U002}; \ ${ECHO_TRACE} "[Creating objdir ${__objdir}...]" >&2; \ ${Mkdirs}; Mkdirs ${__objdir} -__objdir:= ${__objdir:tA} .endif # This causes make to use the specified directory as .OBJDIR .OBJDIR: ${__objdir} -.if ${.OBJDIR} != ${__objdir} && ${__objdir_made:Uno:M${__objdir}/*} != "" +.if ${.OBJDIR:tA} != ${__objdir:tA} && ${__objdir_made:Uno:M${__objdir}/*} != "" .error could not use ${__objdir}: .OBJDIR=${.OBJDIR} .endif .endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/mk/init.mk new/bmake/mk/init.mk --- old/bmake/mk/init.mk 2013-07-18 07:46:42.000000000 +0200 +++ new/bmake/mk/init.mk 2015-12-07 05:28:31.000000000 +0100 @@ -1,4 +1,4 @@ -# $Id: init.mk,v 1.9 2013/07/18 05:46:24 sjg Exp $ +# $Id: init.mk,v 1.10 2015/12/07 04:28:31 sjg Exp $ # # @(#) Copyright (c) 2002, Simon J. Gerraty # @@ -47,4 +47,8 @@ _SKIP_BUILD = not building at level 0 .endif +.if !empty(_SKIP_BUILD) +all: .PHONY +.warning ${_SKIP_BUILD} +.endif .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-10-24 00:28:43.000000000 +0200 +++ new/bmake/mk/install-mk 2015-12-20 23:55:07.000000000 +0100 @@ -55,7 +55,7 @@ # Simon J. Gerraty <s...@crufty.net> # RCSid: -# $Id: install-mk,v 1.116 2015/10/23 22:28:31 sjg Exp $ +# $Id: install-mk,v 1.118 2015/12/16 01:57:06 sjg Exp $ # # @(#) Copyright (c) 1994 Simon J. Gerraty # @@ -70,7 +70,7 @@ # s...@crufty.net # -MK_VERSION=20151022 +MK_VERSION=20151212 OWNER= GROUP= MODE=444 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/mk/lib.mk new/bmake/mk/lib.mk --- old/bmake/mk/lib.mk 2014-05-23 03:30:42.000000000 +0200 +++ new/bmake/mk/lib.mk 2015-11-14 19:10:09.000000000 +0100 @@ -1,4 +1,4 @@ -# $Id: lib.mk,v 1.51 2014/05/23 01:30:36 sjg Exp $ +# $Id: lib.mk,v 1.52 2015/11/14 18:09:57 sjg Exp $ .if !target(__${.PARSEFILE}__) __${.PARSEFILE}__: @@ -254,7 +254,7 @@ # is a waste of time, this tells meta.autodep.mk to just pick one # (typically .So) # yes, 42 is a random number. -.if ${MK_META_MODE} == "yes" && ${SRCS:Uno:[\#]} > 42 +.if ${MK_DIRDEPS_BUILD} == "yes" && ${SRCS:Uno:[\#]} > 42 OPTIMIZE_OBJECT_META_FILES ?= yes .endif 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 2015-09-10 07:53:52.000000000 +0200 +++ new/bmake/mk/meta.autodep.mk 2015-12-07 05:35:39.000000000 +0100 @@ -1,4 +1,4 @@ -# $Id: meta.autodep.mk,v 1.37 2015/06/16 06:29:17 sjg Exp $ +# $Id: meta.autodep.mk,v 1.39 2015/12/07 04:35:32 sjg Exp $ # # @(#) Copyright (c) 2010, Simon J. Gerraty @@ -50,6 +50,9 @@ .endif _CURDIR ?= ${.CURDIR} +_OBJDIR ?= ${.OBJDIR} +_OBJTOP ?= ${OBJTOP} +_OBJROOT ?= ${OBJROOT:U${_OBJTOP}} _DEPENDFILE := ${_CURDIR}/${.MAKE.DEPENDFILE:T} .if ${.MAKE.LEVEL} == 0 @@ -190,7 +193,7 @@ # anything which matches ${_OBJROOT}* but not ${_OBJTOP}* # needs to be qualified in DIRDEPS # The pseudo machine "host" is used for HOST_TARGET -DIRDEPS = \ +DIRDEPS += \ ${DPADD:M${_OBJTOP}*:H:C,${_OBJTOP}[^/]*/,,:N.:O:u} \ ${DPADD:M${_OBJROOT}*:N${_OBJTOP}*:H:S,${_OBJROOT},,:C,^([^/]+)/(.*),\2.\1,:S,${HOST_TARGET}$,host,:N.*:O:u} 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-10-10 06:17:22.000000000 +0200 +++ new/bmake/mk/meta.stage.mk 2015-11-13 18:34:12.000000000 +0100 @@ -1,4 +1,4 @@ -# $Id: meta.stage.mk,v 1.40 2015/10/04 17:36:54 sjg Exp $ +# $Id: meta.stage.mk,v 1.41 2015/11/13 17:34:04 sjg Exp $ # # @(#) Copyright (c) 2011, Simon J. Gerraty # @@ -155,7 +155,7 @@ @${STAGE_LINKS_SCRIPT}; StageLinks -s ${STAGE_LIBDIR:${STAGE_DIR_FILTER}} \ ${SHLIB_LINKS:@t@${STAGE_LIBS:T:M$t.*} $t@} .elif !empty(SHLIB_LINK) && !empty(SHLIB_NAME) - @${STAGE_LINKS_SCRIPT}; StageLinks -s ${STAGE_LIBDIR:${STAGE_DIR_FILTER}} ${SHLIB_NAME} ${SHLIB_LINK} ${SYMLINKS:T} + @${STAGE_LINKS_SCRIPT}; StageLinks -s ${STAGE_LIBDIR:${STAGE_DIR_FILTER}} ${SHLIB_NAME} ${SHLIB_LINK} .endif .endif @touch $@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/mk/meta.subdir.mk new/bmake/mk/meta.subdir.mk --- old/bmake/mk/meta.subdir.mk 2012-07-03 07:26:46.000000000 +0200 +++ new/bmake/mk/meta.subdir.mk 2015-11-27 06:24:03.000000000 +0100 @@ -1,4 +1,4 @@ -# $Id: meta.subdir.mk,v 1.10 2012/07/03 05:26:46 sjg Exp $ +# $Id: meta.subdir.mk,v 1.11 2015/11/24 22:26:51 sjg Exp $ # # @(#) Copyright (c) 2010, Simon J. Gerraty @@ -62,7 +62,7 @@ DIRDEPS = .else # clean up if needed -DIRDEPS := ${DIRDEPS:S,^./,,:S,/./,/,g:${SUBDIREPS_FILTER:Uu}} +DIRDEPS := ${DIRDEPS:S,^./,,:S,/./,/,g:${SUBDIRDEPS_FILTER:Uu}} .endif # we just dealt with it, if we leave it defined, # dirdeps.mk will compute some interesting combinations. 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-09-10 07:53:52.000000000 +0200 +++ new/bmake/mk/meta.sys.mk 2015-11-14 22:16:20.000000000 +0100 @@ -1,4 +1,4 @@ -# $Id: meta.sys.mk,v 1.22 2015/06/16 06:31:05 sjg Exp $ +# $Id: meta.sys.mk,v 1.26 2015/11/14 21:16:13 sjg Exp $ # # @(#) Copyright (c) 2010, Simon J. Gerraty @@ -51,17 +51,6 @@ .endif .endif -# make defaults .MAKE.DEPENDFILE to .depend -# that won't work for us. -.if ${.MAKE.DEPENDFILE} == ".depend" -.undef .MAKE.DEPENDFILE -.endif - -# if you don't cross build for multiple MACHINEs concurrently, then -# .MAKE.DEPENDFILE = Makefile.depend -# probably makes sense - you can set that in local.sys.mk -.MAKE.DEPENDFILE ?= Makefile.depend.${MACHINE} - # we use the pseudo machine "host" for the build host. # this should be taken care of before we get here .if ${OBJTOP:Ua} == ${HOST_OBJTOP:Ub} @@ -109,10 +98,27 @@ .endif +META_COOKIE_TOUCH= +# some targets need to be .PHONY in non-meta mode +META_NOPHONY= .PHONY # Are we, after all, in meta mode? .if ${.MAKE.MODE:Mmeta*} != "" MKDEP_MK = meta.autodep.mk +.if ${.MAKE.MAKEFILES:M*sys.dependfile.mk} == "" +# this does all the smarts of setting .MAKE.DEPENDFILE +.-include <sys.dependfile.mk> +# check if we got anything sane +.if ${.MAKE.DEPENDFILE} == ".depend" +.undef .MAKE.DEPENDFILE +.endif +.MAKE.DEPENDFILE ?= Makefile.depend +.endif + +# we can afford to use cookies to prevent some targets +# re-running needlessly +META_COOKIE_TOUCH= touch ${COOKIE.${.TARGET}:U${.OBJDIR}/${.TARGET}} +META_NOPHONY= .if ${UPDATE_DEPENDFILE:Uyes:tl} != "no" .if ${.MAKEFLAGS:Uno:M-k} != "" # make this more obvious 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-09-10 07:53:52.000000000 +0200 +++ new/bmake/mk/own.mk 2015-11-14 19:10:09.000000000 +0100 @@ -1,4 +1,4 @@ -# $Id: own.mk,v 1.29 2015/09/08 06:15:31 sjg Exp $ +# $Id: own.mk,v 1.30 2015/11/14 18:09:57 sjg Exp $ .if !target(__${.PARSEFILE}__) __${.PARSEFILE}__: @@ -89,12 +89,10 @@ # process options OPTIONS_DEFAULT_NO+= \ - AUTO_OBJ \ INSTALL_AS_USER \ GPROF \ LIBTOOL \ LINT \ - META_MODE \ OPTIONS_DEFAULT_YES+= \ ARCHIVE \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/mk/sys.mk new/bmake/mk/sys.mk --- old/bmake/mk/sys.mk 2015-10-31 01:56:20.000000000 +0100 +++ new/bmake/mk/sys.mk 2015-11-14 22:16:20.000000000 +0100 @@ -1,4 +1,4 @@ -# $Id: sys.mk,v 1.38 2015/10/31 00:52:49 sjg Exp $ +# $Id: sys.mk,v 1.41 2015/11/14 20:20:34 sjg Exp $ # # @(#) Copyright (c) 2003-2009, Simon J. Gerraty # @@ -106,6 +106,9 @@ # we need HOST_TARGET etc below. .include <host-target.mk> +# early customizations +.-include <local.sys.env.mk> + # find the OS specifics .if defined(SYS_OS_MK) .include <${SYS_OS_MK}> @@ -130,11 +133,30 @@ .export SYS_OS_MK .endif -# allow customization without editing. -.-include <local.sys.mk> +# some options we need to know early +OPTIONS_DEFAULT_NO += \ + DIRDEPS_BUILD \ + DIRDEPS_CACHE \ + META_MODE + +OPTIONS_DEFAULT_DEPENDENT += \ + AUTO_OBJ/DIRDEPS_BUILD \ + STAGING/DIRDEPS_BUILD \ + +.-include "options.mk" + +.if ${MK_DIRDEPS_BUILD:Uno} == "yes" +MK_META_MODE = yes +.-include <meta.sys.mk> +.elif ${MK_META_MODE:Uno} == "yes" +.MAKE.MODE = meta verbose +.endif +# make sure we have a harmless value +.MAKE.MODE ?= normal # if you want objdirs make them automatic -.if ${MKOBJDIRS:Uno} == "auto" +# and do it early before we compute .PATH +.if ${MK_AUTO_OBJ:Uno} == "yes" || ${MKOBJDIRS:Uno} == "auto" .include <auto.obj.mk> .endif @@ -182,17 +204,8 @@ .cc.cpp-out: @${COMPILE.cc:N-c} -E ${.IMPSRC} | grep -v '^[ ]*$$' -# we don't include own.mk but user can expect -DWITH_META_MODE to work -.if defined(WITHOUT_META_MODE) -USE_META= no -.elif defined(WITH_META_MODE) -USE_META= yes -.endif -.if ${USE_META:Uno} == "yes" -.-include <meta.sys.mk> -.endif -# make sure we have a harmless value -.MAKE.MODE ?= normal +# late customizations +.-include <local.sys.mk> # if .CURDIR is matched by any entry in DEBUG_MAKE_DIRS we # will apply DEBUG_MAKE_FLAGS, now. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/os.sh new/bmake/os.sh --- old/bmake/os.sh 2015-10-25 02:05:40.000000000 +0200 +++ new/bmake/os.sh 2015-12-20 23:55:06.000000000 +0100 @@ -17,7 +17,7 @@ # Simon J. Gerraty <s...@crufty.net> # RCSid: -# $Id: os.sh,v 1.49 2015/10/25 00:05:40 sjg Exp $ +# $Id: os.sh,v 1.50 2015/12/17 17:06:29 sjg Exp $ # # @(#) Copyright (c) 1994 Simon J. Gerraty # @@ -56,10 +56,10 @@ case "$1" in /*) test $t $1 && echo $1;; *) - # some shells cannot correctly handle `IFS` - # in conjunction with the for loop. - _dirs=`IFS=:; echo ${2:-$PATH}` - for d in $_dirs + # some shells cannot correctly handle `IFS` + # in conjunction with the for loop. + _dirs=`IFS=:; echo ${2:-$PATH}` + for d in $_dirs do test $t $d/$1 && { echo $d/$1; break; } done @@ -70,11 +70,11 @@ # tr is insanely non-portable wrt char classes, so we need to # spell out the alphabet. sed y/// would work too. toUpper() { - ${TR:-tr} abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ + ${TR:-tr} abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ } toLower() { - ${TR:-tr} ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz + ${TR:-tr} ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz } K= @@ -91,7 +91,7 @@ export CHOWN # Great! Solaris keeps moving arch(1) - # should just bite the bullet and use uname -p + # should just bite the bullet and use uname -p arch=`Which arch /usr/bin:/usr/ucb` MAILER=/usr/ucb/Mail @@ -105,8 +105,8 @@ MACHINE=$MACHINE_ARCH ;; 4*) - MACHINE_ARCH=`arch` - ;; + MACHINE_ARCH=`arch` + ;; 5*) K=-k LOCAL_FS=ufs @@ -116,8 +116,8 @@ # overwriting an existing file!!!!! We want one that works! test -x /usr/xpg4/bin/ln && LN=${LN:-/usr/xpg4/bin/ln} # wonderful, 5.8's tr again require's []'s - # but /usr/xpg4/bin/tr causes problems if LC_COLLATE is set! - # use toUpper/toLower instead. + # but /usr/xpg4/bin/tr causes problems if LC_COLLATE is set! + # use toUpper/toLower instead. ;; esac case "$OS/$MACHINE_ARCH" in @@ -142,9 +142,9 @@ SHARE_ARCH=$OS/$HOST ;; OpenBSD) - arch=`Which arch /usr/bin:/usr/ucb:$PATH` - MACHINE_ARCH=`$arch -s` - ;; + arch=`Which arch /usr/bin:/usr/ucb:$PATH` + MACHINE_ARCH=`$arch -s` + ;; esac NAWK=awk export NAWK @@ -218,17 +218,25 @@ case `echo -n .` in -n*) N=; C="\c";; *) N=-n; C=;; esac -export HOSTNAME HOST +Echo() { + case "$1" in + -n) _n=$N _c=$C; shift;; + *) _n= _c=;; + esac + echo $_n "$@" $_c +} + +export HOSTNAME HOST export OS MACHINE MACHINE_ARCH OSREL OSMAJOR LOCAL_FS TMP_DIRS MAILER N C K PS_AXC export LN SHARE_ARCH TR case /$0 in */os.sh) - for v in $* + for v in $* do - eval vv=\$$v - echo "$v='$vv'" + eval vv=\$$v + echo "$v='$vv'" done - ;; + ;; esac diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/parse.c new/bmake/parse.c --- old/bmake/parse.c 2015-10-23 20:20:12.000000000 +0200 +++ new/bmake/parse.c 2015-11-27 06:24:02.000000000 +0100 @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.205 2015/10/11 04:51:24 sjg Exp $ */ +/* $NetBSD: parse.c,v 1.206 2015/11/26 00:23:04 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: parse.c,v 1.205 2015/10/11 04:51:24 sjg Exp $"; +static char rcsid[] = "$NetBSD: parse.c,v 1.206 2015/11/26 00:23:04 sjg Exp $"; #else #include <sys/cdefs.h> #ifndef lint #if 0 static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: parse.c,v 1.205 2015/10/11 04:51:24 sjg Exp $"); +__RCSID("$NetBSD: parse.c,v 1.206 2015/11/26 00:23:04 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -2394,15 +2394,19 @@ ParseTrackInput(const char *name) { char *old; + char *ep; char *fp = NULL; size_t name_len = strlen(name); old = Var_Value(MAKE_MAKEFILES, VAR_GLOBAL, &fp); if (old) { + ep = old + strlen(old) - name_len; /* does it contain name? */ for (; old != NULL; old = strchr(old, ' ')) { if (*old == ' ') old++; + if (old >= ep) + break; /* cannot contain name */ if (memcmp(old, name, name_len) == 0 && (old[name_len] == 0 || old[name_len] == ' ')) goto cleanup; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/suff.c new/bmake/suff.c --- old/bmake/suff.c 2015-10-11 07:17:09.000000000 +0200 +++ new/bmake/suff.c 2015-12-20 23:55:06.000000000 +0100 @@ -1,4 +1,4 @@ -/* $NetBSD: suff.c,v 1.74 2015/10/11 04:51:24 sjg Exp $ */ +/* $NetBSD: suff.c,v 1.75 2015/12/20 22:44:10 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: suff.c,v 1.74 2015/10/11 04:51:24 sjg Exp $"; +static char rcsid[] = "$NetBSD: suff.c,v 1.75 2015/12/20 22:44:10 sjg Exp $"; #else #include <sys/cdefs.h> #ifndef lint #if 0 static char sccsid[] = "@(#)suff.c 8.4 (Berkeley) 3/21/94"; #else -__RCSID("$NetBSD: suff.c,v 1.74 2015/10/11 04:51:24 sjg Exp $"); +__RCSID("$NetBSD: suff.c,v 1.75 2015/12/20 22:44:10 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -553,7 +553,20 @@ #endif sufflist = Lst_Init(FALSE); sNum = 0; - suffNull = emptySuff; + if (suffNull) + SuffFree(suffNull); + emptySuff = suffNull = bmake_malloc(sizeof(Suff)); + + suffNull->name = bmake_strdup(""); + suffNull->nameLen = 0; + suffNull->searchPath = Lst_Init(FALSE); + Dir_Concat(suffNull->searchPath, dirSearchPath); + suffNull->children = Lst_Init(FALSE); + suffNull->parents = Lst_Init(FALSE); + suffNull->ref = Lst_Init(FALSE); + suffNull->sNum = sNum++; + suffNull->flags = SUFF_NULL; + suffNull->refCount = 1; } /*- @@ -2524,32 +2537,18 @@ void Suff_Init(void) { - sufflist = Lst_Init(FALSE); #ifdef CLEANUP suffClean = Lst_Init(FALSE); #endif srclist = Lst_Init(FALSE); transforms = Lst_Init(FALSE); - sNum = 0; /* * Create null suffix for single-suffix rules (POSIX). The thing doesn't * actually go on the suffix list or everyone will think that's its * suffix. */ - emptySuff = suffNull = bmake_malloc(sizeof(Suff)); - - suffNull->name = bmake_strdup(""); - suffNull->nameLen = 0; - suffNull->searchPath = Lst_Init(FALSE); - Dir_Concat(suffNull->searchPath, dirSearchPath); - suffNull->children = Lst_Init(FALSE); - suffNull->parents = Lst_Init(FALSE); - suffNull->ref = Lst_Init(FALSE); - suffNull->sNum = sNum++; - suffNull->flags = SUFF_NULL; - suffNull->refCount = 1; - + Suff_ClearSuffixes(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/unit-tests/Makefile.in new/bmake/unit-tests/Makefile.in --- old/bmake/unit-tests/Makefile.in 2015-10-25 06:13:20.000000000 +0100 +++ new/bmake/unit-tests/Makefile.in 2015-12-07 05:06:29.000000000 +0100 @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.47 2015/05/05 21:58:06 sjg Exp $ +# $Id: Makefile.in,v 1.48 2015/12/07 04:06:29 sjg Exp $ # # $NetBSD: Makefile,v 1.52 2015/05/05 21:51:09 sjg Exp $ # @@ -128,7 +128,7 @@ test: ${OUTFILES} .PHONY @failed= ; \ for test in ${TESTNAMES}; do \ - ${TOOL_DIFF} -u ${UNIT_TESTS}/$${test}.exp $${test}.out \ + ${TOOL_DIFF} ${DIFF_FLAGS} ${UNIT_TESTS}/$${test}.exp $${test}.out \ || failed="$${failed}$${failed:+ }$${test}" ; \ done ; \ if [ -n "$${failed}" ]; then \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/unit-tests/cond2.mk new/bmake/unit-tests/cond2.mk --- old/bmake/unit-tests/cond2.mk 2015-05-05 23:53:13.000000000 +0200 +++ new/bmake/unit-tests/cond2.mk 2015-12-02 01:36:53.000000000 +0100 @@ -1,4 +1,4 @@ -# $Id: cond2.mk,v 1.1.1.1 2015/05/05 21:53:13 sjg Exp $ +# $Id: cond2.mk,v 1.1.1.2 2015/12/02 00:34:27 sjg Exp $ TEST_UNAME_S= NetBSD @@ -21,5 +21,9 @@ Y= oops .endif +.if defined(.NDEF) && ${.NDEF} > 0 +Z= yes +.endif + all: @echo $@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bmake/var.c new/bmake/var.c --- old/bmake/var.c 2015-10-24 04:36:01.000000000 +0200 +++ new/bmake/var.c 2015-12-01 08:29:22.000000000 +0100 @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.199 2015/10/20 21:30:57 sjg Exp $ */ +/* $NetBSD: var.c,v 1.200 2015/12/01 07:26:08 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: var.c,v 1.199 2015/10/20 21:30:57 sjg Exp $"; +static char rcsid[] = "$NetBSD: var.c,v 1.200 2015/12/01 07:26:08 sjg 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.199 2015/10/20 21:30:57 sjg Exp $"); +__RCSID("$NetBSD: var.c,v 1.200 2015/12/01 07:26:08 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -701,13 +701,15 @@ int i; val = Var_Subst(NULL, tmp, VAR_GLOBAL, FALSE, TRUE); - av = brk_string(val, &ac, FALSE, &as); - for (i = 0; i < ac; i++) { - Var_Export1(av[i], 0); + if (*val) { + av = brk_string(val, &ac, FALSE, &as); + for (i = 0; i < ac; i++) { + Var_Export1(av[i], 0); + } + free(as); + free(av); } free(val); - free(as); - free(av); } } @@ -739,35 +741,37 @@ track = VAR_EXPORT_PARENT; } val = Var_Subst(NULL, str, VAR_GLOBAL, FALSE, TRUE); - av = brk_string(val, &ac, FALSE, &as); - for (i = 0; i < ac; i++) { - name = av[i]; - if (!name[1]) { - /* - * A single char. - * If it is one of the vars that should only appear in - * local context, skip it, else we can get Var_Subst - * into a loop. - */ - switch (name[0]) { - case '@': - case '%': - case '*': - case '!': - continue; + if (*val) { + av = brk_string(val, &ac, FALSE, &as); + for (i = 0; i < ac; i++) { + name = av[i]; + if (!name[1]) { + /* + * A single char. + * If it is one of the vars that should only appear in + * local context, skip it, else we can get Var_Subst + * into a loop. + */ + switch (name[0]) { + case '@': + case '%': + case '*': + case '!': + continue; + } } - } - if (Var_Export1(name, track)) { - if (VAR_EXPORTED_ALL != var_exportedVars) - var_exportedVars = VAR_EXPORTED_YES; - if (isExport && track) { - Var_Append(MAKE_EXPORTED, name, VAR_GLOBAL); + if (Var_Export1(name, track)) { + if (VAR_EXPORTED_ALL != var_exportedVars) + var_exportedVars = VAR_EXPORTED_YES; + if (isExport && track) { + Var_Append(MAKE_EXPORTED, name, VAR_GLOBAL); + } } } + free(as); + free(av); } free(val); - free(as); - free(av); }