Code

Use a more "natural" way of writing argument lists in extra-opts tests.
[nagiosplug.git] / plugins-scripts / Makefile.am
index 39291c8063b190f89c3a3cf9158f8855800c2572..d1ea3c4111a888c1af0fd38ca7c254c54f64dc8c 100644 (file)
@@ -1,5 +1,14 @@
 ## Process this file with automake to produce Makefile.in
 
+if RELEASE_PRESENT
+NP_VERSION = $(PACKAGE_VERSION)
+else
+NP-VERSION-FILE: .FORCE-NP-VERSION-FILE
+       @$(SHELL_PATH) $(top_srcdir)/NP-VERSION-GEN
+.FORCE-NP-VERSION-FILE:
+-include NP-VERSION-FILE
+endif
+
 SUFFIXES = .pl .sh
 
 VPATH=$(top_srcdir) $(top_srcdir)/plugins-scripts $(top_srcdir)/plugins-scripts/t
@@ -20,13 +29,22 @@ TESTS = @SCRIPT_TEST@
 
 test:
        perl -I $(top_builddir) -I $(top_srcdir) ../test.pl
+       perl -I $(top_builddir) -I $(top_srcdir) ../test.pl t/utils.t   # utils.t is excluded from above, so manually ask to test
+
+test-debug:
+       NPTEST_DEBUG=1 HARNESS_VERBOSE=1 perl -I $(top_builddir) -I $(top_srcdir) ../test.pl
+       NPTEST_DEBUG=1 HARNESS_VERBOSE=1 perl -I $(top_builddir) -I $(top_srcdir) ../test.pl t/utils.t  # utils.t is excluded from above, so manually ask to test
 
 CLEANFILES=$(libexec_SCRIPTS)
 
 .pl :
-       $(AWK) -f ./subst $< > $@
+       NP_VERSION=$(NP_VERSION) $(AWK) -f ./subst $< > $@
        chmod +x $@
 
 .sh :
-       $(AWK) -f ./subst $< > $@
+       NP_VERSION=$(NP_VERSION) $(AWK) -f ./subst $< > $@
        chmod +x $@
+
+clean-local:
+       rm -f NP-VERSION-FILE
+