Makefile.am 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. perlmods tools/build_perl_modules \
  9. tools/tinderbox_build @TAP_DIR@
  10. ACLOCAL_AMFLAGS = -I gl/m4 -I m4
  11. localedir = $(datadir)/locale
  12. DEFS = -DLOCALEDIR=\"$(localedir)\"
  13. dist-hook:
  14. make THANKS nagios-plugins.spec pkg/fedora/nagios-plugins.spec
  15. rm -rf `find $(distdir) -name CVS`
  16. install-root:
  17. cd plugins-root && $(MAKE) $@
  18. tap:
  19. cd @TAP_DIR@ && $(MAKE)
  20. test test-debug: tap
  21. cd lib && $(MAKE) $@
  22. if test "$(PERLMODS_DIR)" != ""; then cd perlmods && $(MAKE) $@; fi
  23. cd plugins && $(MAKE) $@
  24. cd plugins-scripts && $(MAKE) $@
  25. nagios-plugins.spec: nagios-plugins.spec.in
  26. sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;s/^%%{requires}$$//" $? > $@
  27. pkg/fedora/nagios-plugins.spec: nagios-plugins.spec.in
  28. $(top_srcdir)/mkinstalldirs pkg/fedora
  29. sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;/^# Requires$$/r $(top_srcdir)/pkg/fedora/requires" $? > $@
  30. # Solaris pkgmk
  31. BUILDDIR = build-solaris
  32. PACKDIR = build-pkg
  33. PKGSCRIPT = pkg/solaris/solpkg
  34. solpkg:
  35. if [ ! -d $(BUILDDIR) ] ; then mkdir $(BUILDDIR); fi
  36. if [ ! -d $(PACKDIR) ] ; then mkdir $(PACKDIR); fi
  37. $(MAKE) all
  38. $(MAKE) DESTDIR=$$PWD/$(BUILDDIR) install
  39. $(INSTALL) pkg/solaris/pkginfo $(BUILDDIR)
  40. cd $(BUILDDIR) && $(PERL) ../$(PKGSCRIPT) ../$(PACKDIR)
  41. THANKS: THANKS.in
  42. @echo "This software is brought to you by the Nagios Plugins Development Team. However," > $@
  43. @echo "there have been many contributors to this project. Everyone below has helped in " >> $@
  44. @echo "raising bug reports, creating patches or contributing new plugins." >> $@
  45. @echo "" >> $@
  46. 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}' $? >> $@
  47. pkgclean:
  48. rm -rf $(BUILDDIR) $(PACKDIR)