lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 4638d55 1/6: Fix defect committed 20190518T17


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 4638d55 1/6: Fix defect committed 20190518T1712Z: script might not be in $PWD
Date: Wed, 22 May 2019 15:27:39 -0400 (EDT)

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

    Fix defect committed 20190518T1712Z: script might not be in $PWD
    
    Sourcing a script thus (commit 210257aee9f8 of 20190518T1712Z):
      . ./set_toolchain.sh
    assumes that it resides in $PWD. Arguably that line should have been
      . $(srcdir)/set_toolchain.sh
    but contemplating that reveals another defect:
      $(srcdir)/GNUmakefile
    is intended to allow this makefile to be made from a different
    directory, but $(srcdir) is not yet defined.
    
    Changed these two lines to use $(CURDIR), which 'make' predefines.
    That's the smallest change required for
    
      $make -C /opt/lmi/src/lmi -f /opt/lmi/src/lmi/GNUmakefile \
        check_concinnity
    
    to work, and it's also the righteous change. However, this test case
    
      $cd /tmp
      $/opt/lmi/src/lmi/hooks/pre-commit
    
    still fails, because commit 0b55f4657b6d of 20120301T1226 was
    suboptimal; see the next commit.
---
 GNUmakefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/GNUmakefile b/GNUmakefile
index d8c9eaf..d38ed5f 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -82,12 +82,12 @@ MAKEFLAGS := \
 
 export LMI_ENV_FILE := env_$(shell date -u +'%s_%N').eraseme
 
-GNUmakefile $(srcdir)/GNUmakefile:: $(LMI_ENV_FILE)
+GNUmakefile $(CURDIR)/GNUmakefile:: $(LMI_ENV_FILE)
        $(eval include $(LMI_ENV_FILE))
        @rm $(LMI_ENV_FILE)
 
 $(LMI_ENV_FILE):
-       @. ./set_toolchain.sh
+       @. $(CURDIR)/set_toolchain.sh
 
 
################################################################################
 



reply via email to

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