fence-agents/0001-Avoid-problem-with-broken-make-variable-expansion.patch

39 lines
1.6 KiB
Diff
Raw Normal View History

From 40ac206ebec011623ea6234229922d39d9eed4b7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kristoffer=20Gr=C3=B6nlund?= <krig@koru.se>
Date: Mon, 15 Dec 2014 14:45:34 +0100
Subject: [PATCH] Avoid problem with broken make variable expansion
---
make/agentpycheck.mk | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/make/agentpycheck.mk b/make/agentpycheck.mk
index 090116b..2209bdf 100644
--- a/make/agentpycheck.mk
+++ b/make/agentpycheck.mk
@@ -1,19 +1,18 @@
TEMPFILE:=$(shell mktemp)
#DATADIR:=$(abs_top_builddir)/tests/data/metadata
DATADIR:=$(abs_top_srcdir)/tests/data/metadata
-AWK='BEGIN {store=-1} /name=\"store_path\"/ {store=2} {if (store!=0) {print}; store--}'
check: $(TARGET:%=xml-check.%) $(SYMTARGET:%=xml-check.%) $(TARGET:%=delay-check.%)
xml-check.%: %
$(eval INPUT=$(subst xml-check.,,$@))
- PYTHONPATH=$(abs_srcdir)/../lib:$(abs_builddir)/../lib python ./$(INPUT) -o metadata | awk $(AWK) > $(TEMPFILE)
+ PYTHONPATH=$(abs_srcdir)/../lib:$(abs_builddir)/../lib python ./$(INPUT) -o metadata | awk 'BEGIN {store=-1} /name=\"store_path\"/ {store=2} {if (store!=0) {print}; store--}' > $(TEMPFILE)
diff $(TEMPFILE) $(DATADIR)/$(INPUT).xml
rm $(TEMPFILE)
xml-upload.%: %
$(eval INPUT=$(subst xml-upload.,,$@))
- PYTHONPATH=$(abs_srcdir)/../lib:$(abs_builddir)/../lib python ./$(INPUT) -o metadata | awk $(AWK) > $(DATADIR)/$(INPUT).xml
+ PYTHONPATH=$(abs_srcdir)/../lib:$(abs_builddir)/../lib python ./$(INPUT) -o metadata | awk 'BEGIN {store=-1} /name=\"store_path\"/ {store=2} {if (store!=0) {print}; store--}' > $(DATADIR)/$(INPUT).xml
# If test will fail, rerun fence agents to show problems
delay-check.%: %
--
2.2.0