Turn rescue back on, conditional to NORESCUE. We seem to be split on

using underscores or not, so I just randomly picked a style. I think
I have the logic correct, but if someone wants to give it a once over
that would be good.

Tim submitted a patch to fix the cross-building issues which I tested
with a tinderbox run for sparc64.

Submitted by:	Tim Kientzle <kientzle@acm.org>
This commit is contained in:
Gordon Tetlow 2003-07-11 16:57:43 +00:00
parent 07a41f740a
commit 4d938af0ba
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=117449
2 changed files with 15 additions and 5 deletions

View File

@ -8,6 +8,7 @@
# -DNOCRYPT will prevent building of crypt versions
# -DNOMAN do not build the manual pages
# -DNOPROFILE do not build profiled libraries
# -DNORESCUE do not build rescue binaries
# -DNOGAMES do not go into games subdir
# -DNOSHARE do not go into share subdir
# -DNOINFO do not make or install info files
@ -66,7 +67,7 @@ SUBDIR+= kerberos5
.if exists(${.CURDIR}/libexec)
SUBDIR+= libexec
.endif
.if exists(${.CURDIR}/rescue) && defined(RESCUE)
.if exists(${.CURDIR}/rescue) && !defined(NORESCUE)
SUBDIR+= rescue
.endif
.if exists(${.CURDIR}/sbin)
@ -667,7 +668,7 @@ _xargs= usr.bin/xargs
_yacc= usr.bin/yacc
.endif
.if defined(RESCUE) && \
.if !defined(NORESCUE) && \
${BOOTSTRAPPING} < 501100
_crunchgen= usr.sbin/crunch/crunchgen
.endif
@ -725,6 +726,7 @@ build-tools:
.for _tool in \
bin/csh \
bin/sh \
rescue/rescue \
gnu/usr.bin/cc/cc_tools \
${_fortran} \
${_libkrb5} \
@ -752,7 +754,7 @@ _elf2aout= usr.bin/elf2aout
_btxld= usr.sbin/btxld
.endif
.if (defined(RESCUE) || \
.if (!defined(NORESCUE) || \
defined(RELEASEDIR)) && \
( ${TARGET_ARCH} != ${MACHINE_ARCH} || ${BOOTSTRAPPING} < 501101 )
_crunchide= usr.sbin/crunch/crunchide

View File

@ -47,6 +47,8 @@ CRUNCH_BUILDOPTS+= -DRESCUE
# Define compile-time RESCUE symbol when compiling components
CRUNCH_BUILDOPTS+= CRUNCH_CFLAGS=-DRESCUE
# An experiment that failed: try overriding bsd.lib.mk and bsd.prog.mk
# rather than incorporating rescue-specific logic into standard files.
#MAKEFLAGS= -m ${.CURDIR} ${.MAKEFLAGS}
# Hackery: 'librescue' exists merely as a tool for appropriately
@ -244,14 +246,20 @@ $(CONF): Makefile
$(OUTPUTS): $(CONF)
MAKEOBJDIRPREFIX=${CRUNCHOBJS} crunchgen -q -m $(OUTMK) -c $(OUTC) $(CONF)
# -m here forces make to treat the bsd.prog.mk and bsd.lib.mk in
# this directory as overrides for the standard shared ones.
$(PROG): $(OUTPUTS)
MAKEOBJDIRPREFIX=${CRUNCHOBJS} make -f $(OUTMK)
objs:
MAKEOBJDIRPREFIX=${CRUNCHOBJS} make -f $(OUTMK) objs
# <sigh> Someone should replace the bin/csh and bin/sh build-tools with
# shell scripts so we can remove this nonsense.
build-tools:
.for _tool in bin/csh bin/sh
cd ${.CURDIR}/../../${_tool}; \
MAKEOBJDIRPREFIX=${CRUNCHOBJS} make DIRPRFX=rescue/${_tool} build-tools
.endfor
# Use a separate build tree to hold files compiled for this crunchgen binary
# Yes, this does seem to partly duplicate bsd.subdir.mk, but I can't
# get that to cooperate with bsd.prog.mk. Besides, many of the standard