Makefile.am 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. ## Process this file with automake to produce Makefile.in
  2. SUBDIRS = gl @INCLUDE_TAP_DIR@ lib plugins plugins-scripts plugins-root po @PERLMODS_DIR@
  3. # Have to list TAP_DIR manually to get in distribution
  4. EXTRA_DIST = config.rpath \
  5. ABOUT-NLS ACKNOWLEDGEMENTS AUTHORS BUGS CODING FAQ LEGAL NEWS \
  6. REQUIREMENTS SUPPORT THANKS \
  7. NPTest.pm contrib pkg nagios-plugins.spec \
  8. config_test/Makefile config_test/run_tests config_test/child_test.c \
  9. perlmods tools/build_perl_modules \
  10. tools/tinderbox_build \
  11. external/tap-1.01
  12. ACLOCAL_AMFLAGS = -I gl/m4 -I m4
  13. localedir = $(datadir)/locale
  14. DEFS = -DLOCALEDIR=\"$(localedir)\"
  15. dist-hook:
  16. make THANKS nagios-plugins.spec pkg/fedora/nagios-plugins.spec
  17. rm -rf `find $(distdir) -name .svn`
  18. install-root:
  19. cd plugins-root && $(MAKE) $@
  20. tap:
  21. cd @TAP_DIR@ && $(MAKE)
  22. test test-debug:
  23. cd lib && $(MAKE) $@
  24. if test "$(PERLMODS_DIR)" != ""; then cd perlmods && $(MAKE) $@; fi
  25. cd plugins && $(MAKE) $@
  26. cd plugins-scripts && $(MAKE) $@
  27. nagios-plugins.spec: nagios-plugins.spec.in
  28. sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;s/^%%{requires}$$//" $? > $@
  29. pkg/fedora/nagios-plugins.spec: nagios-plugins.spec.in
  30. $(top_srcdir)/mkinstalldirs pkg/fedora
  31. sed "s/%%{VERSION}/${VERSION}/;s/%%{RELEASE}/${RELEASE}/;/^# Requires$$/r $(top_srcdir)/pkg/fedora/requires" $? > $@
  32. # Solaris pkgmk
  33. BUILDDIR = build-solaris
  34. PACKDIR = build-pkg
  35. PKGSCRIPT = pkg/solaris/solpkg
  36. solpkg:
  37. if [ ! -d $(BUILDDIR) ] ; then mkdir $(BUILDDIR); fi
  38. if [ ! -d $(PACKDIR) ] ; then mkdir $(PACKDIR); fi
  39. $(MAKE) all
  40. $(MAKE) DESTDIR=$$PWD/$(BUILDDIR) install
  41. $(INSTALL) pkg/solaris/pkginfo $(BUILDDIR)
  42. cd $(BUILDDIR) && $(PERL) ../$(PKGSCRIPT) ../$(PACKDIR)
  43. THANKS: THANKS.in
  44. @echo "This software is brought to you by the Nagios Plugins Development Team. However," > $@
  45. @echo "there have been many contributors to this project. Everyone below has helped in " >> $@
  46. @echo "raising bug reports, creating patches or contributing new plugins." >> $@
  47. @echo "" >> $@
  48. 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}' $? >> $@
  49. pkgclean:
  50. rm -rf $(BUILDDIR) $(PACKDIR)