Simplify the SRCDIR comment.

This commit is contained in:
ross 1998-10-08 00:44:16 +00:00
parent 7fc1302b5d
commit e462ec8f09

View File

@ -1,37 +1,15 @@
# $NetBSD: Makefile,v 1.5 1998/05/03 16:50:25 ross Exp $
# $NetBSD: Makefile,v 1.6 1998/10/08 00:44:16 ross Exp $
# Build a smaller sh (e.g. for boot media)
#
# Once upon a time (actually, 11/97) cjs wrote this Makefile and put
# in a comment explaining why the obvious approach would NOT work,
# and proceeded to do it in an ugly but functional way. Later (actually,
# on 3/29/98) Christos came along and did it the simple, clean, and
# beautiful way which, sadly, does not work. What's funny is, that pesky
# comment was deleted in the same 3/29 commit.
#
# So now, on 5/3/98 ross comes along and decides to fix it. I'm not doing
# it Curt's way, exactly, but I am going to explain again why this is ugly
# and, once again, why the obvious way to do it won't work. The reason for
# this long-winded explaination is obvious: if someone comes along and "fixes"
# my ugly version I want them to at least get their version to really work.
#
# You cannot completely test this makefile by building in the
# utils/x_sh directory! The whole problem comes from crunchgen(1).
# The way crunchgen(1) works is to build a makefile in /tmp that includes
# the makefile from the directory to be crunched. It executes that makefile
# in order to get the list of files to work on. The key thing is: crunchgen
# doesn't run from this directory. Therefore, this makefile has to be able
# to work from some other directory.
#
# So, my XXX hack is to locate the sh directory from the different
# possible subdirectory level counts beneath /usr/src. Note that using
# objdirs changes the level count and usually makes it impossible to do a
# relative traversal to another source directory. That's why the :H is
# used, to cancel out the objdir. ".." won't do it, that moves us up
# the obj tree.
#
# Be very careful before attempting to "clean up" the ugly location
# of the bin/sh source directory. The problem is that crunchgen(1)
# doesn't run from this directory, thus creating a triple-indirect
# sh Makefile include and requiring the whole thing to work from
# different levels in the tree.
#
# We could just use only the BSDSRCDIR assignment, but right now the use
# of BSDSRCDIR can be deleted here, and so I didn't want to depend on it
# in case someday we completely nuke BSDSRCDIR.
# in case someday we completely nuke the rarely used BSDSRCDIR.
NOMAN=1
@ -47,6 +25,9 @@ SRCDIR?= ${.CURDIR:H}/$i
SRCDIR?= ${BSDSRCDIR}/bin/sh
hrh:
@echo SRCDIR=$(SRCDIR)
CPPFLAGS+= -I${SRCDIR} -DSMALL
.PATH: ${SRCDIR} ${SRCDIR}/bltin ${SRCDIR}/../../usr.bin/printf