Code

Use a more "natural" way of writing argument lists in extra-opts tests.
[nagiosplug.git] / plugins-scripts / Makefile.am
index 4c94f2cbb31d1f7a60164360715602f239354ef8..d1ea3c4111a888c1af0fd38ca7c254c54f64dc8c 100644 (file)
@@ -1,12 +1,13 @@
 ## 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
-
-export NP_VERSION:= $(NP_VERSION)
+endif
 
 SUFFIXES = .pl .sh
 
@@ -26,8 +27,6 @@ TESTS_ENVIRONMENT=perl -I $(top_builddir) -I $(top_srcdir)
 
 TESTS = @SCRIPT_TEST@
 
-all-local: NP-VERSION-FILE
-
 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
@@ -39,11 +38,11 @@ test-debug:
 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: