1 ## Process this file with automake to produce Makefile.in
3 SUBDIRS = gl lib plugins plugins-scripts plugins-root po @PERLMODS_DIR@
5 EXTRA_DIST = config.rpath \
6 ABOUT-NLS ACKNOWLEDGEMENTS AUTHORS BUGS CODING FAQ LEGAL NEWS \
7 REQUIREMENTS SUPPORT THANKS \
8 NPTest.pm contrib 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 @TAP_DIR@
13 ACLOCAL_AMFLAGS = -I gl/m4 -I m4
15 localedir = $(datadir)/locale
16 DEFS = -DLOCALEDIR=\"$(localedir)\"
18 dist-hook:
19 make THANKS nagios-plugins.spec pkg/fedora/nagios-plugins.spec
20 rm -rf `find $(distdir) -name CVS`
22 install-root:
23 cd plugins-root && $(MAKE) $@
25 tap:
26 cd @TAP_DIR@ && $(MAKE)
28 test test-debug: tap
29 cd lib && $(MAKE) $@
30 if test "$(PERLMODS_DIR)" != ""; then cd perlmods && $(MAKE) $@; fi
31 cd plugins && $(MAKE) $@
32 cd plugins-scripts && $(MAKE) $@
34 nagios-plugins.spec: nagios-plugins.spec.in
35 sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;s/^%%{requires}$$//" $? > $@
37 pkg/fedora/nagios-plugins.spec: nagios-plugins.spec.in
38 $(top_srcdir)/mkinstalldirs pkg/fedora
39 sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;/^# Requires$$/r $(top_srcdir)/pkg/fedora/requires" $? > $@
41 # Solaris pkgmk
42 BUILDDIR = build-solaris
43 PACKDIR = build-pkg
44 PKGSCRIPT = pkg/solaris/solpkg
46 solpkg:
47 if [ ! -d $(BUILDDIR) ] ; then mkdir $(BUILDDIR); fi
48 if [ ! -d $(PACKDIR) ] ; then mkdir $(PACKDIR); fi
49 $(MAKE) all
50 $(MAKE) DESTDIR=$$PWD/$(BUILDDIR) install
51 $(INSTALL) pkg/solaris/pkginfo $(BUILDDIR)
52 cd $(BUILDDIR) && $(PERL) ../$(PKGSCRIPT) ../$(PACKDIR)
54 THANKS: THANKS.in
55 @echo "This software is brought to you by the Nagios 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)