Re: [Libguestfs] [PATCH 03/13] syntax-check: fix makefile_at_at_check

2014-09-23 Thread Richard W.M. Jones
On Tue, Sep 23, 2014 at 05:20:29PM +0800, Hu Tao wrote:
>  check-valgrind:
> - $(MAKE) VG="$(top_builddir)/run @VG@" check
> + $(MAKE) VG="$(top_builddir)/run $(VG)" check

make syntax-check is definitely wrong about these.  We must not use
$(VG) here since it will cause VG to be expanded at the wrong place.

>  # Old RHEL 5 autoconf defines these, but RHEL 5 automake doesn't
>  # create variables for them.  So define them here if they're not
>  # defined already.
> -builddir ?= @builddir@
> -abs_builddir ?= @abs_builddir@
> -srcdir   ?= @srcdir@
> -abs_srcdir   ?= @abs_srcdir@
> +builddir ?= $(builddir)
> +abs_builddir ?= $(abs_builddir)
> +srcdir   ?= $(srcdir)
> +abs_srcdir   ?= $(abs_srcdir)

This is also wrong because RHEL 5 (which is what these rules target)
didn't support the $(..) syntax.

Sorry, but make syntax-check is largely broken, or at least advisory.

Maybe it's better to remove it if it doesn't do anything useful?

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top

___
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs


[Libguestfs] [PATCH 03/13] syntax-check: fix makefile_at_at_check

2014-09-23 Thread Hu Tao
Signed-off-by: Hu Tao 
---
 align/Makefile.am|  2 +-
 builder/Makefile.am  |  2 +-
 builder/website/Makefile.am  |  2 +-
 cat/Makefile.am  |  4 ++--
 common-rules.mk  |  8 
 customize/Makefile.am|  2 +-
 df/Makefile.am   |  4 ++--
 diff/Makefile.am |  2 +-
 erlang/examples/Makefile.am  |  4 ++--
 examples/Makefile.am | 16 
 fish/Makefile.am |  2 +-
 format/Makefile.am   |  2 +-
 golang/examples/Makefile.am  |  4 ++--
 inspector/Makefile.am|  4 ++--
 java/examples/Makefile.am|  4 ++--
 lua/Makefile.am  |  2 +-
 lua/examples/Makefile.am |  4 ++--
 make-fs/Makefile.am  |  2 +-
 mllib/Makefile.am|  2 +-
 ocaml/Makefile.am|  2 +-
 ocaml/examples/Makefile.am   |  4 ++--
 perl/examples/Makefile.am|  4 ++--
 python/examples/Makefile.am  |  4 ++--
 rescue/Makefile.am   |  2 +-
 resize/Makefile.am   |  2 +-
 ruby/examples/Makefile.am|  4 ++--
 sparsify/Makefile.am |  2 +-
 src/Makefile.am  |  2 +-
 sysprep/Makefile.am  |  4 ++--
 test-tool/Makefile.am|  2 +-
 tests/c-api/Makefile.am  |  2 +-
 tests/fuzz/Makefile.am   |  2 +-
 tests/mount-local/Makefile.am|  2 +-
 tests/parallel/Makefile.am   |  2 +-
 tests/relative-paths/Makefile.am |  2 +-
 v2v/Makefile.am  |  2 +-
 36 files changed, 58 insertions(+), 58 deletions(-)

diff --git a/align/Makefile.am b/align/Makefile.am
index 4ecbf7e..ed59c7a 100644
--- a/align/Makefile.am
+++ b/align/Makefile.am
@@ -98,4 +98,4 @@ TESTS += \
 endif
 
 check-valgrind:
-   $(MAKE) VG="$(top_builddir)/run @VG@" check
+   $(MAKE) VG="$(top_builddir)/run $(VG)" check
diff --git a/builder/Makefile.am b/builder/Makefile.am
index eb6295a..843bac1 100644
--- a/builder/Makefile.am
+++ b/builder/Makefile.am
@@ -245,7 +245,7 @@ TESTS += test-virt-builder.sh
 endif ENABLE_APPLIANCE
 
 check-valgrind:
-   $(MAKE) VG="$(top_builddir)/run @VG@" check
+   $(MAKE) VG="$(top_builddir)/run $(VG)" check
 
 check-slow:
$(MAKE) TESTS="test-virt-builder-planner.sh" check
diff --git a/builder/website/Makefile.am b/builder/website/Makefile.am
index a2d29df..967a4fb 100644
--- a/builder/website/Makefile.am
+++ b/builder/website/Makefile.am
@@ -41,4 +41,4 @@ TESTS_ENVIRONMENT = $(top_builddir)/run --test
 TESTS = validate.sh
 
 check-valgrind:
-   $(MAKE) VG="$(top_builddir)/run @VG@" check
+   $(MAKE) VG="$(top_builddir)/run $(VG)" check
diff --git a/cat/Makefile.am b/cat/Makefile.am
index 14b8e81..8165589 100644
--- a/cat/Makefile.am
+++ b/cat/Makefile.am
@@ -198,9 +198,9 @@ TESTS = \
 endif ENABLE_APPLIANCE
 
 check-valgrind:
-   $(MAKE) VG="$(top_builddir)/run @VG@" check
+   $(MAKE) VG="$(top_builddir)/run $(VG)" check
 
 check-valgrind-local-guests:
for g in $(GUESTS); do \
- $(top_builddir)/run --test @VG@ ./virt-filesystems -c 
"$(libvirt_ro_uri)" -d "$$g" --all --long -h --uuid || exit $$?; \
+ $(top_builddir)/run --test $(VG) ./virt-filesystems -c 
"$(libvirt_ro_uri)" -d "$$g" --all --long -h --uuid || exit $$?; \
done
diff --git a/common-rules.mk b/common-rules.mk
index 312107e..abee902 100644
--- a/common-rules.mk
+++ b/common-rules.mk
@@ -23,7 +23,7 @@
 # Old RHEL 5 autoconf defines these, but RHEL 5 automake doesn't
 # create variables for them.  So define them here if they're not
 # defined already.
-builddir ?= @builddir@
-abs_builddir ?= @abs_builddir@
-srcdir   ?= @srcdir@
-abs_srcdir   ?= @abs_srcdir@
+builddir ?= $(builddir)
+abs_builddir ?= $(abs_builddir)
+srcdir   ?= $(srcdir)
+abs_srcdir   ?= $(abs_srcdir)
diff --git a/customize/Makefile.am b/customize/Makefile.am
index 746375d..0f2571b 100644
--- a/customize/Makefile.am
+++ b/customize/Makefile.am
@@ -182,7 +182,7 @@ TESTS = test-virt-customize.sh
 endif
 
 check-valgrind:
-   $(MAKE) VG="$(top_builddir)/run @VG@" check
+   $(MAKE) VG="$(top_builddir)/run $(VG)" check
 
 # Dependencies.
 depend: .depend
diff --git a/df/Makefile.am b/df/Makefile.am
index 29e0bf5..e6ab953 100644
--- a/df/Makefile.am
+++ b/df/Makefile.am
@@ -101,7 +101,7 @@ TESTS += \
 endif ENABLE_APPLIANCE
 
 check-valgrind:
-   $(MAKE) VG="$(top_builddir)/run @VG@" check
+   $(MAKE) VG="$(top_builddir)/run $(VG)" check
 
 check-valgrind-local-guests:
-   $(top_builddir)/run --test @VG@ ./virt-df -c "$(libvirt_ro_uri)"
+   $(top_builddir)/run --test $(VG) ./virt-df -c "$(libvirt_ro_uri)"
diff --git a/diff/Makefile.am b/diff/Makefile.am
index 3c2c211..2735626 100644
--- a/diff/Makefile.am
+++ b/diff/Makefile.am
@@ -84,4 +84,4 @@ TESTS = \
 endif ENABLE_APPLIANCE
 
 check-valgrind:
-   $(MAKE) VG="$(top_builddir)/run @VG@" check
+   $(MAKE) VG="$(top_buil