Import bmake-20121010
Relevant items from ChangeLog: o [Makefile.in:] protect syntax that only bmake parses correctly. o compat.c: ignore empty commands - same as jobs mode. o make.1: document meta chars that cause use of shell Approved by: marcelm (mentor)
This commit is contained in:
parent
f74e4d18d1
commit
bdf7c19d9b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/vendor/NetBSD/bmake/dist/; revision=242093 svn path=/vendor/NetBSD/bmake/20121010/; revision=242094; tag=vendor/NetBSD/bmake/20121010
24
ChangeLog
24
ChangeLog
@ -1,3 +1,27 @@
|
||||
2012-10-10 Simon J. Gerraty <sjg@bad.crufty.net>
|
||||
|
||||
* Makefile.in (MAKE_VERSION): 20121010
|
||||
o protect syntax that only bmake parses correctly.
|
||||
o remove auto setting of FORCE_MACHINE, use configure's
|
||||
--with-force-machine=whatever if that is desired.
|
||||
|
||||
2012-10-08 Simon J. Gerraty <sjg@bad.crufty.net>
|
||||
|
||||
* Makefile.in: do not lose history from make.1 when generating bmake.1
|
||||
|
||||
2012-10-07 Simon J. Gerraty <sjg@bad.crufty.net>
|
||||
|
||||
* Makefile.in (MAKE_VERSION): 20121007
|
||||
Merge with NetBSD make, pick up
|
||||
o compat.c: ignore empty commands - same as jobs mode.
|
||||
o make.1: document meta chars that cause use of shell
|
||||
|
||||
2012-09-11 Simon J. Gerraty <sjg@bad.crufty.net>
|
||||
|
||||
* Makefile.in (MAKE_VERSION): bump version to 20120911
|
||||
* bsd.after-import.mk: include Makefile.inc early and allow it to
|
||||
override PROG
|
||||
|
||||
2012-08-31 Simon J. Gerraty <sjg@bad.crufty.net>
|
||||
|
||||
* Makefile.in (MAKE_VERSION): bump version to 20120831
|
||||
|
27
Makefile.in
27
Makefile.in
@ -1,7 +1,7 @@
|
||||
# $NetBSD: Makefile,v 1.56 2012/05/30 21:54:23 sjg Exp $
|
||||
# @(#)Makefile 5.2 (Berkeley) 12/28/90
|
||||
|
||||
# $Id: Makefile.in,v 1.170 2012/08/31 06:46:22 sjg Exp $
|
||||
# $Id: Makefile.in,v 1.174 2012/10/10 18:46:24 sjg 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= 20120831
|
||||
MAKE_VERSION= 20121010
|
||||
MACHINE=@machine@
|
||||
MACHINE_ARCH=@machine_arch@
|
||||
DEFAULT_SYS_PATH = @default_sys_path@
|
||||
@ -71,10 +71,9 @@ SUBDIR= PSD.doc
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if defined(.PARSEDIR)
|
||||
# we cannot rely on anything but bmake to parse this correctly.
|
||||
.if empty(isBSD44:M${OS})
|
||||
# XXX not sure if we still want this given that configure
|
||||
# lets us force or not the definition of MACHINE.
|
||||
CFLAGS_main.o+= "-DFORCE_MACHINE=\"${MACHINE}\""
|
||||
MANTARGET=cat
|
||||
INSTALL?=${srcdir}/install-sh
|
||||
.if (${MACHINE} == "sun386")
|
||||
@ -85,7 +84,7 @@ SRCS+= sigcompat.c
|
||||
CFLAGS+= -DSIGNAL_FLAGS=SA_RESTART
|
||||
.endif
|
||||
.endif
|
||||
.if defined(.PARSEDIR)
|
||||
|
||||
.if make(obj) || make(clean)
|
||||
SUBDIR+= unit-tests
|
||||
.endif
|
||||
@ -104,14 +103,18 @@ EXTRACT_MAN=no
|
||||
|
||||
MAN=${PROG}.1
|
||||
.if (${PROG} != "make")
|
||||
${MAN}: make.1
|
||||
@echo making ${PROG}.1
|
||||
@sed -e 's/^.Nx/NetBSD/' -e '/^.Nm/s/make/${PROG}/' -e '/^.Sh HISTORY/,$$d' ${srcdir}/make.1 > $@
|
||||
@(echo ".Sh HISTORY"; \
|
||||
echo ".Nm"; \
|
||||
my.history: ${MAKEFILE}
|
||||
@(echo ".Nm"; \
|
||||
echo "is derived from NetBSD"; \
|
||||
echo ".Xr make 1 ."; \
|
||||
echo It uses autoconf to facilitate portability to other platforms.) >> $@
|
||||
echo "It uses autoconf to facilitate portability to other platforms."; \
|
||||
echo ".Pp") > $@
|
||||
|
||||
${MAN}: make.1 my.history
|
||||
@echo making ${PROG}.1
|
||||
@sed -e 's/^.Nx/NetBSD/' -e '/^.Nm/s/make/${PROG}/' \
|
||||
-e '/^.Sh HISTORY/rmy.history' \
|
||||
-e '/^.Sh HISTORY/,$$s,^.Nm,make,' ${.CURDIR}/make.1 > $@
|
||||
|
||||
.endif
|
||||
|
||||
|
34
bmake.1
34
bmake.1
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: make.1,v 1.206 2012/08/30 22:35:37 wiz Exp $
|
||||
.\" $NetBSD: make.1,v 1.209 2012/10/08 15:09:48 christos Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1990, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -29,7 +29,7 @@
|
||||
.\"
|
||||
.\" from: @(#)make.1 8.4 (Berkeley) 3/19/94
|
||||
.\"
|
||||
.Dd August 30, 2012
|
||||
.Dd October 8, 2012
|
||||
.Dt MAKE 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -2042,6 +2042,13 @@ or
|
||||
To be compatible with Makefiles that do this, one can use
|
||||
.Fl B
|
||||
to disable this behavior.
|
||||
.Pp
|
||||
In compatibility mode, each command is run in a separate process.
|
||||
If the command contains any shell meta characters
|
||||
.Pq Ql #=|^(){};&<>*?[]:$`\e\en
|
||||
it will be passed to the shell, otherwise
|
||||
.Nm
|
||||
will attempt direct execution.
|
||||
.Sh SEE ALSO
|
||||
.Xr mkdep 1
|
||||
.Sh HISTORY
|
||||
@ -2049,3 +2056,26 @@ to disable this behavior.
|
||||
is derived from NetBSD
|
||||
.Xr make 1 .
|
||||
It uses autoconf to facilitate portability to other platforms.
|
||||
.Pp
|
||||
A
|
||||
make
|
||||
command appeared in
|
||||
.At v7 .
|
||||
This
|
||||
make
|
||||
implementation is based on Adam De Boor's pmake program which was written
|
||||
for Sprite at Berkeley.
|
||||
It was designed to be a parallel distributed make running jobs on different
|
||||
machines using a daemon called
|
||||
.Dq customs .
|
||||
.Sh BUGS
|
||||
The
|
||||
make
|
||||
syntax is difficult to parse without actually acting of the data.
|
||||
For instance finding the end of a variable use should involve scanning each
|
||||
the modifiers using the correct terminator for each field.
|
||||
In many places
|
||||
make
|
||||
just counts {} and () in order to find the end of a variable expansion.
|
||||
.Pp
|
||||
There is no way of escaping a space character in a filename.
|
||||
|
1329
bmake.cat1
1329
bmake.cat1
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
# $Id: bsd.after-import.mk,v 1.7 2012/07/06 03:03:44 sjg Exp $
|
||||
# $Id: bsd.after-import.mk,v 1.9 2012/09/20 00:30:15 sjg Exp $
|
||||
|
||||
# This makefile is for use when integrating bmake into a BSD build
|
||||
# system. Use this makefile after importing bmake.
|
||||
@ -58,7 +58,7 @@ bootstrap: ${BMAKE_SRC}/boot-strap ${MAKEFILE}
|
||||
|
||||
# Makefiles need a little more tweaking than say config.h
|
||||
MAKEFILE_SED = sed -e '/^MACHINE/d' \
|
||||
-e '/^PROG/s,bmake,${.CURDIR:T},' \
|
||||
-e '/^PROG/ { s,=,?=,;s,bmake,$${.CURDIR:T},; }' \
|
||||
-e 's,^.-include,.sinclude,' \
|
||||
-e 's,${SRCTOP},$${SRCTOP},g'
|
||||
|
||||
@ -87,20 +87,20 @@ _makefile: bootstrap ${MAKEFILE}
|
||||
@echo Generating ${.CURDIR}/Makefile
|
||||
@(echo '# This is a generated file, do NOT edit!'; \
|
||||
echo '# See ${_this:S,${SRCTOP}/,,}'; \
|
||||
echo '#'; echo '# $$${OS}$$'; echo; \
|
||||
echo 'SRCTOP?= $${.CURDIR:${.CURDIR:S,${SRCTOP}/,,:C,[^/]+,H,g:S,/,:,g}}'; echo; \
|
||||
echo '#'; echo '# $$${OS}$$'; \
|
||||
echo; echo '.sinclude "Makefile.inc"'; \
|
||||
echo; echo 'SRCTOP?= $${.CURDIR:${.CURDIR:S,${SRCTOP}/,,:C,[^/]+,H,g:S,/,:,g}}'; \
|
||||
echo; echo '# look here first for config.h'; \
|
||||
echo 'CFLAGS+= -I$${.CURDIR}'; echo; \
|
||||
${MAKEFILE_SED} ${HOST_OS}/Makefile; \
|
||||
echo; echo '# override some simple things'; \
|
||||
echo 'BINDIR= /usr/bin'; \
|
||||
echo 'MANDIR= /usr/share/man'; \
|
||||
echo 'MANDIR= ${MANDIR:U/usr/share/man}'; \
|
||||
echo; echo '# make sure we get this'; \
|
||||
echo 'CFLAGS+= $${COPTS.$${.IMPSRC:T}}'; \
|
||||
echo 'CLEANFILES+= bootstrap'; \
|
||||
echo; echo 'after-import: ${_this:S,${SRCTOP},\${SRCTOP},}'; \
|
||||
echo ' cd $${.CURDIR} && $${.MAKE} -f ${_this:S,${SRCTOP},\${SRCTOP},}'; \
|
||||
echo; echo '.sinclude "Makefile.inc"'; \
|
||||
echo ) > ${.TARGET}
|
||||
@cmp -s ${.TARGET} ${.CURDIR}/Makefile || \
|
||||
mv ${.TARGET} ${.CURDIR}/Makefile
|
||||
|
7
compat.c
7
compat.c
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: compat.c,v 1.89 2012/06/10 21:44:01 wiz Exp $ */
|
||||
/* $NetBSD: compat.c,v 1.90 2012/10/07 19:17:31 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: compat.c,v 1.89 2012/06/10 21:44:01 wiz Exp $";
|
||||
static char rcsid[] = "$NetBSD: compat.c,v 1.90 2012/10/07 19:17:31 sjg 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.89 2012/06/10 21:44:01 wiz Exp $");
|
||||
__RCSID("$NetBSD: compat.c,v 1.90 2012/10/07 19:17:31 sjg Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
#endif
|
||||
@ -247,7 +247,6 @@ CompatRunCommand(void *cmdp, void *gnp)
|
||||
|
||||
if (*cmdStart == '\0') {
|
||||
free(cmdStart);
|
||||
Error("%s expands to empty string", cmd);
|
||||
return(0);
|
||||
}
|
||||
cmd = cmdStart;
|
||||
|
13
make.1
13
make.1
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: make.1,v 1.206 2012/08/30 22:35:37 wiz Exp $
|
||||
.\" $NetBSD: make.1,v 1.209 2012/10/08 15:09:48 christos Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1990, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -29,7 +29,7 @@
|
||||
.\"
|
||||
.\" from: @(#)make.1 8.4 (Berkeley) 3/19/94
|
||||
.\"
|
||||
.Dd August 30, 2012
|
||||
.Dd October 8, 2012
|
||||
.Dt MAKE 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -2042,6 +2042,13 @@ or
|
||||
To be compatible with Makefiles that do this, one can use
|
||||
.Fl B
|
||||
to disable this behavior.
|
||||
.Pp
|
||||
In compatibility mode, each command is run in a separate process.
|
||||
If the command contains any shell meta characters
|
||||
.Pq Ql #=|^(){};&<>*?[]:$`\e\en
|
||||
it will be passed to the shell, otherwise
|
||||
.Nm
|
||||
will attempt direct execution.
|
||||
.Sh SEE ALSO
|
||||
.Xr mkdep 1
|
||||
.Sh HISTORY
|
||||
@ -2052,7 +2059,7 @@ command appeared in
|
||||
This
|
||||
.Nm
|
||||
implementation is based on Adam De Boor's pmake program which was written
|
||||
for Sprint at Berkeley.
|
||||
for Sprite at Berkeley.
|
||||
It was designed to be a parallel distributed make running jobs on different
|
||||
machines using a daemon called
|
||||
.Dq customs .
|
||||
|
Loading…
Reference in New Issue
Block a user