[tz] iana build failures on Windows
Paul Eggert
eggert at cs.ucla.edu
Fri Oct 28 22:49:01 UTC 2022
On 2022-10-28 02:03, Manuela Friedrich wrote:
> Hello Paul,
>
> recent changes in the sources cause build failures on Windows, see:
>
> nmake /A /D /C /S
> makefile(828) : U1002: syntax error : invalid macro invocation '$'
> Stop.
>
> The related change was
> https://github.com/eggert/tz/commit/34c4662760df3af2ad9ec0aab5cc3ffba51dde80
>
> Makefile
> - $(AWK) '/^Link/ {print $$3}' backward | LC_ALL=C sort -cu
> + $(AWK) '/^Link/ {printf "%.5d %s\n", g, $$3} /^$$/ {g++}' \
> + backward | LC_ALL=C sort -cu
I don't see anything wrong with those two new lines, so it appears that
this is a bug in Microsoft nmake. I can't easily run nmake and so would
appreciate your help in coming up with a workaround.
Which version of nmake are you using?
What is the value of AWK in your Makefile?
What is in your environment? If you run the shell command
env | grep '\$'
is there anything there with a dollar sign? I ask because this sort of
thing has been a problem in the past; see:
https://jeffpar.github.io/kbarchive/kb/075/Q75079/
Does it work around the bug if you set 'DOLLAR = $$' in the Makefile,
and then use '$(DOLLAR)' instead of '$$'?
What happens if you run nmake in an otherwise-empty directory that
contains the attached Makefile? Here is what I see when I run GNU Make
4.3; what output do you see?
echo 'Link A B' >backward
awk '/^Link/ {printf "%.5d %s\n", g, $3} /^$/ {g++}' \
backward | LC_ALL=C sort -cu
Can you think of any other way to work around the nmake bug? Perhaps you
can edit the attached Makefile and get it to work.
-------------- next part --------------
AWK = awk
DOLLAR = $$
default: backward
$(AWK) '/^Link/ {printf "%.5d %s\n", g, $$3} /^$(DOLLAR)/ {g++}' \
backward | LC_ALL=C sort -cu
backward:
echo 'Link A B' >$@
More information about the tz
mailing list