Code

Adding new tinderbox build script
[nagiosplug.git] / Makefile.am
1 ## Process this file with automake to produce Makefile.in
3 SUBDIRS = intl 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 \
10         tools/tinderbox_build
12 ACLOCAL_AMFLAGS = -I m4
14 localedir = $(datadir)/locale
15 DEFS = -DLOCALEDIR=\"$(localedir)\"
17 dist-hook:
18         make THANKS nagios-plugins.spec pkg/fedora/nagios-plugins.spec
20 install-root:
21         cd plugins-root && $(MAKE) $@
23 test:
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" $? > $@
34 # Solaris pkgmk
35 BUILDDIR = build-solaris
36 PACKDIR = build-pkg
37 PKGSCRIPT = pkg/solaris/solpkg
39 solpkg:
40         if [ ! -d $(BUILDDIR) ] ; then mkdir $(BUILDDIR); fi
41         if [ ! -d $(PACKDIR) ] ; then mkdir $(PACKDIR); fi
42         $(MAKE) all
43         $(MAKE) DESTDIR=$$PWD/$(BUILDDIR) install
44         $(INSTALL) pkg/solaris/pkginfo $(BUILDDIR)
45         cd $(BUILDDIR) && $(PERL) ../$(PKGSCRIPT) ../$(PACKDIR)
47 THANKS: THANKS.in
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." >> $@
51         @echo "" >> $@
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}' $? >> $@
54 pkgclean:
55         rm -rf $(BUILDDIR) $(PACKDIR)