Re: m4 macro expansion problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey Zack!

Many thanks for your reposne!

I'll not quote you, to keep mine short.

No, I wasn't aware that the macro wouold be executed several times. It's
a pity, but I do think it will do exactly the same thing eeach time. And
at the moemnt, as soon as we use some components of VERSION in the build
system, we invoke several shell scripts to extract them from the version
file so I think that even if the m4_syscmd is executed several tim it
will be during autoconf execution, so the potential overhead will affect
less people than what happens currently when VERSION is accessed during
the build. Just whan question I have:

Zack Weinberg (2021/08/25 11:39 -0400):
> m4_syscmd is a primitive, and it doesn't expand its argument, so you need to expand PKG_VERSION first:
>
> m4_syscmd([cat > VERSION << \END_OF_VERSION_FILE
> ]PKG_VERSION[
>
> # Some comments about the format of version numbers
> END_OF_VERSION_FILE
> ])
I double-checked my code and there was no \ before END_OF_VERSION_FILE
and the code was working so may I ask why you added one in your code?
Was it an accident or was it intended and, in the last case, whats's the
purpose of such a change?

Thanks again, your answer was really helpful!

Sébastien.

>
> zw
>




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux