lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master f760e3d 11/18: Fix defect introduced 20190426


From: Greg Chicares
Subject: [lmi-commits] [lmi] master f760e3d 11/18: Fix defect introduced 20190426T2304Z: wrong variable used
Date: Wed, 29 May 2019 18:49:08 -0400 (EDT)

branch: master
commit f760e3df2823d80e05f837c93e6efd617ceb77cf
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Fix defect introduced 20190426T2304Z: wrong variable used
    
    Commit 36191bc99d of 20190426T2304Z intended to replace the literal
    "/opt/lmi/local/bin" with an equivalent variable. The intention was
    proper, but the wrong variable, $(bindir), was used. Fixed: now the
    right variable, $(localbindir), is used instead.
    
    The correct substitution was made here:
      20190326T2301Z commit dc3854e70d
    and it survived the reversion here:
      20190426T1734Z commit 2d86f7e3ac
    which happened to undo the substitution and restore the original
    literal. The first literal-substitution changeset was disciplined
    (vim ':%s' commands) because it had to be right. The single
    substitution in commit 36191bc99d wasn't disciplined because it
    seemed that it couldn't possibly be wrong. The original commands
    were still in vim history, so typing over the literal was unwise,
    especially when tidying up after a reversion.
    
    This commit fixes this reported problem:
      https://lists.nongnu.org/archive/html/lmi/2019-05/msg00059.html
    It's not yet ideal: files in $(compiler_runtime_files) are copied in
    a different way (to a different subdirectory) in 'GNUmakefile'; and
    running `make -n fardel` through shellcheck elicits:
      SC2157: Argument to -z is always false due to literal strings.
    for the controlling condition here:
      [ -z "$(compiler_runtime_files)" ]
    because of a trailing blank.
---
 workhorse.make | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/workhorse.make b/workhorse.make
index 23ba3af..dc2584e 100644
--- a/workhorse.make
+++ b/workhorse.make
@@ -1071,7 +1071,7 @@ install: $(default_targets)
        @$(CP) --preserve --update $(help_files) $(datadir)
        @datadir=$(datadir) srcdir=$(srcdir) $(srcdir)/mst_to_xst.sh
        @[ -z "$(compiler_runtime_files)" ] \
-         || $(CP) --preserve $(compiler_runtime_files) $(bindir)
+         || $(CP) --preserve $(compiler_runtime_files) $(localbindir)
 ifeq (,$(USE_SO_ATTRIBUTES))
        @cd $(datadir); $(PERFORM) $(bindir)/product_files$(EXEEXT)
 else



reply via email to

[Prev in Thread] Current Thread [Next in Thread]