Makefile.am 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. ## Process this file with automake to produce Makefile.in
  2. SUBDIRS = gl lib plugins plugins-scripts plugins-root po @PERLMODS_DIR@
  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. if test "$(PERLMODS_DIR)" != ""; then cd perlmods && $(MAKE) test; fi
  20. cd plugins && $(MAKE) test
  21. cd plugins-scripts && $(MAKE) test
  22. nagios-plugins.spec: nagios-plugins.spec.in
  23. 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" $? > $@
  27. # Solaris pkgmk
  28. BUILDDIR = build-solaris
  29. PACKDIR = build-pkg
  30. PKGSCRIPT = pkg/solaris/solpkg
  31. solpkg:
  32. if [ ! -d $(BUILDDIR) ] ; then mkdir $(BUILDDIR); fi
  33. if [ ! -d $(PACKDIR) ] ; then mkdir $(PACKDIR); fi
  34. $(MAKE) all
  35. $(MAKE) DESTDIR=$$PWD/$(BUILDDIR) install
  36. $(INSTALL) pkg/solaris/pkginfo $(BUILDDIR)
  37. cd $(BUILDDIR) && $(PERL) ../$(PKGSCRIPT) ../$(PACKDIR)
  38. THANKS: THANKS.in
  39. @echo "This software is brought to you by the Nagios Plugins Development Team. However," > $@
  40. @echo "there have been many contributors to this project. Everyone below has helped in " >> $@
  41. @echo "raising bug reports, creating patches or contributing new plugins." >> $@
  42. @echo "" >> $@
  43. 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}' $? >> $@
  44. pkgclean:
  45. rm -rf $(BUILDDIR) $(PACKDIR)