2
0

Makefile.maint 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. # This -*- Makefile -*- uses features of GNU make.
  2. # It is included via GNUmakefile.
  3. # The following one line summaries were extracted from the
  4. # original man pages using this bit of sh code:
  5. # for i in *.1; do echo "$i: "|tr -d '\012'; \
  6. # grep -A1 SH.NAME $i|sed '/SH NAME/d;s/^[^ ][^ ]* .- //'; done
  7. include Makefile.summ
  8. HELP2MAN-run = $(PERL) -w -- $(srcdir)/$(HELP2MAN)
  9. # Depend on configure.in to get version number changes.
  10. $(dyn_MANS): $(top_srcdir)/configure.in
  11. # Depend on the source file containing the --help text.
  12. # Filter out irregular cases.
  13. regular-men = $(filter-out $(irregular-men),$(dyn_MANS))
  14. $(regular-men): %.8: $(top_srcdir)/src/%.c
  15. executable = $(patsubst %/install,%/ginstall, ../src/$(basename $@))
  16. $(dyn_MANS): %.8: %.x $(HELP2MAN)
  17. @if test -f $(executable); then \
  18. echo "Updating man page $@"; \
  19. rm -f $@-t $@; \
  20. $(HELP2MAN-run) \
  21. --name="$($(basename $@)-summary)" \
  22. --include=$(basename $@).x \
  23. $(executable) > $@-t; \
  24. chmod -w $@-t; \
  25. mv $@-t $@; \
  26. else \
  27. echo "WARNING: The man page $@ cannot be updated yet."; \
  28. echo " Retry once the corresponding executable is built."; \
  29. fi
  30. sample-config.tar.gz:
  31. GZIP=$(GZIP_ENV) $(AMTAR) chozf sample-config.tar.gz sample-config