date-of-man-include.am 708 B

1234567891011121314151617181920212223
  1. SED_PARAMETERS = \
  2. -e "s/%DATE_OF_MAN_PAGE%/$${MAN_DATE}/g" \
  3. -e "s/%DISTR_VERSION%/@DISTR_VERSION@/g" \
  4. -e "s{%prefix%{@prefix@{g" \
  5. -e "s{%sysconfdir%{@sysconfdir@{g" \
  6. -e "s{%libexecdir%{@libexecdir@{g"
  7. MAN_DATE_CMD = \
  8. LC_ALL=$(DATE_LANG) @PERL@ -MPOSIX -e '\
  9. @fi=lstat("'$${MAN_FILE}'"); \
  10. print POSIX::strftime("$(DATE_FORMAT)", localtime($$fi[9]));' 2>/dev/null
  11. mc.1: $(srcdir)/mc.1.in
  12. MAN_FILE=$<; MAN_DATE=$$($(MAN_DATE_CMD)); \
  13. sed $(SED_PARAMETERS) $< > $@
  14. mcedit.1: $(srcdir)/mcedit.1.in
  15. MAN_FILE=$<; MAN_DATE=$$($(MAN_DATE_CMD)); \
  16. sed $(SED_PARAMETERS) $< > $@
  17. mcview.1: $(srcdir)/mcview.1.in
  18. MAN_FILE=$<; MAN_DATE=$$($(MAN_DATE_CMD)); \
  19. sed $(SED_PARAMETERS) $< > $@