Subject: misc/3823: New simpler
To: None <>
From: None <>
List: netbsd-bugs
Date: 07/02/1997 18:09:19
>Number:         3823
>Category:       misc
>Synopsis:       New simpler <>
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people (Misc Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Jul  3 23:05:00 1997
>Originator:     David A. Holland <>
   - David A. Holland             |    VINO project home page:    |
>Release:        NetBSD-current 19970410

System: NetBSD bordeaux 1.2C NetBSD 1.2C (BORDEAUX.PROF) #28: Sat Mar 1 16:28:54 EST 1997 abrown@bordeaux:/usr/src/sys/arch/i386/compile/BORDEAUX.PROF i386

(This was actually built with a make slightly modified for supporting
cross-compilations from BSD/OS to VINO.)


	The old <> breaks on out of date and buggy versions 
	of /bin/sh, such as the 4.4BSD ash that BSD/OS uses. This new one 
	does not; furthermore it is smaller and simpler and sacrifices no

	It was built out of <> from -current of last April,
	so if you would like me to merge it up to today's -current, I'll
	be happy to do so.


	Using netbsd's make and <> on a BSD/OS machine chokes
	with "Bad substitute".


	Here's a new <>.

    -------- SNIP --------

#	$NetBSD:,v 1.14 1997/03/29 08:02:56 mikel Exp $
#	@(#)	8.1 (Berkeley) 6/8/93

.include <>

.if !target(.MAIN)
.MAIN: all

# Look for any machine-specific versions of subdirs

.for __DIR in ${SUBDIR}
.if exists(${__DIR}.${MACHINE}) 

# These targets are propagated to subdirs.

__SUBDIRTARGETS=all install realinstall clean cleandir includes \
		depend lint obj tags

# _THISDIR_ is a mechanism for printing the subdirectories nicely,
# since ${.CURDIR} gives full paths.

.if !defined(_THISDIR_)

# Issue rules of the form "target-subdir"
# NB. Change the echos to 
#      @echo make[1]: Entering directory \`${.CURDIR}/${dir}\'
# and
#      @echo make[1]: Leaving directory \`${.CURDIR}/${dir}\'
# for compatibility with gmake and thus with emacs's compile mode.
# What echos to use should probably be parameterized.

.for dir in ${__REALSUBDIR}
.for tgt in ${__SUBDIRTARGETS}
	@echo "===> ${_THISDIR_}${dir}"
	@cd ${.CURDIR}/${dir}; \
	${MAKE} "_THISDIR_=${_THISDIR_}${dir}/" ${tgt:S/realinstall/install/}

# Backward-compatibility with the old rules.  If this went away,
# 'xlint' could become 'lint', 'xinstall' could become 'install', etc.
${dir}: all-${dir}


.if !target(install)
.if !target(beforeinstall)
.if !target(afterinstall)
install: ${MANINSTALL}
${MANINSTALL}: afterinstall
afterinstall: realinstall
realinstall: beforeinstall _SUBDIRUSE

# Put anything needing special handling above this so the .if will 
# always be false.

.for tgt in ${__SUBDIRTARGETS}
.if !target(${tgt})
${tgt}: _SUBDIRUSE

.include <>