Makefile.am 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 lib && $(MAKE) test
  18. cd plugins; $(MAKE) test
  19. cd plugins-scripts; $(MAKE) test
  20. nagios-plugins.spec: nagios-plugins.spec.in
  21. sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;s/^%%{requires}$$//" $? > $@
  22. pkg/fedora/nagios-plugins.spec: nagios-plugins.spec.in
  23. $(top_srcdir)/mkinstalldirs pkg/fedora
  24. sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;/^# Requires$$/r $(top_srcdir)/pkg/fedora/requires" $? > $@
  25. # Solaris pkgmk
  26. BUILDDIR = build-solaris
  27. PACKDIR = build-pkg
  28. PKGSCRIPT = pkg/solaris/solpkg
  29. solpkg:
  30. if [ ! -d $(BUILDDIR) ] ; then mkdir $(BUILDDIR); fi
  31. if [ ! -d $(PACKDIR) ] ; then mkdir $(PACKDIR); fi
  32. $(MAKE) all
  33. $(MAKE) DESTDIR=$$PWD/$(BUILDDIR) install
  34. $(INSTALL) pkg/solaris/pkginfo $(BUILDDIR)
  35. cd $(BUILDDIR) && $(PERL) ../$(PKGSCRIPT) ../$(PACKDIR)
  36. THANKS: THANKS.in
  37. @echo "This software is brought to you by the Nagios Plugins Development Team. However," > $@
  38. @echo "there have been many contributors to this project. Everyone below has helped in " >> $@
  39. @echo "raising bug reports, creating patches or contributing new plugins." >> $@
  40. @echo "" >> $@
  41. 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}' $? >> $@
  42. pkgclean:
  43. rm -rf $(BUILDDIR) $(PACKDIR)