summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2010-05-13 18:37:38 +0000
committerjoerg <joerg@pkgsrc.org>2010-05-13 18:37:38 +0000
commit4f45bdd33e7709b15d484a629483e12d8643a6e1 (patch)
tree02b3c15a894b2d1a3266741e1784766e31b2815d
parent80199590869cf77565b0b4dea7357b2043cbcd15 (diff)
downloadpkgsrc-4f45bdd33e7709b15d484a629483e12d8643a6e1.tar.gz
Import bmake-20100510:
- use absolute path for bmake when running tests during boot-strap - revert use of realpath on argv[0] - print MAKE_PRINT_VAR_ON_ERROR before running .ERROR target - fix for missing SIGCHLD when compiled with SunPRO - fflush stdout before writing to stdout
-rw-r--r--devel/bmake/files/ChangeLog24
-rw-r--r--devel/bmake/files/Makefile.in10
-rwxr-xr-xdevel/bmake/files/boot-strap12
-rw-r--r--devel/bmake/files/main.c37
-rw-r--r--devel/bmake/files/parse.c9
-rw-r--r--devel/bmake/files/util.c16
6 files changed, 70 insertions, 38 deletions
diff --git a/devel/bmake/files/ChangeLog b/devel/bmake/files/ChangeLog
index 559a28514f6..fcb4f720f1f 100644
--- a/devel/bmake/files/ChangeLog
+++ b/devel/bmake/files/ChangeLog
@@ -1,3 +1,27 @@
+2010-05-10 Simon J. Gerraty <sjg@bad.crufty.net>
+
+ * boot-strap: use absolute path for bmake when running tests.
+
+ * Makefile.in (MAKE_VERSION): bump version to 20100510
+ Merge with NetBSD make, pick up
+ o revert use of realpath on argv[0]
+ too many corner cases.
+ o print MAKE_PRINT_VAR_ON_ERROR before running .ERROR target.
+
+2010-05-05 Simon J. Gerraty <sjg@bad.crufty.net>
+
+ * Makefile.in (MAKE_VERSION): bump version to 20100505
+ Merge with NetBSD make, pick up
+ o fix for missed SIGCHLD when compiled with SunPRO
+ actually for bmake, defining FORCE_POSIX_SIGNALS would have
+ done the job.
+
+2010-04-30 Simon J. Gerraty <sjg@bad.crufty.net>
+
+ * Makefile.in (MAKE_VERSION): bump version to 20100430
+ Merge with NetBSD make, pick up
+ o fflush stdout before writing to stdout
+
2010-04-23 Simon J. Gerraty <sjg@bad.crufty.net>
* Makefile.in (MAKE_VERSION): bump version to 20100423
diff --git a/devel/bmake/files/Makefile.in b/devel/bmake/files/Makefile.in
index 2046469c9d9..a05f0b0265f 100644
--- a/devel/bmake/files/Makefile.in
+++ b/devel/bmake/files/Makefile.in
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile.in,v 1.1.1.7 2010/04/24 20:33:52 joerg Exp $
+# $NetBSD: Makefile.in,v 1.1.1.8 2010/05/13 18:37:40 joerg Exp $
# @(#)Makefile 5.2 (Berkeley) 12/28/90
-# $Id: Makefile.in,v 1.1.1.7 2010/04/24 20:33:52 joerg Exp $
+# $Id: Makefile.in,v 1.1.1.8 2010/05/13 18:37:40 joerg 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= 20100423
+MAKE_VERSION= 20100510
MACHINE=@machine@
MACHINE_ARCH=@machine_arch@
DEFAULT_SYS_PATH = @default_sys_path@
@@ -113,12 +113,12 @@ _mfromdir=${srcdir}
.if exists(${srcdir}/../Makefile.inc)
.include "${srcdir}/../Makefile.inc"
.endif
-.include <bsd.prog.mk>
+.-include <bsd.prog.mk>
# 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(SUBDIR) && !target(${SUBDIR:[1]})
-.include <bsd.subdir.mk>
+.-include <bsd.subdir.mk>
.endif
# Force these
diff --git a/devel/bmake/files/boot-strap b/devel/bmake/files/boot-strap
index 3ab787f46f0..e4117008dd0 100755
--- a/devel/bmake/files/boot-strap
+++ b/devel/bmake/files/boot-strap
@@ -53,7 +53,7 @@
# Simon J. Gerraty <sjg@crufty.net>
# RCSid:
-# $Id: boot-strap,v 1.1.1.7 2010/04/24 20:33:52 joerg Exp $
+# $Id: boot-strap,v 1.1.1.8 2010/05/13 18:37:40 joerg Exp $
#
# @(#) Copyright (c) 2001 Simon J. Gerraty
#
@@ -294,12 +294,16 @@ if [ -s "${mksrc:-/dev/null}/install-mk" ]; then
esac
fi
export MAKESYSPATH
-./bmake test || exit 1
-
+if [ "$mksrc" ]; then
+ $objdir/bmake test || exit 1
+else
+ # assume nothing
+ $objdir/bmake -r -m / test || exit 1
+fi
# If -q given, we don't want all the install instructions
$quiet exit 0
-make_version=`./bmake -f ./Makefile -V MAKE_VERSION | ( read one two; echo $one )`
+make_version=`./bmake -r -m / -f ./Makefile -V MAKE_VERSION | ( read one two; echo $one )`
bmake_version=bmake-$make_version
if [ -s /usr/share/tmac/andoc.tmac ]; then
diff --git a/devel/bmake/files/main.c b/devel/bmake/files/main.c
index bea3db15e29..7809146a164 100644
--- a/devel/bmake/files/main.c
+++ b/devel/bmake/files/main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.1.1.7 2010/04/24 20:33:57 joerg Exp $ */
+/* $NetBSD: main.c,v 1.1.1.8 2010/05/13 18:37:50 joerg Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,7 +69,7 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: main.c,v 1.1.1.7 2010/04/24 20:33:57 joerg Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.1.1.8 2010/05/13 18:37:50 joerg Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
@@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993\
#if 0
static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: main.c,v 1.1.1.7 2010/04/24 20:33:57 joerg Exp $");
+__RCSID("$NetBSD: main.c,v 1.1.1.8 2010/05/13 18:37:50 joerg Exp $");
#endif
#endif /* not lint */
#endif
@@ -933,14 +933,7 @@ main(int argc, char **argv)
* MFLAGS also gets initialized empty, for compatibility.
*/
Parse_Init();
- if (argv[0][0] == '/') {
- p1 = argv[0];
- } else {
- p1 = realpath(argv[0], mdpath);
- if (!p1 || *p1 != '/' || stat(p1, &sb) < 0) {
- p1 = argv[0]; /* realpath failed */
- }
- }
+ p1 = argv[0];
Var_Set("MAKE", p1, VAR_GLOBAL, 0);
Var_Set(".MAKE", p1, VAR_GLOBAL, 0);
Var_Set(MAKEFLAGS, "", VAR_GLOBAL, 0);
@@ -1749,6 +1742,7 @@ Error(const char *fmt, ...)
err_file = debug_file;
if (err_file == stdout)
err_file = stderr;
+ (void)fflush(stdout);
for (;;) {
va_start(ap, fmt);
fprintf(err_file, "%s: ", progname);
@@ -1783,6 +1777,7 @@ Fatal(const char *fmt, ...)
if (jobsRunning)
Job_Wait();
+ (void)fflush(stdout);
(void)vfprintf(stderr, fmt, ap);
va_end(ap);
(void)fprintf(stderr, "\n");
@@ -1814,6 +1809,7 @@ Punt(const char *fmt, ...)
va_list ap;
va_start(ap, fmt);
+ (void)fflush(stdout);
(void)fprintf(stderr, "%s: ", progname);
(void)vfprintf(stderr, fmt, ap);
va_end(ap);
@@ -1960,23 +1956,22 @@ PrintOnError(GNode *gn, const char *s)
*/
Var_Set(".ERROR_TARGET", gn->name, VAR_GLOBAL, 0);
}
+ strncpy(tmp, "${MAKE_PRINT_VAR_ON_ERROR:@v@$v='${$v}'\n@}",
+ sizeof(tmp) - 1);
+ cp = Var_Subst(NULL, tmp, VAR_GLOBAL, 0);
+ if (cp) {
+ if (*cp)
+ printf("%s", cp);
+ free(cp);
+ }
/*
- * See if there is a .ERROR target, and run it if so.
+ * Finally, see if there is a .ERROR target, and run it if so.
*/
en = Targ_FindNode(".ERROR", TARG_NOCREATE);
if (en) {
en->type |= OP_SPECIAL;
Compat_Make(en, en);
}
-
- strncpy(tmp, "${MAKE_PRINT_VAR_ON_ERROR:@v@$v='${$v}'\n@}",
- sizeof(tmp) - 1);
- cp = Var_Subst(NULL, tmp, VAR_GLOBAL, 0);
- if (cp) {
- if (*cp)
- printf("%s", cp);
- free(cp);
- }
}
void
diff --git a/devel/bmake/files/parse.c b/devel/bmake/files/parse.c
index 734649ff4c8..71f66362635 100644
--- a/devel/bmake/files/parse.c
+++ b/devel/bmake/files/parse.c
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.1.1.6 2010/04/20 13:32:33 joerg Exp $ */
+/* $NetBSD: parse.c,v 1.1.1.7 2010/05/13 18:37:56 joerg Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: parse.c,v 1.1.1.6 2010/04/20 13:32:33 joerg Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.1.1.7 2010/05/13 18:37:56 joerg 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.1.1.6 2010/04/20 13:32:33 joerg Exp $");
+__RCSID("$NetBSD: parse.c,v 1.1.1.7 2010/05/13 18:37:56 joerg Exp $");
#endif
#endif /* not lint */
#endif
@@ -451,6 +451,7 @@ ParseErrorInternal(const char *cfname, size_t clineno, int type,
va_list ap;
va_start(ap, fmt);
+ (void)fflush(stdout);
ParseVErrorInternal(stderr, cfname, clineno, type, fmt, ap);
va_end(ap);
@@ -489,6 +490,7 @@ Parse_Error(int type, const char *fmt, ...)
}
va_start(ap, fmt);
+ (void)fflush(stdout);
ParseVErrorInternal(stderr, fname, lineno, type, fmt, ap);
va_end(ap);
@@ -2712,6 +2714,7 @@ Parse_File(const char *name, int fd)
} while (ParseEOF() == CONTINUE);
if (fatals) {
+ (void)fflush(stdout);
(void)fprintf(stderr,
"%s: Fatal errors encountered -- cannot continue\n",
progname);
diff --git a/devel/bmake/files/util.c b/devel/bmake/files/util.c
index 2787ce059f0..22463768582 100644
--- a/devel/bmake/files/util.c
+++ b/devel/bmake/files/util.c
@@ -1,18 +1,18 @@
-/* $NetBSD: util.c,v 1.1.1.6 2010/04/20 13:32:36 joerg Exp $ */
+/* $NetBSD: util.c,v 1.1.1.7 2010/05/13 18:37:58 joerg Exp $ */
/*
* Missing stuff from OS's
*
- * $Id: util.c,v 1.1.1.6 2010/04/20 13:32:36 joerg Exp $
+ * $Id: util.c,v 1.1.1.7 2010/05/13 18:37:58 joerg Exp $
*/
#include "make.h"
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: util.c,v 1.1.1.6 2010/04/20 13:32:36 joerg Exp $";
+static char rcsid[] = "$NetBSD: util.c,v 1.1.1.7 2010/05/13 18:37:58 joerg Exp $";
#else
#ifndef lint
-__RCSID("$NetBSD: util.c,v 1.1.1.6 2010/04/20 13:32:36 joerg Exp $");
+__RCSID("$NetBSD: util.c,v 1.1.1.7 2010/05/13 18:37:58 joerg Exp $");
#endif
#endif
@@ -385,7 +385,12 @@ getcwd(path, sz)
}
#endif
-#if defined(sun) && defined(__svr4__) && !defined(FORCE_POSIX_SIGNALS)
+#if !defined(FORCE_POSIX_SIGNALS)
+/*
+ * If FORCE_POSIX_SIGNALS is defined
+ * then sigcompat will have done this.
+ */
+#if defined(sun) && (defined(__svr4__) || defined(__SVR4))
#include <signal.h>
/* turn into bsd signals */
@@ -404,6 +409,7 @@ signal(int s, void (*a)(int)))(int)
return osa.sa_handler;
}
#endif
+#endif
#if !defined(HAVE_VSNPRINTF) || !defined(HAVE_VASPRINTF)
#include <stdarg.h>