Makefile.am 2.1 KB

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