Skip to content

Commit

Permalink
Import bmake-20130520 to keep us in sync.
Browse files Browse the repository at this point in the history
  • Loading branch information
sgerraty committed May 20, 2013
1 parent ae6f026 commit 2d83ce1
Show file tree
Hide file tree
Showing 16 changed files with 435 additions and 243 deletions.
14 changes: 14 additions & 0 deletions dist/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
2013-05-20 Simon J. Gerraty <[email protected]>

* Makefile (MAKE_VERSION): 20130520
generate manifest from component FILES rather than have to
update FILES when mk/FILES changes.

2013-05-18 Simon J. Gerraty <[email protected]>

* Makefile (MAKE_VERSION): 20130518
Merge with NetBSD make, pick up
o suff.c: don't skip all processsing for .PHONY targets
else wildcard srcs do not get expanded.
o var.c: expand name of variable to delete if necessary.

2013-03-30 Simon J. Gerraty <[email protected]>

* Makefile (MAKE_VERSION): 20130330
Expand Down
110 changes: 25 additions & 85 deletions dist/FILES
Original file line number Diff line number Diff line change
@@ -1,29 +1,26 @@
FILES
ChangeLog
bmake.cat1
boot-strap
bsd.after-import.mk
os.sh
makefile.in
FILES
Makefile
Makefile.config.in
PSD.doc/Makefile
PSD.doc/tutorial.ms
README
aclocal.m4
arch.c
bmake.1
bmake.cat1
boot-strap
bsd.after-import.mk
buf.c
buf.h
compat.c
cond.c
make-conf.h
make_malloc.c
make_malloc.h
config.h.in
configure
aclocal.m4
configure.in
dir.c
dir.h
dirname.c
find_lib.sh
for.c
getopt.c
Expand All @@ -32,16 +29,6 @@ hash.h
install-sh
job.c
job.h
meta.c
meta.h
dirname.c
realpath.c
strlcpy.c
strlist.c
strlist.h
stresep.c
trace.c
trace.h
lst.h
lst.lib/Makefile
lst.lib/lstAppend.c
Expand Down Expand Up @@ -74,26 +61,36 @@ lst.lib/lstReplace.c
lst.lib/lstSucc.c
machine.sh
main.c
make-bootstrap.sh.in
make-conf.h
make.1
bmake.1
make.c
make.h
make-bootstrap.sh.in
make_malloc.c
make_malloc.h
makefile.in
meta.c
meta.h
missing/sys/cdefs.h
mkdeps.sh
nonints.h
os.sh
parse.c
pathnames.h
ranlib.h
realpath.c
setenv.c
sigcompat.c
sprite.h
str.c
stresep.c
strlcpy.c
strlist.c
strlist.h
suff.c
targ.c
util.c
var.c
wait.h
trace.c
trace.h
unit-tests/Makefile.in
unit-tests/comment
unit-tests/cond1
Expand Down Expand Up @@ -123,63 +120,6 @@ unit-tests/test.exp
unit-tests/unexport
unit-tests/unexport-env
unit-tests/varcmd
mk/ChangeLog
mk/FILES
mk/README
mk/auto.obj.mk
mk/autoconf.mk
mk/autodep.mk
mk/auto.dep.mk
mk/dep.mk
mk/doc.mk
mk/dpadd.mk
mk/final.mk
mk/host-target.mk
mk/host.libnames.mk
mk/inc.mk
mk/init.mk
mk/install-mk
mk/java.mk
mk/lib.mk
mk/libnames.mk
mk/libs.mk
mk/links.mk
mk/man.mk
mk/mk-files.txt
mk/nls.mk
mk/obj.mk
mk/options.mk
mk/own.mk
mk/prlist.mk
mk/prog.mk
mk/progs.mk
mk/rst2htm.mk
mk/scripts.mk
mk/srctop.mk
mk/subdir.mk
mk/sys.mk
mk/sys.clean-env.mk
mk/sys.dependfile.mk
mk/sys/AIX.mk
mk/sys/Darwin.mk
mk/sys/Generic.mk
mk/sys/HP-UX.mk
mk/sys/IRIX.mk
mk/sys/Linux.mk
mk/sys/NetBSD.mk
mk/sys/OSF1.mk
mk/sys/OpenBSD.mk
mk/sys/SunOS.mk
mk/sys/UnixWare.mk
mk/target-flags.mk
mk/warnings.mk
mk/yacc.mk
mk/dirdeps.mk
mk/gendirdeps.mk
mk/install-new.mk
mk/meta2deps.py
mk/meta2deps.sh
mk/meta.sys.mk
mk/meta.autodep.mk
mk/meta.stage.mk
mk/meta.subdir.mk
util.c
var.c
wait.h
4 changes: 2 additions & 2 deletions dist/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# $Id: Makefile,v 1.10 2013/03/31 05:57:19 sjg Exp $
# $Id: Makefile,v 1.12 2013/05/20 16:05:10 sjg Exp $

# Base version on src date
MAKE_VERSION= 20130330
MAKE_VERSION= 20130520

PROG= bmake

Expand Down
4 changes: 2 additions & 2 deletions dist/meta.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $NetBSD: meta.c,v 1.29 2013/03/31 05:49:51 sjg Exp $ */
/* $NetBSD: meta.c,v 1.30 2013/05/16 21:56:56 sjg Exp $ */

/*
* Implement 'meta' mode.
Expand Down Expand Up @@ -543,7 +543,7 @@ boolValue(char *s)
* Initialization we need before reading makefiles.
*/
void
meta_init()
meta_init(void)
{
#ifdef USE_FILEMON
/* this allows makefiles to test if we have filemon support */
Expand Down
20 changes: 20 additions & 0 deletions dist/mk/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
2013-05-10 Simon J. Gerraty <[email protected]>

* install-mk (MK_VERSION): 20130505
* gendirdeps.mk, meta2deps.py, meta2deps.sh: handle $TARGET_SPEC
for when $MACHINE isn't enough for objdir distinction.
Bring meta2deps.sh closer to par with meta2deps.py.

2013-04-18 Simon J. Gerraty <[email protected]>

* meta.stage.mk: set INSTALL to STAGE_INSTALL when making 'all'
also if the target 'beforeinstall' exists, make it depend on
.dirdep (incase it uses STAGE_INSTALL).

2013-04-17 Simon J. Gerraty <[email protected]>

* install-mk (MK_VERSION): 20130401 ;-)
* meta.stage.mk (STAGE_INSTALL_SH): add stage-install.sh as
wrapper around install(1).
* options.mk (OPTION_PREFIX): Allow a prefix other than MK_

2013-03-30 Simon J. Gerraty <[email protected]>

* meta2deps.py (MetaFile.__init__): ensure self.cwd is initialized.
Expand Down
1 change: 1 addition & 0 deletions dist/mk/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ progs.mk
rst2htm.mk
scripts.mk
srctop.mk
stage-install.sh
subdir.mk
sys.mk
sys.clean-env.mk
Expand Down
28 changes: 16 additions & 12 deletions dist/mk/gendirdeps.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $Id: gendirdeps.mk,v 1.21 2013/03/28 20:01:05 sjg Exp $
# $Id: gendirdeps.mk,v 1.22 2013/05/11 05:16:26 sjg Exp $

# Copyright (c) 2010-2013, Juniper Networks, Inc.
# All rights reserved.
Expand Down Expand Up @@ -111,13 +111,24 @@ _py_d =
.if ${META2DEPS:E} == "py"
# we can afford to do this all the time.
DPDEPS ?= no
META2DEPS_CMD = ${_time} ${PYTHON} ${META2DEPS} ${_py_d} \
-R ${RELDIR} -H ${HOST_TARGET} \
${M2D_OBJROOTS:O:u:@o@-O $o@}

META2DEPS_CMD = ${_time} ${PYTHON} ${META2DEPS} ${_py_d}
.if ${DPDEPS:tl} != "no"
META2DEPS_CMD += -D ${DPDEPS}
.endif
META2DEPS_FILTER = sed 's,^src:,${SRCTOP}/,;s,^\([^/]\),${OBJTOP}/\1,' |
.elif ${META2DEPS:E} == "sh"
META2DEPS_CMD = ${_time} ${_sh_x} ${META2DEPS} OBJTOP=${_OBJTOP}
.else
META2DEPS_CMD ?= ${META2DEPS}
.endif

.if ${TARGET_OBJ_SPEC:U${MACHINE}} != ${MACHINE}
META2DEPS_CMD += -T ${TARGET_OBJ_SPEC}
.endif
META2DEPS_CMD += \
-R ${RELDIR} -H ${HOST_TARGET} \
${M2D_OBJROOTS:O:u:@o@-O $o@}


M2D_OBJROOTS += ${OBJTOP} ${_OBJROOT} ${_objroot}
.if defined(SB_OBJROOT)
Expand All @@ -133,13 +144,6 @@ META2DEPS_ARGS += MACHINE=none
META2DEPS_CMD += -S ${SB_BACKING_SB}/src
M2D_OBJROOTS += ${SB_BACKING_SB}/${SB_OBJPREFIX}
.endif
META2DEPS_FILTER = sed 's,^src:,${SRCTOP}/,;s,^\([^/]\),${OBJTOP}/\1,' |
.elif ${META2DEPS:E} == "sh"
META2DEPS_CMD = ${_time} ${_sh_x} ${META2DEPS} \
OBJTOP=${_objtop} SB_OBJROOT=${_objroot}
.else
META2DEPS_CMD ?= ${META2DEPS}
.endif

# we are only interested in the dirs
# sepecifically those we read something from.
Expand Down
4 changes: 2 additions & 2 deletions dist/mk/install-mk
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Simon J. Gerraty <[email protected]>

# RCSid:
# $Id: install-mk,v 1.88 2013/03/31 22:31:59 sjg Exp $
# $Id: install-mk,v 1.90 2013/05/11 05:16:26 sjg Exp $
#
# @(#) Copyright (c) 1994 Simon J. Gerraty
#
Expand All @@ -70,7 +70,7 @@
# [email protected]
#

MK_VERSION=20130330
MK_VERSION=20130505
OWNER=
GROUP=
MODE=444
Expand Down
15 changes: 14 additions & 1 deletion dist/mk/meta.stage.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $Id: meta.stage.mk,v 1.24 2013/03/23 02:25:19 sjg Exp $
# $Id: meta.stage.mk,v 1.30 2013/04/19 16:32:57 sjg Exp $
#
# @(#) Copyright (c) 2011, Simon J. Gerraty
#
Expand Down Expand Up @@ -228,4 +228,17 @@ STAGING_WAIT ?= .WAIT

all: ${STAGING_WAIT} staging

.if exists(${.PARSEDIR}/stage-install.sh) && !defined(STAGE_INSTALL)
# this will run install(1) and then followup with .dirdep files.
STAGE_INSTALL := sh ${.PARSEDIR:tA}/stage-install.sh INSTALL="${INSTALL}" OBJDIR=${.OBJDIR:tA}
.endif

# if ${INSTALL} gets run during 'all' assume it is for staging?
.if ${.TARGETS:Nall} == "" && defined(STAGE_INSTALL)
INSTALL := ${STAGE_INSTALL}
.if target(beforeinstall)
beforeinstall: .dirdep
.endif
.endif

.endif
Loading

0 comments on commit 2d83ce1

Please sign in to comment.