svn commit: r203803 - in projects/jbuild/usr.bin: jbuild make
Craig Rodrigues
rodrigc at FreeBSD.org
Fri Feb 12 19:36:38 UTC 2010
Author: rodrigc
Date: Fri Feb 12 19:36:37 2010
New Revision: 203803
URL: http://svn.freebsd.org/changeset/base/203803
Log:
Do not hardcode "make:" in diagnostic messages.
Define PROG_NAME, based on the value of PROG
in the Makefile.
Modified:
projects/jbuild/usr.bin/jbuild/Buildfile
projects/jbuild/usr.bin/jbuild/Makefile
projects/jbuild/usr.bin/make/Makefile
projects/jbuild/usr.bin/make/job.c
projects/jbuild/usr.bin/make/main.c
projects/jbuild/usr.bin/make/util.c
Modified: projects/jbuild/usr.bin/jbuild/Buildfile
==============================================================================
--- projects/jbuild/usr.bin/jbuild/Buildfile Fri Feb 12 18:52:24 2010 (r203802)
+++ projects/jbuild/usr.bin/jbuild/Buildfile Fri Feb 12 19:36:37 2010 (r203803)
@@ -32,6 +32,7 @@ NO_SHARED ?= YES
CFLAGS += -I${.CURDIR}
CFLAGS += -DMAKE_VERSION=\"5200408120\"
+CFLAGS += -DPROG_NAME=\"${PROG}\"
CFLAGS += -DDEFSHELLNAME=\"sh\"
CFLAGS += -I${.CURDIR}/filemon
Modified: projects/jbuild/usr.bin/jbuild/Makefile
==============================================================================
--- projects/jbuild/usr.bin/jbuild/Makefile Fri Feb 12 18:52:24 2010 (r203802)
+++ projects/jbuild/usr.bin/jbuild/Makefile Fri Feb 12 19:36:37 2010 (r203803)
@@ -17,7 +17,7 @@ NO_MAN=
IGNORE_PRAGMA= YES
DEBUG_FLAGS+= -g
-CFLAGS+= -DMAKE_VERSION=\"8000000000\"
+CFLAGS+= -DMAKE_VERSION=\"8000000000\" -DPROG_NAME=\"${PROG}\"
# We're building 'build', not 'make' so the behaviour is different in
# some areas like defaulting to silent.
Modified: projects/jbuild/usr.bin/make/Makefile
==============================================================================
--- projects/jbuild/usr.bin/make/Makefile Fri Feb 12 18:52:24 2010 (r203802)
+++ projects/jbuild/usr.bin/make/Makefile Fri Feb 12 19:36:37 2010 (r203803)
@@ -11,7 +11,7 @@ SRCS= arch.c buf.c cond.c dir.c for.c ha
WARNS?= 6
NO_SHARED?= YES
-CFLAGS+=-DMAKE_VERSION=\"5200408120\"
+CFLAGS+=-DMAKE_VERSION=\"5200408120\" -DPROG_NAME=\"${PROG}\"
# There is no obvious performance improvement currently.
# CFLAGS+=-DUSE_KQUEUE
Modified: projects/jbuild/usr.bin/make/job.c
==============================================================================
--- projects/jbuild/usr.bin/make/job.c Fri Feb 12 18:52:24 2010 (r203802)
+++ projects/jbuild/usr.bin/make/job.c Fri Feb 12 19:36:37 2010 (r203803)
@@ -1731,7 +1731,7 @@ Job_CheckCommands(GNode *gn, void (*abor
* this node's parents so they never get examined.
*/
static const char msg[] =
- "make: don't know how to make";
+ PROG_NAME ": don't know how to make";
if (gn->type & OP_OPTIONAL) {
fprintf(stdout, "%s %s(ignored)\n",
Modified: projects/jbuild/usr.bin/make/main.c
==============================================================================
--- projects/jbuild/usr.bin/make/main.c Fri Feb 12 18:52:24 2010 (r203802)
+++ projects/jbuild/usr.bin/make/main.c Fri Feb 12 19:36:37 2010 (r203803)
@@ -1502,13 +1502,13 @@ main(int argc, char **argv)
Path_Expand(defsysmk, &sysIncPath, &sysMkPath);
if (Lst_IsEmpty(&sysMkPath))
- Fatal("make: no system rules (%s).", PATH_DEFSYSMK);
+ Fatal(PROG_NAME ": no system rules (%s).", PATH_DEFSYSMK);
LST_FOREACH(ln, &sysMkPath) {
if (!ReadMakefile(Lst_Datum(ln)))
break;
}
if (ln != NULL)
- Fatal("make: cannot open %s.", (char *)Lst_Datum(ln));
+ Fatal(PROG_NAME ": cannot open %s.", (char *)Lst_Datum(ln));
Lst_Destroy(&sysMkPath, free);
}
@@ -1520,7 +1520,7 @@ main(int argc, char **argv)
break;
}
if (ln != NULL)
- Fatal("make: cannot open %s.", (char *)Lst_Datum(ln));
+ Fatal(PROG_NAME ": cannot open %s.", (char *)Lst_Datum(ln));
#ifdef JBUILD
} else
TryReadMakefile("Buildfile");
Modified: projects/jbuild/usr.bin/make/util.c
==============================================================================
--- projects/jbuild/usr.bin/make/util.c Fri Feb 12 18:52:24 2010 (r203802)
+++ projects/jbuild/usr.bin/make/util.c Fri Feb 12 19:36:37 2010 (r203803)
@@ -181,7 +181,7 @@ Punt(const char *fmt, ...)
va_list ap;
va_start(ap, fmt);
- fprintf(stderr, "make: ");
+ fprintf(stderr, PROG_NAME ": ");
vfprintf(stderr, fmt, ap);
va_end(ap);
fprintf(stderr, "\n");
More information about the svn-src-projects
mailing list