Ticket #4460: 0001-Fix-unportable-in-Makefiles.patch

File 0001-Fix-unportable-in-Makefiles.patch, 2.3 KB (added by karlson2k, 18 months ago)

Simplified fix

  • doc/man/date-of-man-include.am

    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 = \ 
    1212            print POSIX::strftime("$(DATE_FORMAT)", localtime($$fi[9]));' 2>/dev/null 
    1313 
    1414mc.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' > '$@' 
    1717 
    1818mcedit.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' > '$@' 
    2121 
    2222mcview.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' > '$@' 
  • tests/src/vfs/extfs/helpers-list/Makefile.am

    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 
    125125 
    126126# (Thanks to VPATH we don't need to write "$(srcdir)/README". doc/hlp/Makefile.am needlessly does this.) 
    127127README.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' 
    129129 
    130130EXTRA_DIST += README.css.inc 
    131131CLEANFILES += README.html