Re: [PATCH 2/2] tests: fix helldl rule generation in _LT_DEMO_SETUP macro

Eric Blake <[email protected]>
Newsgroups gmane.comp.gnu.libtool.patches
Organization Red Hat, Inc.
Message-ID <[email protected]>
On 3/14/19 5:46 PM, Nikolai Merinov wrote:
> * tests/demo.at (_LT_DEMO_SETUP): $@ expanded to empty string during
>   _LT_DEMO_SETUP expanding. Avoid $@ usage inside m4_define call.

It is not necessary to avoid $@, you just merely have to quote it so
that m4 doesn't eat it.

> ---
>  tests/demo.at | 15 ++++++++++-----
>  1 file changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/tests/demo.at b/tests/demo.at
> index 4eb156cf..a10520b0 100644
> --- a/tests/demo.at
> +++ b/tests/demo.at
> @@ -121,11 +121,16 @@ else
>  
>  # Create a script that says that -dlopen is not supported.
>  bin_SCRIPTS = helldl
> -helldl helldl$(EXEEXT):
> -	rm -rf $@
> -	echo '#! /bin/sh' > $@
> -	echo 'echo sorry, -dlopen is unsupported' >> $@
> -	chmod +x $@

Writing $[@] is generally sufficient to keep m4 from eating things.  If
that fails, m4sh supports quadrigraphs, where you can write @S|@@ to get
$@ in the resulting file.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAlyK7sYACgkQp6FrSiUn
Q2o37QgAgMVo5CV5O/0i/P8RlKrSxx36/inrBKAxP2YuvNjAZ4whMFMbmvFb+fdf
2MUN9SDuLW0rtuNLw2/cZP5RXSVZzMBA/yhfDt6AQ/SPNLPttgia+YIZzlkjgWzy
gNlfOvItJ7FNj43KfsF5/dq04q4C0DbWQg8nElLKJ7QXs8Q8eo4A+iU2Yk0hEufk
f7tVipU+8F73KJqrwoDzhzlfB9fjplKVd872IAxiM6koXvWGqelp0p/qdM2+fL7O
hYNVFWI1ijIK9ynvcH5Od+wp/7nT3S91yfcIq6fjQx+PzjT46AGNA7iNjupZ9G05
vsHUCVa/LHwt7eLjZ5c5lIctN7jVlw==
=lF+w
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.