[PATCH setup 0/3] Setup replacement for incver_ifdep
Ken Brown
kbrown@cornell.edu
Thu Jan 28 20:17:00 GMT 2016
On 1/28/2016 3:06 PM, Eric Blake wrote:
> On 01/28/2016 11:42 AM, Ken Brown wrote:
>> On 1/28/2016 12:33 PM, Jon Turney wrote:
>>> Future work: I can't see any reason why this script now needs an
>>> independent existence, so it could be absorbed by the info package.
>>
>> That's fine with me. There will be a new version of texinfo soon (it's
>> currently in pretest), so we can make the transition then. But I need
>> to understand the script before I take it over, and I'm confused by the
>> command
>>
>> install-info $f /usr/share/info/dir ||
>> install-info --entry="* $$f ($f): $$f" $$f /usr/share/info/dir
>>
>> First, what do those double dollar signs mean?
>
> If this is from a Makefile snippet, it says that $f is a make variable,
> while $$ turns into a literal $f for the shell that make invokes
> (something like:
>
> install-info foo /usr/share/info/dir || \
> install-info --entry="* $f (foo): $f" $f /usr/share/info/dir
>
> but I don't have the full context for where $f is being defined for why
> it is sometimes expanded in make and others by the shell.
It's not a Makefile snippet; it's a snippet from a bash shell script. Here's more context:
for f in /usr/share/info/*; do
case "$f" in
*\**)
;;
*/dir|*/dir.info*)
;;
*-[0123456789]*)
;;
*)
install-info $f /usr/share/info/dir ||
install-info --entry="* $$f ($f): $$f" $$f /usr/share/info/dir
;;
esac
done
It looks to me like all those double dollar signs will just get expanded to the PID of the bash process, so that the second install-info command is nonsense. But maybe I'm missing something.
Ken
More information about the Cygwin-apps
mailing list