Makefile.am 1.8 KB

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