diff options
author | Simon J. Gerraty <sjg@FreeBSD.org> | 2015-12-25 16:19:21 +0000 |
---|---|---|
committer | Simon J. Gerraty <sjg@FreeBSD.org> | 2015-12-25 16:19:21 +0000 |
commit | 6e050540941285e595cbcfe30bc1a0974fa82b0c (patch) | |
tree | b5bfab8dfa08bb3704a046ea5c78171322394bb5 /contrib/bmake | |
parent | ddb13598772025f6e5c072f7a790f8dc1291885c (diff) | |
parent | 6c770d664f0700039a4eaf3d79f672ffb99204b6 (diff) | |
download | src-test2-6e050540941285e595cbcfe30bc1a0974fa82b0c.tar.gz src-test2-6e050540941285e595cbcfe30bc1a0974fa82b0c.zip |
Notes
Diffstat (limited to 'contrib/bmake')
-rw-r--r-- | contrib/bmake/ChangeLog | 6 | ||||
-rw-r--r-- | contrib/bmake/Makefile | 4 | ||||
-rw-r--r-- | contrib/bmake/mk/ChangeLog | 6 | ||||
-rw-r--r-- | contrib/bmake/mk/auto.obj.mk | 11 | ||||
-rw-r--r-- | contrib/bmake/mk/install-mk | 4 | ||||
-rwxr-xr-x | contrib/bmake/os.sh | 48 | ||||
-rw-r--r-- | contrib/bmake/suff.c | 37 |
7 files changed, 67 insertions, 49 deletions
diff --git a/contrib/bmake/ChangeLog b/contrib/bmake/ChangeLog index c620c840b311..c3a4241f0604 100644 --- a/contrib/bmake/ChangeLog +++ b/contrib/bmake/ChangeLog @@ -1,3 +1,9 @@ +2015-12-20 Simon J. Gerraty <sjg@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 <sjg@bad.crufty.net> * Makefile (MAKE_VERSION): 20151201 diff --git a/contrib/bmake/Makefile b/contrib/bmake/Makefile index 861e8f5b86fe..625c254afcdd 100644 --- a/contrib/bmake/Makefile +++ b/contrib/bmake/Makefile @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.48 2015/12/02 00:36:42 sjg Exp $ +# $Id: Makefile,v 1.49 2015/12/20 22:54:40 sjg Exp $ # Base version on src date -MAKE_VERSION= 20151201 +MAKE_VERSION= 20151220 PROG= bmake diff --git a/contrib/bmake/mk/ChangeLog b/contrib/bmake/mk/ChangeLog index 965ff4dc4aa1..3c728c8fa7c4 100644 --- a/contrib/bmake/mk/ChangeLog +++ b/contrib/bmake/mk/ChangeLog @@ -1,3 +1,9 @@ +2015-12-12 Simon J. Gerraty <sjg@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 <sjg@bad.crufty.net> * install-mk (MK_VERSION): 20151111 diff --git a/contrib/bmake/mk/auto.obj.mk b/contrib/bmake/mk/auto.obj.mk index fee3de29b7d5..2395f6491fe0 100644 --- a/contrib/bmake/mk/auto.obj.mk +++ b/contrib/bmake/mk/auto.obj.mk @@ -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 @@ MKOBJDIRS= auto .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:= ${__objdir:tA} __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 --git a/contrib/bmake/mk/install-mk b/contrib/bmake/mk/install-mk index d2500da4eb51..0c3db00ba9db 100644 --- a/contrib/bmake/mk/install-mk +++ b/contrib/bmake/mk/install-mk @@ -55,7 +55,7 @@ # Simon J. Gerraty <sjg@crufty.net> # RCSid: -# $Id: install-mk,v 1.117 2015/11/14 18:09:57 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 @@ # sjg@crufty.net # -MK_VERSION=20151111 +MK_VERSION=20151212 OWNER= GROUP= MODE=444 diff --git a/contrib/bmake/os.sh b/contrib/bmake/os.sh index 93d4387d2d66..1dd394f3837f 100755 --- a/contrib/bmake/os.sh +++ b/contrib/bmake/os.sh @@ -17,7 +17,7 @@ # Simon J. Gerraty <sjg@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 @@ Which() { 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 @@ Which() { # 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 @@ SunOS) 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 @@ SunOS) MACHINE=$MACHINE_ARCH ;; 4*) - MACHINE_ARCH=`arch` - ;; + MACHINE_ARCH=`arch` + ;; 5*) K=-k LOCAL_FS=ufs @@ -116,8 +116,8 @@ SunOS) # 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 @@ SunOS) 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 @@ export HOST_TARGET 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 --git a/contrib/bmake/suff.c b/contrib/bmake/suff.c index 15a3cc87cbc0..db69643f4ce4 100644 --- a/contrib/bmake/suff.c +++ b/contrib/bmake/suff.c @@ -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 @@ Suff_ClearSuffixes(void) #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 @@ Suff_SetNull(char *name) 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(); } |