developer-guidelines.sgml: Normalize spelling
[monitoring-plugins.git] / Makefile.am
blobdc166546f0f44b8b447752b5f6bbaa7eabeca6a0
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 FAQ LEGAL NEWS \
7         NP-VERSION-GEN REQUIREMENTS SUPPORT THANKS \
8         NPTest.pm pkg nagios-plugins.spec \
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)\"
18 dist-hook:
19         $(MAKE) THANKS
20         echo ${VERSION} >$(distdir)/release
22 install-root:
23         cd plugins-root && $(MAKE) $@
25 test test-debug:
26         cd lib && $(MAKE) $@
27         if test "$(PERLMODS_DIR)" != ""; then cd perlmods && $(MAKE) $@; fi
28         cd plugins && $(MAKE) $@
29         cd plugins-scripts && $(MAKE) $@
31 # Solaris pkgmk
32 BUILDDIR = build-solaris
33 PACKDIR = build-pkg
34 PKGSCRIPT = pkg/solaris/solpkg
36 solpkg:
37         if [ ! -d $(BUILDDIR) ] ; then mkdir $(BUILDDIR); fi
38         if [ ! -d $(PACKDIR) ] ; then mkdir $(PACKDIR); fi
39         $(MAKE) all
40         $(MAKE) DESTDIR=$$PWD/$(BUILDDIR) install
41         $(INSTALL) plugins-root/pst3 $(BUILDDIR)$(libexecdir)
42         $(INSTALL) pkg/solaris/pkginfo $(BUILDDIR)
43         $(INSTALL) pkg/solaris/preinstall $(BUILDDIR)
44         cd $(BUILDDIR) && $(PERL) ../$(PKGSCRIPT) ../$(PACKDIR)
46 THANKS: THANKS.in
47         @echo "This software is brought to you by the Nagios Plugins Development Team. However," > $@
48         @echo "there have been many contributors to this project. Everyone below has helped in " >> $@
49         @echo "raising bug reports, creating patches or contributing new plugins." >> $@
50         @echo "" >> $@
51         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}' $? >> $@
53 pkgclean:
54         rm -rf $(BUILDDIR) $(PACKDIR)