Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Jun 1996 17:32:34 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, jkh@time.cdrom.com
Cc:        current@FreeBSD.ORG
Subject:   Re: OK, here it is!  [was Re: Whoops! That was a mite premature..]
Message-ID:  <199606220732.RAA23331@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>Once config is modified to dump its compile dir under ${.OBJDIR}, this
>work will basically be finished.  I haven't done this yet due to the
>fact that I want to think about kernel compiles a little more, but the
>userland code should work.

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.

>===================================================================
>RCS file: /home/ncvs/src/gnu/usr.bin/as/Makefile,v
>retrieving revision 1.9
>diff -u -r1.9 Makefile
>--- Makefile	1995/09/22 14:14:12	1.9
>+++ Makefile	1996/06/22 05:00:48
>@@ -13,8 +13,8 @@
> gas_objformat=aout
> .endif
> 
>-.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.

>===================================================================
>RCS file: /home/ncvs/src/gnu/usr.bin/cc/Makefile.inc,v
>retrieving revision 1.13
>diff -u -r1.13 Makefile.inc
>--- Makefile.inc	1995/03/11 03:48:42	1.13
>+++ Makefile.inc	1996/06/22 05:43:47
>@@ -15,8 +15,8 @@
> CFLAGS+=	-DGCC_NAME=\"cc\"
> CFLAGS+=	-DLINK_LIBGCC_SPECIAL_1
> 
>-.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
to build a temporary copy with CC='cc -g', I would now do `mv obj zo;
mkdir obj; make CC=cc -g'' (or similarly without new and/or old obj
directories).  In the new scheme I might have to unset the macro that
points to the object tree.  The new scheme is going to have problems
finding the object directory for cc_int.  It would probably work to
leave the macro set and rearrange the directories in the object tree,
but the simplest case of building in the current directory won't work.

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

MAKEOBJDIR should be named something like MAKEOBJROOTDIR.

Bruce



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