[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] [mingw|cygwin] Modify cwrapper to invoke target directly.
From: |
Eric Blake |
Subject: |
Re: [PATCH] [mingw|cygwin] Modify cwrapper to invoke target directly. |
Date: |
Fri, 23 May 2008 06:37:49 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080421 Thunderbird/2.0.0.14 Mnenhy/0.7.5.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Charles Wilson on 5/22/2008 8:18 PM:
| Eric Blake wrote:
|> Slightly better, but what about:
|>
|> m4 --some-option --lt-...
|>
|> You don't know whether --some-option takes an argument, and the developer
|> really intended to pass the literal string --lt-... as the argument to
|> that option, or if --some-option takes no argument, so --lt-... is a true
|> wrapper option. I'd really feel more comfortable if all --lt-* were
|> leading, since otherwise the wrapper can't distinguish options from
|> option
|> arguments.
|
| It seems more clear to me, if we simply assert "all options in the
| --lt-* namespace (or configure-time/LT_INIT option
| --ltwrapper-option-namespace=) belong to the wrapper". The target is NOT
| allowed to use them.
Yes, I agree. But I would prefer if we also required that --lt-* must
appear first (otherwise, you can't tell if it is a true option, or
arbitrary text being passed as a true argument). In a way, this makes the
wrapper parsing easier - quit on the first unrecognized argument, rather
than checking every single argument.
| As far as options with/without arguments, it's very simple: the wrapper
| gets first crack, and REMOVES all options (and /their/ arguments) from
| the passed-on argv vector. Thus:
|
| wrapper.exe --lt-env-set foo=bar --opt1 --lt-env-set=baz=jump
| arg1_for_opt1 --lt-env-append=bob=fred arg2_for_opt1 -o -b another_arg
| --lt-env-prepend PATH=local_path
|
|
| turns in to
|
| target.exe --opt1 arg1_for_opt1 arg2_for_opt1 -o -b another_arg
A bit weird, but I can live with it. After all, this only affects running
the uninstalled binary, which you generally only do in your testsuite,
which is a controlled environment. And it is simple enough to document.
|
| The '--' issue aside, you're the one worried about possible clashes with
| the --lt-* option namespace.
Only mildly worried, enough to mention it. I don't want to spend any
effort coding around it unless someone (and it won't be me) demonstrates a
real need for the extra flexability. So I think we're in violent
agreement - let's go ahead and implement your proposal, of scanning ALL
arguments for --lt-* regardless of position then stripping them, even if
they appear in between the target's option and its argument or occur after
a -- argument for the target, and not worry about any prefix besides
- --lt-* for now.
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkg2up0ACgkQ84KuGfSFAYCJdgCeOomYbzc8B0pm2aRTp9B89OfJ
p4AAnistyowUFcPED3c8Zp5CccK+xtbt
=t1tj
-----END PGP SIGNATURE-----
Re: [PATCH] [mingw|cygwin] Modify cwrapper to invoke target directly., Ralf Wildenhues, 2008/05/06
Re: [PATCH] [mingw|cygwin] Modify cwrapper to invoke target directly., Charles Wilson, 2008/05/09
Re: [PATCH] [mingw|cygwin] Modify cwrapper to invoke target directly., Charles Wilson, 2008/05/13