1 ## Process this file with automake to produce Makefile.in
3 SUBDIRS = lib plugins plugins-scripts plugins-root m4 po
5 EXTRA_DIST = config.rpath \
6 ABOUT-NLS ACKNOWLEDGEMENTS AUTHORS BUGS CHANGES CODING FAQ LEGAL \
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 \
12 ACLOCAL_AMFLAGS = -I m4
14 localedir = $(datadir)/locale
15 DEFS = -DLOCALEDIR=\"$(localedir)\"
18 make THANKS nagios-plugins.spec pkg/fedora/nagios-plugins.spec
21 cd plugins-root && $(MAKE) $@
24 cd plugins; $(MAKE) test
25 cd plugins-scripts; $(MAKE) test
27 nagios-plugins.spec: nagios-plugins.spec.in
28 sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;s/^%%{requires}$$//" $? > $@
30 pkg/fedora/nagios-plugins.spec: nagios-plugins.spec.in
31 $(top_srcdir)/mkinstalldirs pkg/fedora
32 sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;/^# Requires$$/r $(top_srcdir)/pkg/fedora/requires" $? > $@
35 BUILDDIR = build-solaris
37 PKGSCRIPT = pkg/solaris/solpkg
40 if [ ! -d $(BUILDDIR) ] ; then mkdir $(BUILDDIR); fi
41 if [ ! -d $(PACKDIR) ] ; then mkdir $(PACKDIR); fi
43 $(MAKE) DESTDIR=$$PWD/$(BUILDDIR) install
44 $(INSTALL) pkg/solaris/pkginfo $(BUILDDIR)
45 cd $(BUILDDIR) && $(PERL) ../$(PKGSCRIPT) ../$(PACKDIR)
48 @echo "This software is brought to you by the Nagios Plugins Development Team. However," > $@
49 @echo "there have been many contributors to this project. Everyone below has helped in " >> $@
50 @echo "raising bug reports, creating patches or contributing new plugins." >> $@
52 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}' $? >> $@
55 rm -rf $(BUILDDIR) $(PACKDIR)