Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Jun 1996 09:39:52 -0700
From:      "Jordan K. Hubbard" <jkh@time.cdrom.com>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        current@FreeBSD.ORG
Subject:   Re: OK, here it is! [was Re: Whoops! That was a mite premature..] 
Message-ID:  <15308.835461592@time.cdrom.com>
In-Reply-To: Your message of "Sat, 22 Jun 1996 17:32:34 %2B1000." <199606220732.RAA23331@godzilla.zeta.org.au> 

next in thread | previous in thread | raw e-mail | index | archive | help
> I use /sys/compile -> /usr/obj/sys/compile and FOOKERNEL/machine ->
> @/i386/include and FOOKERNEL/@ -> /sys, but this requires some
> modifcations to the aic7xxx paths since the aic7xxxx assembler doesn't
> support -I.

Hmmmm.  This would imply that we also lose the /sys link and replace
it with a directory so that we can create the link to
/usr/obj/sys/compile.  I'm not against it, but it's a bit more of a
change than I was looking for in this first round.  I'll probably punt
on config for now since it's not really part of the problem I'm trying
to solve - I just want simultaneous makes to work in the same tree and
since the kernels generally each go to a different subdirectory of
/sys/compile anyway (unless somebody has named two machines' kernel
config files the same - self induced injury :-).


> >-.if exists(${.CURDIR}/obj)
> >-ADDINCLUDE=-I${.CURDIR}/obj
> >+.if exists(${.OBJDIR})
> >+ADDINCLUDE=-I${.OBJDIR}
> > .endif
> > 
> > PROG=		as
> 
> The .if is now always true since ${.OBJDIR} is the current directory if
> there is no special object directory.

Erm..  Yeah, OK, so I was kinda sleepy towards the end there. :-)

> >-.if exists(${.CURDIR}/../cc_int/obj)
> >-LIBDESTDIR=	${.CURDIR}/../cc_int/obj
> >+.if exists(${.OBJDIR}/../cc_int)
> >+LIBDESTDIR=	${.OBJDIR}/../cc_int
> > .else
> > LIBDESTDIR=	${.CURDIR}/../cc_int
> > .endif
> 
> This isn't good enough.  ${.OBJDIR} only gives the object directory
> associated with the current directory.  The rule for building the
> pathname for the object directory associated with other source
> directories may be quite different.  E.g., if I'm compiling cc and want

I don't think that this is going to be a general case, if it ever even
comes up.  I do have to make some assumptions here, and one is that
/usr/obj is essentially going to shadow /usr/src.  Trying to make it
even more general case than this would probably be an exercise in
diminishing returns.

> What will replace `cd obj'?  Not cd ${MAKEOBJDIR}`pwd | sed ...`.
> Perhaps "cd `make --print-makes-idea-of-the-obj-dir`".

What's wrong with `cd ${.OBJDIR}'?

> MAKEOBJDIR should be named something like MAKEOBJROOTDIR.

I thought this too, at first, but MAKEOBJDIR wasn't used anywhere and
I wondered at the utility in keeping it.  The same goes for
${.OBJDIR}, actually.  It used to point to either obj/ or ${.CURDIR},
now it always points at the path under ${MAKEOBJDIR} whether that
directory exists or not.  I deemed this better than creating a new
variable (${.NEWOBJDIR} or something) and also retaining the semantics
where ${.OBJDIR} and ${.CURDIR} were ever identical.  Knowing they're
not enables me to blow away ${.OBJDIR} with impugnity, also saving
MUCH time in running the clean rule first since you know you're about
to blow everything in there away anyway and there's not much point in
removing individual files first.

Anyway, thanks for the feedback!  I found some other bogons with
/usr/src/bin/sh (the mkbuiltins shell script has knowledge of obj
dirs; yuck!) and will have some more diffs just as soon as I finally
get through an entire `make world'

					Jordan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15308.835461592>