Code

The AUTHORS file now used for the plugin team, with THANKS.in as the
[nagiosplug.git] / Makefile.am
1 ## Process this file with automake to produce Makefile.in
3 SUBDIRS = intl lib plugins plugins-scripts m4 po
5 EXTRA_DIST = config.rpath \
6         ABOUT-NLS ACKNOWLEDGEMENTS AUTHORS CHANGES CODING FAQ LEGAL REQUIREMENTS SUPPORT THANKS \
7         Helper.pm contrib pkg nagios-plugins.spec
9 ACLOCAL_AMFLAGS = -I m4
11 localedir = $(datadir)/locale
12 DEFS = -DLOCALEDIR=\"$(localedir)\"
14 dist-hook:
15         make THANKS nagios-plugins.spec pkg/fedora/nagios-plugins.spec
17 test:
18         cd plugins; $(MAKE) test
19         cd plugins-scripts; $(MAKE) test
21 nagios-plugins.spec: nagios-plugins.spec.in
22         sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;s/^%%{requires}$$//" $? > $@
24 pkg/fedora/nagios-plugins.spec: nagios-plugins.spec.in
25         $(top_srcdir)/mkinstalldirs pkg/fedora
26         sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;/^# Requires$$/r $(top_srcdir)/pkg/fedora/requires" $? > $@
28 # Solaris pkgmk
29 BUILDDIR = build-solaris
30 PACKDIR = build-pkg
31 PKGSCRIPT = pkg/solaris/solpkg
33 solpkg:
34         if [ ! -d $(BUILDDIR) ] ; then mkdir $(BUILDDIR); fi
35         if [ ! -d $(PACKDIR) ] ; then mkdir $(PACKDIR); fi
36         $(MAKE) all
37         $(MAKE) DESTDIR=$$PWD/$(BUILDDIR) install
38         $(INSTALL) pkg/solaris/pkginfo $(BUILDDIR)
39         cd $(BUILDDIR) && $(PERL) ../$(PKGSCRIPT) ../$(PACKDIR)
41 THANKS: THANKS.in
42         @echo "This software is brought to you by the Nagios Plugins Development Team. However," > $@
43         @echo "there have been many contributors to this project. Everyone below has helped in " >> $@
44         @echo "raising bug reports, creating patches or contributing new plugins." >> $@
45         @echo "" >> $@
46         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}' $? >> $@
48 pkgclean:
49         rm -rf $(BUILDDIR) $(PACKDIR)