[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Possible Unnecessary Code in expand.c
From: |
Jon Forrest |
Subject: |
Possible Unnecessary Code in expand.c |
Date: |
Mon, 3 Jan 2022 20:06:21 -0800 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 |
In expand.c starting at line 340 there's code to put a '%'
character at the beginning of pattern and replace. So far,
so good.
Then, at line 354 to 370 there's code to look for '%' in these
variables. Different actions are taken depending on whether '%' is
found.
But, since you just stuck the '%' in these variables, how
could this code ever fail to find a '%'?
What could happen is that there could be more than one '%',
such as in
bar := $(foo:%.o=%.c)
(taken from the Gmake manual). Internally search would expand to
"%%.o"
and replace to
"%%.c:
But, this is a different situation. I don't see why the code
in lines 354 to 370 is necessary.
What am I missing?
Thanks,
Jon
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Possible Unnecessary Code in expand.c,
Jon Forrest <=