Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Dec 2001 13:00:52 -0500
From:      The Anarcat <anarcat@anarcat.dyndns.org>
To:        Libh <freebsd-libh@freebsd.org>
Subject:   Re: HEADS UP: breakage in lib/tcl
Message-ID:  <20011221180050.GA30704@shall.anarcat.dyndns.org>
In-Reply-To: <20011220224431.GB686@shall.anarcat.dyndns.org>
References:  <20011220224431.GB686@shall.anarcat.dyndns.org>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On Thu Dec 20, 2001 at 05:44:31PM -0500, The Anarcat wrote:
> Oups.
> 
> I broke the build in lib/tcl with the latest Makefiles commit. I'll have
> to think about this. I'll probably come up with a fix tonight.
> 
> Feel free to back out the change if needs be. I'll post another heads up
> when I'll come up with a fix.

Ok. It seems this is another one I cannot figure out.

The problem is that lib/tcl requires to build a lib with 2 sources in
particular:

SRCS=		LibHTclInit_$(HSYSTEM).cc \
		TclLanguageInterface.cc

where HSYSTEM is (say) hui.

Now, for a reason I do not understand, make(1) can't find those sources
if they're not in OBJDIR.

Everything works fine for every other instance of lib/*. Why does it
fail in lib/tcl is beyond me. It fails with:

anarcat@shall[/usr/ports/misc/libh/work/libh/lib/tcl]% env MAKEOBJDIR=../../compile/text+graphics/ make
make: don't know how to make LibHTclInit_hui.cc. Stop
*** Error code 2

Stop in /usr/ports/misc/libh/work/libh/lib/tcl.
anarcat@shall[/usr/ports/misc/libh/work/libh/lib/tcl]% 

lib/sysinstall/Makefile (eg) should fail the same way with something
similar, since the Makefiles structure are almost the same! Why is it
doing this???

[grumble-grumble-think-think-test-test]

I think I know why. These SRCS are defined in Makefile.inc1 which is
called by the Makefile for each different values of HSYSTEM. In other
words, if you do:

env ... make -f Makefile.inc HSYSTEM=hui

, it will DTRT. So I am currently testing a fix that would be something
like:

Index: Makefile
===================================================================
RCS file: /home/libh/cvs/libh/lib/tcl/Makefile,v
retrieving revision 1.21
diff -u -r1.21 Makefile
--- Makefile    2001/09/20 23:32:23     1.21
+++ Makefile    2001/12/21 17:44:32
@@ -4,6 +4,6 @@
 
 all install clean cleandir cleandepend:
        @for HSYSTEM in hui file common disk sysinstall; do \
-               ${MAKE} -f $S/lib/tcl/Makefile.inc1 S=$S VPATH=$(VPATH) \
-                       HSYSTEM=$$HSYSTEM $@ ;\
+               (cd $(.CURDIR) && \
+               ${MAKE} -f Makefile.inc1 S=$S HSYSTEM=$$HSYSTEM $@) ;\
        done

So that the makefile would "return" to lib/tcl before calling make
again. This is because the makefile runs its target in .OBJDIR (which is
compile/UITYPE) and therefore sets an odd environment for Makefile.inc1.
I think cd $(.CURDIR) will fix that.

I'll run a full build test before committing though. :)

Anyways, the problem is that I think that backing out the changes
requires a repo-surgery. I brilliantly removed files in compile/ that
need to be brought back from the dead in order to fix this mess.

I hope these diffs will fix everything. There might be some other places
where it will break though, since lib/tcl is probably not the only place
where recursive make calls are done... :)

A.

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAjwjeNAACgkQttcWHAnWiGfNJACeL2vQUJvBk0s2CtamdhHbQ50f
RhMAoIDR6Ve04ZSCLdWxvcVnyGaPv4n2
=DCiS
-----END PGP SIGNATURE-----

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