libtool with expat, xmlwf/xmlwf target problems again

Gerrit P. Haase
Wed Sep 24 21:12:00 GMT 2003

Hallo Charles,

> Do you remember our talk about libtool problems when the targetname is
> xmlwf/xmlwf and when the target name is also the executable name,
> here:


> Do you have an idea what I can do to get around this?

I found a workaround now.  This patch includes also my usual change
which make the whole wrapper useless.  I needed it to builkd glib/gtk+
because they use libtool to create executables which are used to
generate code during the build, this didn't worked because the wrapper
doesn't produce the code and it also doesn't execute the real
executable.  This seems to be still the problem, so I just link the
real executable and get also the other problem killed with this,
libtool doesn't rebuild the executables all the time.

The first part is the more interesting, with this I can use targets
like xmlwf/xmlwf in the Makefiles and it will also work for 'normal'
targets in recursive builds since `dirname xmlwf` will return the
current path '.' where `dirname xmlwf/xmlwf` returns 'xmlwf'.

Would you be so kind to approve and test this patch so it can be
included in the real libtool distribution.  Should be no act since it
will only affect cygwin/mingw builds.  Though not tested, it should
work on mingw in the same way.

Without the second part of the patch, e.g. also make check in expat
fails since the new executable is called to run the tests.

So, for me it would work without generating the wrapper at all, but
I guess the great wrapper plan prevents such a change;-)

$ diff -udb
---  2003-08-18 07:36:11.001000000 +0200
+++   2003-09-24 22:55:58.852886400 +0200
@@ -4481,8 +4481,10 @@
        case $host in
          *cygwin* | *mingw* )
-           cwrappersource=`$echo ${objdir}/lt-${output}.c`
-           cwrapper=`$echo ${output}.exe`
+           output_name=`basename $output`
+           output_path=`dirname $output`
+           cwrappersource=`$echo ${output_path}/${objdir}/lt-${output_name}.c`
+           cwrapper=`$echo ${output_path}/${output_name}.exe`
            $rm $cwrappersource $cwrapper
            trap "$rm $cwrappersource $cwrapper; exit 1" 1 2 15
@@ -4813,7 +4815,7 @@
          # are only useful if you want to execute the "real" binary.
          # Since the "real" binary is built for $host, then this
          # wrapper might as well be built for $host, too.
-         $run $LTCC -s -o $cwrapper $cwrappersource
+         $run ln ${output_path}/${objdir}/${output_name}.exe ${cwrapper}
        $rm $output



Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list