Code

Update references to NEWS instead of CHANGES. Fix compile of libtap
[nagiosplug.git] / Makefile.am
1 ## Process this file with automake to produce Makefile.in
3 SUBDIRS = gl lib plugins plugins-scripts plugins-root po
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         tools/tinderbox_build
12 ACLOCAL_AMFLAGS = -I gl/m4 -I m4
14 localedir = $(datadir)/locale
15 DEFS = -DLOCALEDIR=\"$(localedir)\"
17 dist-hook:
18         make THANKS nagios-plugins.spec pkg/fedora/nagios-plugins.spec
19         rm -rf `find $(distdir) -name CVS`
21 install-root:
22         cd plugins-root && $(MAKE) $@
24 test:
25         cd lib && $(MAKE) test
26         cd plugins; $(MAKE) test
27         cd plugins-scripts; $(MAKE) test
29 nagios-plugins.spec: nagios-plugins.spec.in
30         sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;s/^%%{requires}$$//" $? > $@
32 pkg/fedora/nagios-plugins.spec: nagios-plugins.spec.in
33         $(top_srcdir)/mkinstalldirs pkg/fedora
34         sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;/^# Requires$$/r $(top_srcdir)/pkg/fedora/requires" $? > $@
36 # Solaris pkgmk
37 BUILDDIR = build-solaris
38 PACKDIR = build-pkg
39 PKGSCRIPT = pkg/solaris/solpkg
41 solpkg:
42         if [ ! -d $(BUILDDIR) ] ; then mkdir $(BUILDDIR); fi
43         if [ ! -d $(PACKDIR) ] ; then mkdir $(PACKDIR); fi
44         $(MAKE) all
45         $(MAKE) DESTDIR=$$PWD/$(BUILDDIR) install
46         $(INSTALL) pkg/solaris/pkginfo $(BUILDDIR)
47         cd $(BUILDDIR) && $(PERL) ../$(PKGSCRIPT) ../$(PACKDIR)
49 THANKS: THANKS.in
50         @echo "This software is brought to you by the Nagios Plugins Development Team. However," > $@
51         @echo "there have been many contributors to this project. Everyone below has helped in " >> $@
52         @echo "raising bug reports, creating patches or contributing new plugins." >> $@
53         @echo "" >> $@
54         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 pkgclean:
57         rm -rf $(BUILDDIR) $(PACKDIR)