Makefile.am 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. ## Process this file with automake to produce Makefile.in
  2. SUBDIRS = gl lib plugins plugins-scripts plugins-root po
  3. EXTRA_DIST = config.rpath \
  4. ABOUT-NLS ACKNOWLEDGEMENTS AUTHORS BUGS CODING FAQ LEGAL NEWS \
  5. REQUIREMENTS SUPPORT THANKS \
  6. NPTest.pm contrib pkg nagios-plugins.spec \
  7. config_test/Makefile config_test/run_tests config_test/child_test.c \
  8. tools/tinderbox_build
  9. ACLOCAL_AMFLAGS = -I gl/m4 -I m4
  10. localedir = $(datadir)/locale
  11. DEFS = -DLOCALEDIR=\"$(localedir)\"
  12. dist-hook:
  13. make THANKS nagios-plugins.spec pkg/fedora/nagios-plugins.spec
  14. rm -rf `find $(distdir) -name CVS`
  15. install-root:
  16. cd plugins-root && $(MAKE) $@
  17. test:
  18. cd lib && $(MAKE) test
  19. cd plugins; $(MAKE) test
  20. cd plugins-scripts; $(MAKE) test
  21. nagios-plugins.spec: nagios-plugins.spec.in
  22. sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;s/^%%{requires}$$//" $? > $@
  23. pkg/fedora/nagios-plugins.spec: nagios-plugins.spec.in
  24. $(top_srcdir)/mkinstalldirs pkg/fedora
  25. sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;/^# Requires$$/r $(top_srcdir)/pkg/fedora/requires" $? > $@
  26. # Solaris pkgmk
  27. BUILDDIR = build-solaris
  28. PACKDIR = build-pkg
  29. PKGSCRIPT = pkg/solaris/solpkg
  30. solpkg:
  31. if [ ! -d $(BUILDDIR) ] ; then mkdir $(BUILDDIR); fi
  32. if [ ! -d $(PACKDIR) ] ; then mkdir $(PACKDIR); fi
  33. $(MAKE) all
  34. $(MAKE) DESTDIR=$$PWD/$(BUILDDIR) install
  35. $(INSTALL) pkg/solaris/pkginfo $(BUILDDIR)
  36. cd $(BUILDDIR) && $(PERL) ../$(PKGSCRIPT) ../$(PACKDIR)
  37. THANKS: THANKS.in
  38. @echo "This software is brought to you by the Nagios Plugins Development Team. However," > $@
  39. @echo "there have been many contributors to this project. Everyone below has helped in " >> $@
  40. @echo "raising bug reports, creating patches or contributing new plugins." >> $@
  41. @echo "" >> $@
  42. 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}' $? >> $@
  43. pkgclean:
  44. rm -rf $(BUILDDIR) $(PACKDIR)