Something is still broken with the build process

Laurent Duperval lduperval at
Thu Apr 3 23:06:09 CST 2003

On  3 Apr, Derek Atkins wrote:
> I have no clue what your script is trying to do..  Can you give
> the exact command-lines that you run for:
>         make
>         make install
> That script just looks completely wrong in so many ways -- you
> shouldn't need it at all.

I know that. That's why I'm complaining. Here is a description of what
it does:

# This is a Tcl script
# Find every file that ends with *.so*T
# Rename it to the same but remove the trailing T
foreach file [exec find . -name \*so\*T] {
	regexp {([^T]*)} $file -> name
	if {[catch {file rename $file $name} msg]} {
		puts $msg

# Do the same for trailing Us
foreach file [exec find . -name \*U] {
	regexp {([^U]*)} $file -> name
	if {[catch {file rename $file $name} msg]} {
		puts $msg

# Run make and get the current directory where make is running
# Then, for that directory, find the name of each .so file that libtool is
# trying to install (but doesn't for some reason)
# Install the so file manually and make two links for it: one ending in .so.0,
# the other ending in .so. This simulates libtool's install command
set data [exec cat output.txt]
foreach line [split $data \n] {
	if {[regexp {make\[.*]: Entering directory `(.*)'} $line -> curDir]} {
		puts "Current directory is $curDir"
	} elseif {[regexp {/bin/sh .*libtool  --mode=install /usr/bin/install -c (.*) (.*)} $line -> file toDir]} {
		set sofile [file root $file].so
		puts "Installing $file to $toDir"
		file copy -force $curDir/$file $toDir
		puts "Copying $curDir/.libs/$sofile.0.0.0 to [file dirname $toDir]"
		file copy -force $curDir/.libs/$sofile.0.0.0 [file dirname $toDir]
		cd [file dirname $toDir]
		exec ln -sf $sofile.0.0.0 $sofile.0
		exec ln -sf $sofile.0.0.0 $sofile

Yes it's totally ludicrous to do this by hand but if I don't use this script,
gnucash doesn't install properly. A bunch of .so files are named foo.soT  or
foo.soU in my build tree and libtool doesn't find them.


Laurent Duperval <mailto:lduperval at>

"Si tu te cognes la tête contre un vase et que cela résonne, ne t'empresses
pas à conclure que c'est le vase qui est creux".
Tap Into Your Full Potential/Puisez Dans Votre Plein Potentiel
My/Mon Club:
My/Mon District:
My/Mon Organisation:

More information about the gnucash-devel mailing list