date-of-man-include.am 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. SED_PARAMETERS = \
  2. -e "s/%DATE_OF_MAN_PAGE%/$${MAN_DATE}/g" \
  3. -e "s/%MAN_VERSION%/@MAN_VERSION@/g" \
  4. -e "s{%sysconfdir%{@sysconfdir@{g" \
  5. -e "s{%libexecdir%{@libexecdir@{g" \
  6. -e "s{%pkglibexecdir%{$(libexecdir)/@PACKAGE@{g" \
  7. -e "s{%pkgdatadir%{$(datadir)/@PACKAGE@{g"
  8. MAN_DATE_CMD = \
  9. LC_ALL=$(DATE_LANG) @PERL_FOR_BUILD@ -CS -MPOSIX -e '\
  10. @fi=lstat("'$${MAN_FILE}'"); \
  11. print POSIX::strftime("$(DATE_FORMAT)", localtime($$fi[9]));' 2>/dev/null
  12. mc.1: $(srcdir)/mc.1.in
  13. MAN_FILE='$(srcdir)/mc.1.in'; MAN_DATE=$$($(MAN_DATE_CMD)); \
  14. $(SED) $(SED_PARAMETERS) '$(srcdir)/mc.1.in' > '$@'
  15. mcview.1: $(srcdir)/mcview.1.in
  16. MAN_FILE='$(srcdir)/mcview.1.in'; MAN_DATE=$$($(MAN_DATE_CMD)); \
  17. $(SED) $(SED_PARAMETERS) '$(srcdir)/mcview.1.in' > '$@'
  18. if USE_INTERNAL_EDIT
  19. mcedit.1: $(srcdir)/mcedit.1.in
  20. MAN_FILE='$(srcdir)/mcedit.1.in'; MAN_DATE=$$($(MAN_DATE_CMD)); \
  21. $(SED) $(SED_PARAMETERS) '$(srcdir)/mcedit.1.in' > '$@'
  22. endif
  23. if USE_DIFF
  24. mcdiff.1: $(srcdir)/mcdiff.1.in
  25. MAN_FILE='$(srcdir)/mcdiff.1.in'; MAN_DATE=$$($(MAN_DATE_CMD)); \
  26. $(SED) $(SED_PARAMETERS) '$(srcdir)/mcdiff.1.in' > '$@'
  27. endif