Makefile.am 1.9 KB

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