[libvirt] [PATCH] Replace @SYSCONFDIR@ with ::SYSCONFDIR:: to avoid syntax-check warning

Daniel P. Berrange berrange at redhat.com
Wed Jun 22 16:29:05 UTC 2011


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
---
 cfg.mk                     |    3 ---
 tools/Makefile.am          |    4 ++--
 tools/virt-pki-validate.in |    2 +-
 tools/virt-xml-validate.in |    2 +-
 4 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index 5d3ef26..c2230b8 100644
--- a/cfg.mk
+++ b/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 a/tools/Makefile.am b/tools/Makefile.am
index 826674a..7a1a5c6 100644
--- a/tools/Makefile.am
+++ b/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, at 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, at SYSCONFDIR@,$(sysconfdir),' < $< > $@ \
+	$(AM_V_GEN)sed -e 's,::SYSCONFDIR::,$(sysconfdir),' < $< > $@ \
 	    || (rm $@ && exit 1) && chmod +x $@
 
 virt-pki-validate.1: virt-pki-validate.in
diff --git a/tools/virt-pki-validate.in b/tools/virt-pki-validate.in
index 01825d1..f429d77 100755
--- a/tools/virt-pki-validate.in
+++ b/tools/virt-pki-validate.in
@@ -25,7 +25,7 @@ echo Found "$CERTOOL"
 #
 # Check the directory structure
 #
-SYSCONFDIR="@SYSCONFDIR@"
+SYSCONFDIR="::SYSCONFDIR::"
 PKI="$SYSCONFDIR/pki"
 if [ ! -d "$PKI" ]
 then
diff --git a/tools/virt-xml-validate.in b/tools/virt-xml-validate.in
index 1959261..33f6c0f 100644
--- a/tools/virt-xml-validate.in
+++ b/tools/virt-xml-validate.in
@@ -57,7 +57,7 @@ if [ -z "$TYPE" ]; then
   esac
 fi
 
-SCHEMA="@SCHEMADIR@/${TYPE}.rng"
+SCHEMA="::SCHEMADIR::/${TYPE}.rng"
 
 if [ ! -f "$SCHEMA" ]; then
   echo "$0: schema $SCHEMA does not exist"
-- 
1.7.4.4




More information about the libvir-list mailing list