Makefile.am 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. ## Process this file with automake to produce Makefile.in
  2. SUBDIRS = gl tap lib plugins plugins-scripts plugins-root po @PERLMODS_DIR@
  3. EXTRA_DIST = config.rpath \
  4. ABOUT-NLS ACKNOWLEDGEMENTS AUTHORS CODING FAQ LEGAL NEWS \
  5. NP-VERSION-GEN REQUIREMENTS SUPPORT THANKS \
  6. NPTest.pm 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
  10. ACLOCAL_AMFLAGS = -I gl/m4 -I m4
  11. localedir = $(datadir)/locale
  12. DEFS = -DLOCALEDIR=\"$(localedir)\"
  13. dist-hook:
  14. $(MAKE) THANKS
  15. echo ${VERSION} >$(distdir)/release
  16. install-root:
  17. cd plugins-root && $(MAKE) $@
  18. test test-debug:
  19. cd lib && $(MAKE) $@
  20. if test "$(PERLMODS_DIR)" != ""; then cd perlmods && $(MAKE) $@; fi
  21. cd plugins && $(MAKE) $@
  22. cd plugins-scripts && $(MAKE) $@
  23. # Solaris pkgmk
  24. BUILDDIR = build-solaris
  25. PACKDIR = build-pkg
  26. PKGSCRIPT = pkg/solaris/solpkg
  27. solpkg:
  28. if [ ! -d $(BUILDDIR) ] ; then mkdir $(BUILDDIR); fi
  29. if [ ! -d $(PACKDIR) ] ; then mkdir $(PACKDIR); fi
  30. $(MAKE) all
  31. $(MAKE) DESTDIR=$$PWD/$(BUILDDIR) install
  32. $(INSTALL) plugins-root/pst3 $(BUILDDIR)$(libexecdir)
  33. $(INSTALL) pkg/solaris/pkginfo $(BUILDDIR)
  34. $(INSTALL) pkg/solaris/preinstall $(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)