Merge pull request #1311 from waja/check_ntp_remove_unused_variables
[monitoring-plugins.git] / plugins-scripts / Makefile.am
blobea65aed1bf3818a5c97fb967bd5fc4755d26f85b
1 ## Process this file with automake to produce Makefile.in
3 if RELEASE_PRESENT
4 NP_VERSION = @NP_RELEASE@
5 else
6 NP-VERSION-FILE: .FORCE-NP-VERSION-FILE
7         @$(SHELL_PATH) $(top_srcdir)/NP-VERSION-GEN
8 .FORCE-NP-VERSION-FILE:
9 -include NP-VERSION-FILE
10 endif
12 SUFFIXES = .pl .sh
14 VPATH=$(top_srcdir) $(top_srcdir)/plugins-scripts $(top_srcdir)/plugins-scripts/t
16 libexec_SCRIPTS = check_breeze check_disk_smb check_flexlm check_ircd \
17         check_log check_oracle check_rpc check_sensors check_wave \
18         check_ifstatus check_ifoperstatus check_mailq check_file_age \
19         utils.sh utils.pm
21 EXTRA_DIST=check_breeze.pl check_disk_smb.pl check_flexlm.pl check_ircd.pl \
22         check_log.sh check_oracle.sh check_rpc.pl check_sensors.sh \
23         check_ifstatus.pl check_ifoperstatus.pl check_wave.pl check_mailq.pl check_file_age.pl \
24         utils.sh.in utils.pm.in t
26 EDIT = sed \
27   -e 's|[@]NP_VERSION[@]|$(NP_VERSION)|g' \
28   -e 's|[@]TRUSTED_PATH[@]|$(with_trusted_path)|g' \
29   -e 's|[@]PERL[@]|$(PERL)|g' \
30   -e 's|[@]libexecdir[@]|$(libexecdir)|g'
32 TESTS_ENVIRONMENT=perl -I $(top_builddir) -I $(top_srcdir)
34 TESTS = @SCRIPT_TEST@
36 test:
37         perl -I $(top_builddir) -I $(top_srcdir) ../test.pl
38         perl -I $(top_builddir) -I $(top_srcdir) ../test.pl t/utils.t   # utils.t is excluded from above, so manually ask to test
39         for SCRIPT in *.pl; do perl -wc $$SCRIPT || exit 1; done
40         set -e; for SCRIPT in *.sh; do sh -n $$SCRIPT || exit 1; done
42 test-debug:
43         NPTEST_DEBUG=1 HARNESS_VERBOSE=1 perl -I $(top_builddir) -I $(top_srcdir) ../test.pl
44         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
46 CLEANFILES=$(libexec_SCRIPTS)
48 .pl :
49         $(EDIT) $< > $@
50         chmod +x $@
52 .sh :
53         $(EDIT) $< > $@
54         chmod +x $@
56 clean-local:
57         rm -f NP-VERSION-FILE