File: date-of-man-include.am

package info (click to toggle)
mc 3%3A4.8.26-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 23,416 kB
  • sloc: ansic: 115,748; sh: 7,993; perl: 3,058; makefile: 1,633; python: 410; lisp: 44; cs: 44; sed: 16
file content (23 lines) | stat: -rw-r--r-- 712 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
SED_PARAMETERS = \
	-e "s/%DATE_OF_MAN_PAGE%/$${MAN_DATE}/g" \
	-e "s/%DISTR_VERSION%/@DISTR_VERSION@/g" \
	-e "s{%prefix%{@prefix@{g" \
	-e "s{%sysconfdir%{@sysconfdir@{g" \
	-e "s{%libexecdir%{@libexecdir@{g"

MAN_DATE_CMD = \
	LC_ALL=$(DATE_LANG) @PERL@ -CS -MPOSIX -e '\
	    @fi=lstat("'$${MAN_FILE}'"); \
	    print POSIX::strftime("$(DATE_FORMAT)", localtime($$fi[9]));' 2>/dev/null

mc.1: $(srcdir)/mc.1.in
	MAN_FILE=$<; MAN_DATE=$$($(MAN_DATE_CMD)); \
	sed $(SED_PARAMETERS) $< > $@

mcedit.1: $(srcdir)/mcedit.1.in
	MAN_FILE=$<; MAN_DATE=$$($(MAN_DATE_CMD)); \
	sed $(SED_PARAMETERS) $< > $@

mcview.1: $(srcdir)/mcview.1.in
	MAN_FILE=$<; MAN_DATE=$$($(MAN_DATE_CMD)); \
	sed $(SED_PARAMETERS) $< > $@