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 lib && $(MAKE) test
25 cd plugins; $(MAKE) test
26 cd plugins-scripts; $(MAKE) test
28 nagios-plugins.spec: nagios-plugins.spec.in
29 sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;s/^%%{requires}$$//" $? > $@
31 pkg/fedora/nagios-plugins.spec: nagios-plugins.spec.in
32 $(top_srcdir)/mkinstalldirs pkg/fedora
33 sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;/^# Requires$$/r $(top_srcdir)/pkg/fedora/requires" $? > $@
36 BUILDDIR = build-solaris
38 PKGSCRIPT = pkg/solaris/solpkg
41 if [ ! -d $(BUILDDIR) ] ; then mkdir $(BUILDDIR); fi
42 if [ ! -d $(PACKDIR) ] ; then mkdir $(PACKDIR); fi
44 $(MAKE) DESTDIR=$$PWD/$(BUILDDIR) install
45 $(INSTALL) pkg/solaris/pkginfo $(BUILDDIR)
46 cd $(BUILDDIR) && $(PERL) ../$(PKGSCRIPT) ../$(PACKDIR)
49 @echo "This software is brought to you by the Nagios Plugins Development Team. However," > $@
50 @echo "there have been many contributors to this project. Everyone below has helped in " >> $@
51 @echo "raising bug reports, creating patches or contributing new plugins." >> $@
53 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}' $? >> $@
56 rm -rf $(BUILDDIR) $(PACKDIR)