
On Wed, Jun 22, 2011 at 10:36:19AM -0600, Eric Blake wrote:
On 06/22/2011 10:29 AM, Daniel P. Berrange wrote:
make syntax-check complains if any Makefile.am uses the old style @FOO@ for replacement, rather than $(FOO).
Unfortunately the tools/Makefile.am intentionally uses the @FOO@ syntax for generating some scripts. Currently these are whitelisted in cfg.mk, but adding more to this whitelist makes the entire check rather worthless.
This changes the tools/ directory to use ::FOO:: as the replacement syntax for virt-pki-validate.in and virt-xml-validate.in
* tools/Makefile.am, tools/virt-pki-validate.in tools/virt-xml-validate.in: Change @FOO@ to ::FOO:: * cfg.mk: Remove _makefile_at_at_check_exceptions
Hmm, I'm thinking we should go for a v2.
The @FOO@ notation in virt-xml-validate.in is pretty idiomatic, so instead of changing to ::FOO::, why don't we instead change tools/Makefile.am to not fall foul of the syntax check rule in the first place, with a well-placed regex bracket sequence?
Yep, that works for me
Smaller patches are always nicer :)
diff --git i/cfg.mk w/cfg.mk index 5d3ef26..c2230b8 100644 --- i/cfg.mk +++ w/cfg.mk @@ -581,9 +581,6 @@ _autogen: $(srcdir)/autogen.sh ./config.status
-# Exempt @...@ uses of these symbols. -_makefile_at_at_check_exceptions = ' && !/(SCHEMA|SYSCONF)DIR/' - # regenerate HACKING as part of the syntax-check syntax-check: $(top_srcdir)/HACKING
diff --git i/tools/Makefile.am w/tools/Makefile.am index 826674a..909c4b2 100644 --- i/tools/Makefile.am +++ w/tools/Makefile.am @@ -23,14 +23,14 @@ dist_man1_MANS = virt-xml-validate.1 virt-pki-validate.1 virsh.1
virt-xml-validate: virt-xml-validate.in Makefile - $(AM_V_GEN)sed -e 's,@SCHEMADIR@,$(pkgdatadir)/schemas,' < $< > $@ \ + $(AM_V_GEN)sed -e 's,[@]SCHEMADIR@,$(pkgdatadir)/schemas,' < $< > $@ \ || (rm $@ && exit 1) && chmod +x $@
virt-xml-validate.1: virt-xml-validate.in $(AM_V_GEN)$(POD2MAN) $< $(srcdir)/$@
virt-pki-validate: virt-pki-validate.in Makefile - $(AM_V_GEN)sed -e 's,@SYSCONFDIR@,$(sysconfdir),' < $< > $@ \ + $(AM_V_GEN)sed -e 's,[@]SYSCONFDIR@,$(sysconfdir),' < $< > $@ \ || (rm $@ && exit 1) && chmod +x $@
virt-pki-validate.1: virt-pki-validate.in
ACK Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|