From owner-freebsd-libh Wed Dec 5 10: 7: 0 2001 Delivered-To: freebsd-libh@freebsd.org Received: from tomts9-srv.bellnexxia.net (tomts9.bellnexxia.net [209.226.175.53]) by hub.freebsd.org (Postfix) with ESMTP id B5E2737B41A for ; Wed, 5 Dec 2001 10:06:49 -0800 (PST) Received: from khan.anarcat.dyndns.org ([65.94.190.39]) by tomts9-srv.bellnexxia.net (InterMail vM.4.01.03.16 201-229-121-116-20010115) with ESMTP id <20011205180648.YMKK20714.tomts9-srv.bellnexxia.net@khan.anarcat.dyndns.org> for ; Wed, 5 Dec 2001 13:06:48 -0500 Received: from shall.anarcat.dyndns.org (shall.anarcat.dyndns.org [192.168.0.1]) by khan.anarcat.dyndns.org (Postfix) with ESMTP id 4944B1891 for ; Wed, 5 Dec 2001 13:11:36 -0500 (EST) Received: by shall.anarcat.dyndns.org (Postfix, from userid 1000) id 70C2120ACB; Wed, 5 Dec 2001 13:08:21 -0500 (EST) Date: Wed, 5 Dec 2001 13:08:21 -0500 From: The Anarcat To: Libh Subject: MAKEOBJDIR Message-ID: <20011205180820.GA24937@shall.anarcat.dyndns.org> Mail-Followup-To: The Anarcat , Libh Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gKMricLos+KVdGMg" Content-Disposition: inline User-Agent: Mutt/1.3.23.2i Sender: owner-freebsd-libh@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --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