[libvirt] [PATCH] Change logrotate to be per-hypervisor logs

Eric Blake eblake at redhat.com
Wed Mar 10 16:22:16 UTC 2010

On 03/10/2010 03:29 AM, Daniel Veillard wrote:
>> It would probably be better to write:
>> 	    -e 's![@]localstatedir[@]!$(localstatedir)!g'	\
>> as the substitution.
>> Other than that, you have my ACK
>   Okay, I was afraid at first that the quoting of the expression would
> defeat make variable substitution, but that works :-)

Make uses textual substitution, and the only escaping it manages are $
expansion and \-newline collapses.  '' quoting doesn't come into play
until later, when sh is handed the already-substituted string.  So it is
quite common to see '$(var)' constructs in make, with single rather than
double quotes, since then var is treated literally unless it contains an
embedded '.  It's also common to see GNU make constructs to properly
escape embedded ', to provide truly robust make expansion.

Yes, that makes make an awful language to master, since there are two
levels of quoting to remember since two different tools will be
performing expansions.

No wonder automake is so complex: automake developers have to be
polyglots, to write a perl script that uses m4 to generate makefile
snippets containing portable shell code for building C programs.
Maintainers of Makefile.am are isolated from a little of this, but it's
still useful to know lots of languages.  :)

Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 323 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100310/f5522a93/attachment-0001.sig>

More information about the libvir-list mailing list