public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Gerrit P. Haase" <gp@familiehaase.de>
To: cygwin@cygwin.com
Subject: Re: libtool with expat, xmlwf/xmlwf target problems again
Date: Wed, 24 Sep 2003 21:12:00 -0000	[thread overview]
Message-ID: <1751980256598.20030924231524@familiehaase.de> (raw)
In-Reply-To: <511929959364.20030924091707@familiehaase.de>

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: http://www.cygwin.com/ml/cygwin/2003-04/msg01283.html

[...]

> 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 ltmain.sh~ ltmain.sh
--- ltmain.sh~  2003-08-18 07:36:11.001000000 +0200
+++ ltmain.sh   2003-09-24 22:55:58.852886400 +0200
@@ -4481,8 +4481,10 @@
        esac
        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}
          ;;
        esac
        $rm $output

# END OF PATCH

Gerrit
-- 
=^..^=


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

      reply	other threads:[~2003-09-24 21:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-24  7:39 Gerrit P. Haase
2003-09-24 21:12 ` Gerrit P. Haase [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1751980256598.20030924231524@familiehaase.de \
    --to=gp@familiehaase.de \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).