Date: Wed, 5 Dec 2001 13:08:21 -0500 From: The Anarcat <anarcat@anarcat.dyndns.org> To: Libh <freebsd-libh@freebsd.org> Subject: MAKEOBJDIR Message-ID: <20011205180820.GA24937@shall.anarcat.dyndns.org>
next in thread | raw e-mail | index | archive | help
--gKMricLos+KVdGMg
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
At last!!!
I digged a bit in /usr/share/mk/*.mk to see how the makeworld process
was doing to put compiled versions in /usr/obj instead of ${.CURDIR}.
It's all related to the *environment* variable MAKEOBJDIR.
In other words:
anarcat@shall[~/libh/bin/tclh]% make
Warning: Object directory not changed from original /u/anarcat/libh/bin/tclh
c++ -g -fpic -DPIC -I/usr/local/include/tcl8.3 -DHSYSTEM_FILE -DHSYSTEM=
_DISK -DHSYSTEM_HUI -DHSYSTEM_SYSINSTALL -DHSYSTEM_DATABASE -DSTATIC -c tcl=
h.cc
=2E..
anarcat@shall[~/libh/bin/tclh]% ls
CVS/ Makefile tclh.cc tclh.o tclh.static
anarcat@shall[~/libh/bin/tclh]%=20
But:
anarcat@shall[~/libh/bin/tclh]% rm ../../compile/none/tclh.o=20
anarcat@shall[~/libh/bin/tclh]% MAKEOBJDIR=3D../../compile/none make
c++ -g -fpic -DPIC -I/usr/local/include/tcl8.3 -DHSYSTEM_FILE -DHSYSTEM=
_DISK -DHSYSTEM_HUI -DHSYSTEM_SYSINSTALL -DHSYSTEM_DATABASE -DSTATIC -c /u/=
anarcat/libh/bin/tclh/tclh.cc
=2E..
anarcat@shall[~/libh/bin/tclh]% ll ../../compile/none/tclh.o
-rw-r--r-- 1 anarcat anarcat 41028 5 d=E9c 12:54 ../../compile/none/tcl=
h.o
anarcat@shall[~/libh/bin/tclh]%=20
Neat, uh?
So I think I will start hacking the build process to adopt a 'make
world'-like method. That is, a "make" in compile/ will call a:
@cd .. && MAKEOBJDIR=3D${.CURDIR}/${UITYPE} make
so that we can scrap the compile/*/Makefiles and use compile/Makefile as
a director. libh/Makefile will then *not* direct the build to compile/
but to bin/ and lib/.
Ideally, we would need a src/ directory. Because the current setup is
nice, if you:
cd libh && make
you get what's expected: a regular build.=20
On the other hand, if I make the MAKEOBJDIR modifs, "cd libh && make"
will do a build in each bin/ and lib/ subdirectories, *not* storing the
binaries in compile/ but in the individual directories. There could be a
special target (all/world) that would DTRT, however.
Putting the source (bin & lib) in a seperate directory will allow the
libh/Makefile to DTRT, that is, call make with the MAKEOBJDIR env in
src/.
This has the advantage that some gross hacks in compile/Makefile.inc can
now be removed. The compiled directories now do not depend on
compile/Makefile.inc, but on the individual lib and bin Makefiles.
I will put that into code and send a patch here for review, since this
is rather unusual.
And I really think moving everything to src/ would not be a bad idea.
That would involve repo-surgery, which thing I cannot do.
What do you people think about that?
A.
--gKMricLos+KVdGMg
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org
iEYEARECAAYFAjwOYpMACgkQttcWHAnWiGeUBgCbBWN8RTvHvv6YH2BcCdFO08Hz
mrQAn0roK2Ab/Ks9Tq+uXJ0tw3N9vzGH
=MWQ/
-----END PGP SIGNATURE-----
--gKMricLos+KVdGMg--
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-libh" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011205180820.GA24937>
