Merge pull request #1507 from sanchezfauste/check_load_print_top_procs
[monitoring-plugins.git] / Makefile.am
blobdf1bcbb3d609f1df08660721b3ea59a6ef8ad4d2
1 ## Process this file with automake to produce Makefile.in
3 SUBDIRS = gl tap lib plugins plugins-scripts plugins-root po @PERLMODS_DIR@
5 EXTRA_DIST = config.rpath \
6         ABOUT-NLS ACKNOWLEDGEMENTS AUTHORS CODING ChangeLog FAQ NEWS \
7         NP-VERSION-GEN REQUIREMENTS SUPPORT THANKS \
8         NPTest.pm pkg \
9         config_test/Makefile config_test/run_tests config_test/child_test.c \
10         perlmods tools/build_perl_modules \
11         tools/tinderbox_build
13 ACLOCAL_AMFLAGS = -I gl/m4 -I m4
15 localedir = $(datadir)/locale
16 DEFS = -DLOCALEDIR=\"$(localedir)\"
19 # The ChangeLog file is auto-generated from the Git history.  We let it depend
20 # on NP-VERSION-GEN, as we bump our version number in that file.
22 ChangeLog: NP-VERSION-GEN
23         $(top_srcdir)/tools/generate-change-log > $@
25 dist-hook:
26         $(MAKE) THANKS
27         echo ${VERSION} >$(distdir)/release
29 install-root:
30         cd plugins-root && $(MAKE) $@
32 test test-debug:
33         cd lib && $(MAKE) $@
34         if test "$(PERLMODS_DIR)" != ""; then cd perlmods && $(MAKE) $@; fi
35         cd plugins && $(MAKE) $@
36         cd plugins-scripts && $(MAKE) $@
37         cd plugins-root && $(MAKE) $@
39 # Solaris pkgmk
40 BUILDDIR = build-solaris
41 PACKDIR = build-pkg
42 PKGSCRIPT = pkg/solaris/solpkg
44 solpkg:
45         if [ ! -d $(BUILDDIR) ] ; then mkdir $(BUILDDIR); fi
46         if [ ! -d $(PACKDIR) ] ; then mkdir $(PACKDIR); fi
47         $(MAKE) all
48         $(MAKE) DESTDIR=$$PWD/$(BUILDDIR) install
49         $(INSTALL) plugins-root/pst3 $(BUILDDIR)$(libexecdir)
50         $(INSTALL) pkg/solaris/pkginfo $(BUILDDIR)
51         $(INSTALL) pkg/solaris/preinstall $(BUILDDIR)
52         cd $(BUILDDIR) && $(PERL) ../$(PKGSCRIPT) ../$(PACKDIR)
54 THANKS: THANKS.in
55         @echo "This software is brought to you by the Monitoring Plugins Development Team. However," > $@
56         @echo "there have been many contributors to this project. Everyone below has helped in " >> $@
57         @echo "raising bug reports, creating patches or contributing new plugins." >> $@
58         @echo "" >> $@
59         perl -e ' while (<>) { print STDERR "Duplicate: $$_",$$/ if ($$a{$$_}) ; $$a{$$_}++}; print sort by_last_field (keys %a); sub by_last_field { ($$a1) = $$a =~ /\s(\w+)$$/; ($$b1) = $$b =~ /\s(\w+)$$/; $$a1 cmp $$b1}' $? >> $@
61 pkgclean:
62         rm -rf $(BUILDDIR) $(PACKDIR)