From 51ad1782df15927491d8bd6ce631de9eb9763a44 Mon Sep 17 00:00:00 2001
From: Evgeny Grin <k2k@narod.ru>
Date: Fri, 19 May 2023 19:26:02 +0300
Subject: [PATCH] Fix unportable '$<' in Makefiles
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.
Signed-off-by: Karlson2k (Evgeny Grin) <k2k@narod.ru>
---
doc/man/date-of-man-include.am | 12 ++++++------
tests/src/vfs/extfs/helpers-list/Makefile.am | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/doc/man/date-of-man-include.am b/doc/man/date-of-man-include.am
index c6b1e692c..96f9f1049 100644
a
|
b
|
MAN_DATE_CMD = \ |
12 | 12 | print POSIX::strftime("$(DATE_FORMAT)", localtime($$fi[9]));' 2>/dev/null |
13 | 13 | |
14 | 14 | mc.1: $(srcdir)/mc.1.in |
15 | | MAN_FILE=$<; MAN_DATE=$$($(MAN_DATE_CMD)); \ |
16 | | sed $(SED_PARAMETERS) $< > $@ |
| 15 | MAN_FILE='$(srcdir)/mc.1.in'; MAN_DATE=$$($(MAN_DATE_CMD)); \ |
| 16 | $(SED) $(SED_PARAMETERS) '$(srcdir)/mc.1.in' > '$@' |
17 | 17 | |
18 | 18 | mcedit.1: $(srcdir)/mcedit.1.in |
19 | | MAN_FILE=$<; MAN_DATE=$$($(MAN_DATE_CMD)); \ |
20 | | sed $(SED_PARAMETERS) $< > $@ |
| 19 | MAN_FILE='$(srcdir)/mcedit.1.in'; MAN_DATE=$$($(MAN_DATE_CMD)); \ |
| 20 | $(SED) $(SED_PARAMETERS) '$(srcdir)/mcedit.1.in' > '$@' |
21 | 21 | |
22 | 22 | mcview.1: $(srcdir)/mcview.1.in |
23 | | MAN_FILE=$<; MAN_DATE=$$($(MAN_DATE_CMD)); \ |
24 | | sed $(SED_PARAMETERS) $< > $@ |
| 23 | MAN_FILE='$(srcdir)/mcview.1.in'; MAN_DATE=$$($(MAN_DATE_CMD)); \ |
| 24 | $(SED) $(SED_PARAMETERS) '$(srcdir)/mcview.1.in' > '$@' |
diff --git a/tests/src/vfs/extfs/helpers-list/Makefile.am b/tests/src/vfs/extfs/helpers-list/Makefile.am
index 991a11faa..6c6c04482 100644
a
|
b
|
doc: README.html |
125 | 125 | |
126 | 126 | # (Thanks to VPATH we don't need to write "$(srcdir)/README". doc/hlp/Makefile.am needlessly does this.) |
127 | 127 | README.html: README |
128 | | pandoc --include-in-header=$(srcdir)/README.css.inc -N --old-dashes --toc --toc-depth=4 --standalone -o $@ $< |
| 128 | pandoc --include-in-header=$(srcdir)/README.css.inc -N --old-dashes --toc --toc-depth=4 --standalone -o '$@' '$(srcdir)/README' |
129 | 129 | |
130 | 130 | EXTRA_DIST += README.css.inc |
131 | 131 | CLEANFILES += README.html |