[commit: ghc] master: Rename $1_$2_$3_LIB_NAME to LIB_FILE. (01f7e44)

git at git.haskell.org git at git.haskell.org
Mon Jun 22 17:32:08 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/01f7e440ce221c01ba082003c372b5420e42797b/ghc

>---------------------------------------------------------------

commit 01f7e440ce221c01ba082003c372b5420e42797b
Author: Edward Z. Yang <ezyang at cs.stanford.edu>
Date:   Sat Jun 20 16:23:58 2015 -0700

    Rename $1_$2_$3_LIB_NAME to LIB_FILE.
    
    Summary:
    When we introduced user-friendly library names
    (e.g. unix-2.7.1.0-G4Yo1pNtYrk8nCq1cx8P9d instead of
    unix_G4Yo1pNtYrk8nCq1cx8P9d) we added a new variable to
    be written out by ghc-cabal, $1_$2_LIB_NAME.
    
    What I didn't realize at the time was that this conflicts
    with an existing variable in the build system, $1_$2_$3_LIB_NAME,
    which (confusingly) refers to something like
    'libHSunix-2.7.1.0-G4Yo1pNtYrk8nCq1cx8P9d.so'.  This is pretty
    confusing (despite never conflicting), so I renamed this variable
    to LIB_FILE for enhanced greppability.
    
    Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu>
    
    Test Plan: validate
    
    Reviewers: austin
    
    Subscribers: thomie, bgamari
    
    Differential Revision: https://phabricator.haskell.org/D1002


>---------------------------------------------------------------

01f7e440ce221c01ba082003c372b5420e42797b
 ghc.mk                     | 2 +-
 rts/ghc.mk                 | 4 ++--
 rules/build-package-way.mk | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/ghc.mk b/ghc.mk
index bee6abf..1b50472 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -229,7 +229,7 @@ endif
 ifeq "$(GhcDebugged)" "YES"
 WINDOWS_DYN_PROG_RTS := $(WINDOWS_DYN_PROG_RTS)_debug
 endif
-WINDOWS_DYN_PROG_RTS := $(WINDOWS_DYN_PROG_RTS)_dyn_LIB_NAME
+WINDOWS_DYN_PROG_RTS := $(WINDOWS_DYN_PROG_RTS)_dyn_LIB_FILE
 
 # -----------------------------------------------------------------------------
 # Compilation Flags
diff --git a/rts/ghc.mk b/rts/ghc.mk
index 787f67a..7fa36b6 100644
--- a/rts/ghc.mk
+++ b/rts/ghc.mk
@@ -153,8 +153,8 @@ $(call distdir-way-opts,rts,dist,$1)
 $(call c-suffix-rules,rts,dist,$1,YES)
 $(call cmm-suffix-rules,rts,dist,$1)
 
-rts_$1_LIB_NAME = libHSrts$$($1_libsuf)
-rts_$1_LIB = rts/dist/build/$$(rts_$1_LIB_NAME)
+rts_$1_LIB_FILE = libHSrts$$($1_libsuf)
+rts_$1_LIB = rts/dist/build/$$(rts_$1_LIB_FILE)
 
 rts_$1_C_OBJS   = $$(patsubst rts/%.c,rts/dist/build/%.$$($1_osuf),$$(rts_C_SRCS)) $$(patsubst %.c,%.$$($1_osuf),$$(rts_$1_EXTRA_C_SRCS))
 rts_$1_S_OBJS   = $$(patsubst rts/%.S,rts/dist/build/%.$$($1_osuf),$$(rts_S_SRCS))
diff --git a/rules/build-package-way.mk b/rules/build-package-way.mk
index 27da099..cb8440d 100644
--- a/rules/build-package-way.mk
+++ b/rules/build-package-way.mk
@@ -23,8 +23,8 @@ $(call hs-objs,$1,$2,$3)
 # The .a/.so library file, indexed by two different sets of vars:
 # the first is indexed by the dir, distdir and way
 # the second is indexed by the package id, distdir and way
-$1_$2_$3_LIB_NAME = libHS$$($1_$2_LIB_NAME)$$($3_libsuf)
-$1_$2_$3_LIB = $1/$2/build/$$($1_$2_$3_LIB_NAME)
+$1_$2_$3_LIB_FILE = libHS$$($1_$2_LIB_NAME)$$($3_libsuf)
+$1_$2_$3_LIB = $1/$2/build/$$($1_$2_$3_LIB_FILE)
 $$($1_$2_PACKAGE_KEY)_$2_$3_LIB = $$($1_$2_$3_LIB)
 
 ifeq "$$(HostOS_CPP)" "mingw32"



More information about the ghc-commits mailing list