Code

ECHILD error at waitpid on Red Hat systems (Peter Pramberger and
[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 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
11 ACLOCAL_AMFLAGS = -I m4
13 localedir = $(datadir)/locale
14 DEFS = -DLOCALEDIR=\"$(localedir)\"
16 dist-hook:
17         make THANKS nagios-plugins.spec pkg/fedora/nagios-plugins.spec
19 test:
20         cd plugins; $(MAKE) test
21         cd plugins-scripts; $(MAKE) test
23 nagios-plugins.spec: nagios-plugins.spec.in
24         sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;s/^%%{requires}$$//" $? > $@
26 pkg/fedora/nagios-plugins.spec: nagios-plugins.spec.in
27         $(top_srcdir)/mkinstalldirs pkg/fedora
28         sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;/^# Requires$$/r $(top_srcdir)/pkg/fedora/requires" $? > $@
30 # Solaris pkgmk
31 BUILDDIR = build-solaris
32 PACKDIR = build-pkg
33 PKGSCRIPT = pkg/solaris/solpkg
35 solpkg:
36         if [ ! -d $(BUILDDIR) ] ; then mkdir $(BUILDDIR); fi
37         if [ ! -d $(PACKDIR) ] ; then mkdir $(PACKDIR); fi
38         $(MAKE) all
39         $(MAKE) DESTDIR=$$PWD/$(BUILDDIR) install
40         $(INSTALL) pkg/solaris/pkginfo $(BUILDDIR)
41         cd $(BUILDDIR) && $(PERL) ../$(PKGSCRIPT) ../$(PACKDIR)
43 THANKS: THANKS.in
44         @echo "This software is brought to you by the Nagios Plugins Development Team. However," > $@
45         @echo "there have been many contributors to this project. Everyone below has helped in " >> $@
46         @echo "raising bug reports, creating patches or contributing new plugins." >> $@
47         @echo "" >> $@
48         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}' $? >> $@
50 pkgclean:
51         rm -rf $(BUILDDIR) $(PACKDIR)