2
0

Makefile.am 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # Make Autoconf man pages.
  2. # Copyright (C) 2001, 2004-2012 Free Software Foundation, Inc.
  3. # This program is free software: you can redistribute it and/or modify
  4. # it under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation, either version 3 of the License, or
  6. # (at your option) any later version.
  7. # This program is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. # GNU General Public License for more details.
  11. # You should have received a copy of the GNU General Public License
  12. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. dist_man_MANS = \
  14. $(srcdir)/autoconf.1 \
  15. $(srcdir)/autoheader.1 \
  16. $(srcdir)/autom4te.1 \
  17. $(srcdir)/autoreconf.1 \
  18. $(srcdir)/autoscan.1 \
  19. $(srcdir)/autoupdate.1 \
  20. $(srcdir)/ifnames.1 \
  21. $(srcdir)/config.guess.1 \
  22. $(srcdir)/config.sub.1
  23. EXTRA_DIST = $(dist_man_MANS:.1=.x) common.x
  24. MAINTAINERCLEANFILES = $(dist_man_MANS)
  25. # Depend on .version to get version number changes.
  26. common_dep = $(top_srcdir)/.version $(srcdir)/common.x
  27. binsrcdir = $(top_srcdir)/bin
  28. $(srcdir)/autoconf.1: $(common_dep) $(binsrcdir)/autoconf.as
  29. $(srcdir)/autoheader.1: $(common_dep) $(binsrcdir)/autoheader.in
  30. $(srcdir)/autom4te.1: $(common_dep) $(binsrcdir)/autom4te.in
  31. $(srcdir)/autoreconf.1: $(common_dep) $(binsrcdir)/autoreconf.in
  32. $(srcdir)/autoscan.1: $(common_dep) $(binsrcdir)/autoscan.in
  33. $(srcdir)/autoupdate.1: $(common_dep) $(binsrcdir)/autoupdate.in
  34. $(srcdir)/ifnames.1: $(common_dep) $(binsrcdir)/ifnames.in
  35. # Independent from this package.
  36. $(srcdir)/config.guess.1: $(top_srcdir)/build-aux/config.guess
  37. $(srcdir)/config.sub.1: $(top_srcdir)/build-aux/config.sub
  38. remove_time_stamp = 's/^\(\.TH[^"]*"[^"]*"[^"]*\)"[^"]*"/\1/'
  39. MOSTLYCLEANFILES = $(srcdir)/*.t
  40. SUFFIXES = .x .1
  41. .x.1:
  42. @echo "Updating man page $@"
  43. PATH="$(top_builddir)/tests$(PATH_SEPARATOR)$(top_srcdir)/build-aux$(PATH_SEPARATOR)$$PATH"; \
  44. export PATH; \
  45. $(HELP2MAN) \
  46. --include=$*.x \
  47. --include=$(srcdir)/common.x \
  48. --source='$(PACKAGE_STRING)' \
  49. --output=$@.t `echo '$*' | sed 's,.*/,,'`
  50. if sed $(remove_time_stamp) $@ >$@a.t 2>/dev/null && \
  51. sed $(remove_time_stamp) $@.t | cmp $@a.t - >/dev/null 2>&1; then \
  52. touch $@; \
  53. else \
  54. mv $@.t $@; \
  55. fi
  56. rm -f $@*.t