Makefile.am 1.8 KB

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