Re: [PATCH 1/7] Add file name conversion from $build to toolchain.

2010-09-06 Thread Peter Rosin
Hi Chuck, Ralf,

Den 2010-09-05 22:49 skrev Charles Wilson:
 [meta-request: in the future, could you not use whatever option it is
 that causes the entire patch message to be stored at attachment to the
 actual message...this is a little awkward to reply-to:]
 
 On 9/5/2010 3:58 PM, Peter Rosin wrote:
 nothing
 
 ...which means all replies have to manually cut-n-paste-as-quotation
 which is painful.  Unless somebody knows what option to set in TBird to
 DTRT?

If *I* inline the patches, TBird messes up tabs - four spaces, haven't found
a way to avoid that... I *could* use mutt for sending patches I suppose, but
isn't the attachment marked to be inline? I think they were when I tested
my current patch sending technique...

*looks*

No, Content-Disposition: attachment;

#...@$#%


 On 9/5/2010 3:58 PM, Peter Rosin wrote:
 +...@defvar to_tool_file_cmd
 
 Urk.  I guess I ought to go ahead and define to_host_file_cmd...
 
 You might also want to add a line or two to the new section concerning
 the lying cygwin-mingw case:
 
 ...To force the
 correct file name conversion in this situation, you should do the
 following _before_ running configure:

  export lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
 
 ...Unless you plan to do all of that as part of some other pure-doc patch.


I have a patch ready with some updates to both the fake and the lying case
(and the nits requested by Ralf), will see if I can find a way to post
without destroying tabs and without causing you all trouble...

Also, no comments for 2/7 and 3/7, does that mean that those are ok?

Cheers,
Peter



Re: [PATCH 1/7] Add file name conversion from $build to toolchain.

2010-09-06 Thread Peter Rosin
Den 2010-09-06 08:42 skrev Peter Rosin:
 I have a patch ready with some updates to both the fake and the lying case
 (and the nits requested by Ralf), will see if I can find a way to post
 without destroying tabs and without causing you all trouble...
 
 Also, no comments for 2/7 and 3/7, does that mean that those are ok?

Here's an update, let me know if this patch sending technique works for you.

From 375a576d095b69bfeb11d5b560201d65ce70e132 Mon Sep 17 00:00:00 2001
From: Peter Rosin p...@lysator.liu.se
Date: Mon, 6 Sep 2010 08:23:52 +0200
Subject: [PATCH 1/7] Add file name conversion from $build to toolchain.

* configure.ac: Ensure to_tool_file_cmd is available to Makefile.
* libltdl/m4/libtool.m4 (_LT_PATH_CONVERSION_FUNCTIONS): Add
cache variable lt_cv_to_tool_file_cmd that describes how to
convert file names from $build to toolchain format.
* libltdl/config/ltmain.m4sh (func_to_tool_file): New function
that utilizes the above.
* Makefile.am: Ensure to_tool_file_cmd is included in
TEST_ENVIRONMENT so that it is passed to (old testsuite) tests.
* testsuite.at: Ensure to_tool_file_cmd is passed as a variable
setting on the configure line for (new testsuite) tests.
* doc/libtool.texi (libtool script content): Update with
to_tool_file_cmd description.
(Cygwin to MinGW Cross): Update to mention lt_cv_to_tool_file_cmd.

Signed-off-by: Peter Rosin p...@lysator.liu.se
---
 ChangeLog  |   17 +
 Makefile.am|3 ++-
 configure.ac   |1 +
 doc/libtool.texi   |   26 --
 libltdl/config/ltmain.m4sh |   12 
 libltdl/m4/libtool.m4  |   20 +++-
 tests/testsuite.at |5 -
 7 files changed, 79 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 448393f..f352d14 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2010-09-06  Peter Rosin  p...@lysator.liu.se
+
+   Add file name conversion from $build to toolchain.
+   * configure.ac: Ensure to_tool_file_cmd is available to Makefile.
+   * libltdl/m4/libtool.m4 (_LT_PATH_CONVERSION_FUNCTIONS): Add
+   cache variable lt_cv_to_tool_file_cmd that describes how to
+   convert file names from $build to toolchain format.
+   * libltdl/config/ltmain.m4sh (func_to_tool_file): New function
+   that utilizes the above.
+   * Makefile.am: Ensure to_tool_file_cmd is included in
+   TEST_ENVIRONMENT so that it is passed to (old testsuite) tests.
+   * testsuite.at: Ensure to_tool_file_cmd is passed as a variable
+   setting on the configure line for (new testsuite) tests.
+   * doc/libtool.texi (libtool script content): Update with
+   to_tool_file_cmd description.
+   (Cygwin to MinGW Cross): Update to mention lt_cv_to_tool_file_cmd.
+
 2010-09-02  Ralf Wildenhues  ralf.wildenh...@gmx.de
 
tests: avoid spurious test failure due to library mode on HP-UX.
diff --git a/Makefile.am b/Makefile.am
index 48fbf73..dcd0876 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -518,7 +518,8 @@ TESTS_ENVIRONMENT = MAKE=$(MAKE) CC=$(CC) 
CFLAGS=$(CFLAGS) \
F77=$(F77) FFLAGS=$(FFLAGS) \
FC=$(FC) FCFLAGS=$(FCFLAGS) \
GCJ=$(GCJ) GCJFLAGS=$(GCJFLAGS) \
-   lt_cv_to_host_file_cmd=$(to_host_file_cmd)
+   lt_cv_to_host_file_cmd=$(to_host_file_cmd) \
+   lt_cv_to_tool_file_cmd=$(to_tool_file_cmd)
 
 BUILDCHECK_ENVIRONMENT = _lt_pkgdatadir=$(abs_top_srcdir) \
LIBTOOLIZE=$(abs_top_builddir)/libtoolize \
diff --git a/configure.ac b/configure.ac
index aaa946f..d36adde 100644
--- a/configure.ac
+++ b/configure.ac
@@ -203,6 +203,7 @@ LT_LANG(Windows Resource)
 # Ensure the correct file name (and path) conversion function
 # is available to the test suite.
 AC_SUBST([to_host_file_cmd])dnl
+AC_SUBST([to_tool_file_cmd])dnl
 
 ## --- ##
 ## Work out which tests to run ##
diff --git a/doc/libtool.texi b/doc/libtool.texi
index 573536e..f5d2f97 100644
--- a/doc/libtool.texi
+++ b/doc/libtool.texi
@@ -6230,6 +6230,16 @@ relative file names are used in the build system, and 
non-Windows-supported
 Unix idioms such as symlinks and mount points are avoided, this scenario should
 work.
 
+If you must use absolute file names, you will have to force Libtool to convert
+file names for the toolchain in this case, by doing the following before you
+run configure:
+
+...@example
+...@kbd{export lt_cv_to_tool_file_cmd=func_convert_file_cygwin_to_w32}
+...@end example
+...@cindex lt_cv_to_tool_file_cmd
+...@cindex func_convert_file_cygwin_to_w32
+
 In the @emph{lying} Cygwin to MinGW cross compile case, you lie to the
 build system:
 
@@ -6247,14 +6257,18 @@ running under @emph{Cygwin} and not MinGW.  In this 
case, libtool does
 that you are performing a native MinGW build.  However, as described in
 (@pxref{Native MinGW File Name Conversion}), that scenario triggers an ``MSYS
 to Windows'' file name conversion.  This, of course, is the 

Re: [PATCH 1/7] Add file name conversion from $build to toolchain.

2010-09-05 Thread Charles Wilson
[meta-request: in the future, could you not use whatever option it is
that causes the entire patch message to be stored at attachment to the
actual message...this is a little awkward to reply-to:]

On 9/5/2010 3:58 PM, Peter Rosin wrote:
nothing

...which means all replies have to manually cut-n-paste-as-quotation
which is painful.  Unless somebody knows what option to set in TBird to
DTRT?

On 9/5/2010 3:58 PM, Peter Rosin wrote:
 +...@defvar to_tool_file_cmd

Urk.  I guess I ought to go ahead and define to_host_file_cmd...

You might also want to add a line or two to the new section concerning
the lying cygwin-mingw case:

 ...To force the
 correct file name conversion in this situation, you should do the
 following _before_ running configure:

  export lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32

...Unless you plan to do all of that as part of some other pure-doc patch.

--
Chuck




Re: [PATCH 1/7] Add file name conversion from $build to toolchain.

2010-09-05 Thread Ralf Wildenhues
Hi Peter,

* Peter Rosin wrote on Sun, Sep 05, 2010 at 09:58:58PM CEST:
 Subject: [PATCH 1/7] Add file name conversion from $build to toolchain.
 
 * configure.ac: Ensure to_tool_file_cmd is available to Makefile.
 * libltdl/m4/libtool.m4 (_LT_PATH_CONVERSION_FUNCTIONS): Add
 cache variable lt_cv_to_tool_file_cmd that describes how to
 convert file names from $build to toolchain format.
 * libltdl/config/ltmain.m4sh (func_to_tool_file): New function
 that utilizes the above.
 * Makefile.am: Ensure to_tool_file_cmd is included in
 TEST_ENVIRONMENT so that it is passed to (old testsuite) tests.
 * testsuite.at: Ensure to_tool_file_cmd is passed as a variable
 setting on the configure line for (new testsuite) tests.
 * doc/libtool.texi (libtool script content): Update with
 to_tool_file_cmd description.

OK pending the issues that Charles had with the patch, plus nits below.

 --- a/doc/libtool.texi
 +++ b/doc/libtool.texi
 @@ -6801,6 +6801,14 @@ Linker flag (passed through the C compiler) used to 
 generate thread-safe
  libraries.
  @end defvar
  
 +...@defvar to_tool_file_cmd
 +If the toolchain is not native to the build system (e.g. if you are using

Either comma or @: after e.g.

 +some Unix to drive the scripting together with a Windows toolchain running
 +in Wine) this variable describes how to convert file names from the format
 +used by the build system to the format used by the toolchain. Normally set

Two spaces after end-of-sentence period.

 +to @samp{func_convert_file_noop}.
 +...@end defvar
 +



Re: [PATCH 1/7] Add file name conversion from $build to toolchain.

2010-09-05 Thread Charles Wilson
On 9/5/2010 5:20 PM, Ralf Wildenhues wrote:
 Hi Peter,
 
 * Peter Rosin wrote on Sun, Sep 05, 2010 at 09:58:58PM CEST:
 Subject: [PATCH 1/7] Add file name conversion from $build to toolchain.

 * configure.ac: Ensure to_tool_file_cmd is available to Makefile.
 * libltdl/m4/libtool.m4 (_LT_PATH_CONVERSION_FUNCTIONS): Add
 cache variable lt_cv_to_tool_file_cmd that describes how to
 convert file names from $build to toolchain format.
 * libltdl/config/ltmain.m4sh (func_to_tool_file): New function
 that utilizes the above.
 * Makefile.am: Ensure to_tool_file_cmd is included in
 TEST_ENVIRONMENT so that it is passed to (old testsuite) tests.
 * testsuite.at: Ensure to_tool_file_cmd is passed as a variable
 setting on the configure line for (new testsuite) tests.
 * doc/libtool.texi (libtool script content): Update with
 to_tool_file_cmd description.
 
 OK pending the issues that Charles had with the patch, plus nits below.

Actaully, if you read my recent reply closely, I don't have any issues
with *the patch* that Peter sent.  Only (1) the way the patch was sent
to the mailing list, (2) a note to myself that *I* need to document
to_host_file_cmd, and (3) the single comment about adding to the docu --
which could be part of this patch series or a later patch, as far as I
am concerned.

--
Chuck



Re: [PATCH 1/7] Add file name conversion from $build to toolchain.

2010-09-05 Thread Ralf Wildenhues
* Charles Wilson wrote on Mon, Sep 06, 2010 at 12:13:26AM CEST:
 On 9/5/2010 5:20 PM, Ralf Wildenhues wrote:
  * Peter Rosin wrote on Sun, Sep 05, 2010 at 09:58:58PM CEST:
  Subject: [PATCH 1/7] Add file name conversion from $build to toolchain.

  OK pending the issues that Charles had with the patch, plus nits below.
 
 Actaully, if you read my recent reply closely, I don't have any issues
 with *the patch* that Peter sent.  Only (1) the way the patch was sent
 to the mailing list, (2) a note to myself that *I* need to document
 to_host_file_cmd, and (3) the single comment about adding to the docu --
 which could be part of this patch series or a later patch, as far as I
 am concerned.

Agreed on all accounts.  Sorry for not being precise enough.

Thanks,
Ralf



Re: [PATCH 1/7] Add file name conversion from $build to toolchain.

2010-09-01 Thread Charles Wilson
On 9/1/2010 4:32 PM, Peter Rosin wrote:
 +AC_MSG_CHECKING([how to convert $build file names to toolchain format])
 +AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
 +[#assume ordinary cross tools, or native build.
 +lt_cv_to_tool_file_cmd=func_convert_file_noop
 +case $host in
 +  *mingw* )
 +case $build in
 +  *mingw* ) # actually msys
 +lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
 +;;
 +esac
 +;;
 +esac

Repeating Ralf's commentary to me, if you're using $host then you
should use *-*-mingw*; if you want to use mingw* in the various match
patterns then you should use $host_os.

--
Chuck