Michel Schinz <Michel.Schinz@epfl.ch> writes:
>> I wonder why other people did not choose this way but provided
>> separate executables?
>
> I have no idea. Maybe, on some occasions, the "-config" tool can be
> significantly smaller than the main tool, and start faster. In our
> case, though, since scsh-config is a scsh script, it is actually the
> other way around.
At least guile-config is doing it exacly like scsh-config ;-)
>>> Now that I think about it, why not do the following:
>>>
>>> - make all configuration parameters accessible in scsh through
>>> variables or functions,
>>
>> What exactly do you mean by configuration parameter? The variables
>> substituted into the Makefile by configure or more complex stuff like
>> the output of scsh-config --libs?
>
> I guess that what's currently available through scsh-config should at
> least be available easily (i.e. through a single variable access or
> function call), otherwise it will be painful to use. As far as the
> rest is concerned (i.e. "configure" variables), if there is a use for
> them they could be provided, but I don't know if it is the case.
Okay.
>
>> So all you would save by adding another command line option instead
>> of using the -c option is a call to DISPLAY? That sounds like a
>> waste of command line options to me...
>
> Yes, that's all you would save, but it includes a pair of parenthesis,
> and often a pair of quotes to prevent the shell from interpreting the
> parenthesis. Thus, you would write this:
>
> scsh -p scsh-config-libs
>
> instead of that:
>
> scsh -c '(display scsh-config-libs)'
>
> (and in fact, the last line above has a slight problem: DISPLAY
> doesn't put an end-of-line at the end of its output, which means that
> when used interactively, the output of the above command gets at least
> partially overwritten by the next shell prompt. So you might want to
> write this instead:
>
> scsh -c '(begin (display scsh-config-libs) (newline))'
>
> in which case the savings become consequent. But that's only for
> interactive use, and one typically doesn't use these commands
> interactively).
And you could use FORMAT to produce the newline with far less
typing...
> I agree that, unless you take interactive use into consideration, the
> differences are small, and one could use -c easily.
Okay, so I will not install scsh-config in 0.6.5 and add a package
that provides the configuration parameters for the 0.7 release.
--
Martin
|