This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: [PATCH setup 0/3] Setup replacement for incver_ifdep
- From: Ken Brown <kbrown at cornell dot edu>
- To: cygwin-apps at cygwin dot com
- Date: Thu, 28 Jan 2016 15:17:25 -0500
- Subject: Re: [PATCH setup 0/3] Setup replacement for incver_ifdep
- Authentication-results: sourceware.org; auth=none
- References: <87lhb8htrh dot fsf at Rainer dot invalid> <561FA783 dot 900 at dronecode dot org dot uk> <87oag0qad3 dot fsf at Rainer dot invalid> <20151019154100 dot GB18989 at calimero dot vinschen dot de> <87io62hiz6 dot fsf at Rainer dot invalid> <20151020102150 dot GF5319 at calimero dot vinschen dot de> <56532D34 dot 4090102 at dronecode dot org dot uk> <87bnakmtqc dot fsf at Rainer dot invalid> <56549774 dot 2090008 at dronecode dot org dot uk> <87ziy3utip dot fsf at Rainer dot invalid> <20151126101120 dot GA6674 at calimero dot vinschen dot de> <56AA50E4 dot 2040105 at dronecode dot org dot uk> <56AA6128 dot 8030700 at cornell dot edu> <56AA74BE dot 4010208 at redhat dot com>
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