[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cygwin] cwrapper emits wrapper script

From: Charles Wilson
Subject: Re: [cygwin] cwrapper emits wrapper script
Date: Thu, 07 Jun 2007 05:20:04 -0400
User-agent: Thunderbird (Windows/20070509)

Peter O'Gorman wrote:
On Wed, 2007-06-06 at 10:25 -0400, Charles Wilson wrote:
2007-04-27  Charles Wilson  <address@hidden>

        * ltmain.m4sh (func_emit_libtool_wrapper_script): add
        code block to handle cases when wrapper script is in $objdir.
        (func_emit_libtool_cwrapperexe_source): replace DEBUG() macro
        with namespace-safe LTWRAPPER_DEBUGPRINTF(). Call
        func_emit_libtool_wrapper_script() with appropriate filters to
        embed script text in C char* static variable.
        (f_e_l_c_s: main): add new option --lt-dump-script, parse argv[]
        for it, and take appropriate action.  Call chase_symlinks()
        on argv[0], in case this.exe was launched via one.  Use chased
        value to determine full absolute pathname of wrapper script, in
        $objdir. Unconditionally write script out to this pathname and
        set permission bits.  Remove extraneous ';' from debugging loop.
        (f_e_l_c_s: main) [mingw]: DOS-ize $SHELL before populating
        newargv[0]; if $TARGETSHELL environment variable is set, use
        it instead of $SHELL and do not DOS-ize.  Ensure newargv[1]
        (wrapper script absolute path) uses only '/', not '\'.  Make
        sure to call execv() with DOS-ized $SHELL (or un-DOS-ized
        $TARGETSHELL, if set)
        (f_e_l_c_s: make_executable): new function
        (f_e_l_c_s: chase_symlinks): new function (no-op if !S_ISLNK)

2007-04-27  Charles Wilson  <address@hidden>

        * ltmain.m4sh (func_emit_libtool_cwrapperexe_source):
        ensure that generated source follows GCS as nearly as

Ok. Causes no regressions for me on linux or darwin, and nothing jumps
out at me, please feel free to exercise your commit bit on these :-)
I am not, unfortunately, able to test on windows.

Committed (both chunks, but separately).

The funny thing is, the hardest part was setting up an MTA under cygwin so that the commit script could work. I ended up having to recompile cygwin's ssmtp package to add SSL support, since my mailhost doesn't support unencrypted...

Noah gave a good suggestion about passing
WRAPPER_SCRIPT_BELONGS_IN_OBJDIR as an argument, but, I agree, it can be
left to a later patch.

Yes, I will make that change. However, I'd like to get part 3 of my 3-patch sequence up for consideration first. It's the last step in finally eliminating the "./foo (sh wrapper) vs. ./foo.exe (C wrapper) in the same directory" confusion on cygwin and mingw.

I need to update original patch and run it thru my gamut of tests, but the old version is here:

At some point it would be nice to emit
func_emit_libtool_cwrapperexe_source from config.status, saving 550
lines of code from libtool on non-windows platforms. But I'm just
dreaming, you can ignore that :)

Good, because I wouldn't know where to start, pushing something into config.status.

Thanks for your review and testing.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]