Makefile.am 1.7 KB

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