-----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 [EMAIL PROTECTED] -----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-----