mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
8cd913a28a
POSIX specifis '$<' only for "inference" rules (i.e. general rule like '.c.o:'), while for "target" is undefined. It is supported as extension for targets by some "make" implementations, but not all. The workarounds could be easily used. Closes MidnightCommander/mc#185. Signed-off-by: Karlson2k (Evgeny Grin) <k2k@narod.ru> Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
25 lines
919 B
Plaintext
25 lines
919 B
Plaintext
SED_PARAMETERS = \
|
|
-e "s/%DATE_OF_MAN_PAGE%/$${MAN_DATE}/g" \
|
|
-e "s/%MAN_VERSION%/@MAN_VERSION@/g" \
|
|
-e "s{%sysconfdir%{@sysconfdir@{g" \
|
|
-e "s{%libexecdir%{@libexecdir@{g" \
|
|
-e "s{%pkglibexecdir%{$(libexecdir)/@PACKAGE@{g" \
|
|
-e "s{%pkgdatadir%{$(datadir)/@PACKAGE@{g"
|
|
|
|
MAN_DATE_CMD = \
|
|
LC_ALL=$(DATE_LANG) @PERL_FOR_BUILD@ -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='$(srcdir)/mc.1.in'; MAN_DATE=$$($(MAN_DATE_CMD)); \
|
|
$(SED) $(SED_PARAMETERS) '$(srcdir)/mc.1.in' > '$@'
|
|
|
|
mcedit.1: $(srcdir)/mcedit.1.in
|
|
MAN_FILE='$(srcdir)/mcedit.1.in'; MAN_DATE=$$($(MAN_DATE_CMD)); \
|
|
$(SED) $(SED_PARAMETERS) '$(srcdir)/mcedit.1.in' > '$@'
|
|
|
|
mcview.1: $(srcdir)/mcview.1.in
|
|
MAN_FILE='$(srcdir)/mcview.1.in'; MAN_DATE=$$($(MAN_DATE_CMD)); \
|
|
$(SED) $(SED_PARAMETERS) '$(srcdir)/mcview.1.in' > '$@'
|