]> git.lizzy.rs Git - rust.git/commitdiff
configure: Make rustlibdir non-configurable
authorBrian Anderson <banderson@mozilla.com>
Wed, 26 Mar 2014 01:18:57 +0000 (18:18 -0700)
committerBrian Anderson <banderson@mozilla.com>
Wed, 26 Mar 2014 04:35:10 +0000 (21:35 -0700)
Trying to reduce the complexity of installation

configure
mk/dist.mk
mk/main.mk
mk/prepare.mk
mk/stage0.mk
mk/tests.mk
src/etc/install.sh
src/librustc/metadata/filesearch.rs

index 45b4405132f69f54d3d48ff1f1021d53a6bfaaa9..e875a9a09230923044213d4bf6dcb4497206c6ba 100755 (executable)
--- a/configure
+++ b/configure
@@ -401,7 +401,8 @@ valopt infodir "${CFG_PREFIX}/share/info" "install additional info"
 valopt mandir "${CFG_PREFIX}/share/man" "install man pages in PATH"
 
 # On windows we just store the libraries in the bin directory because
-# there's no rpath
+# there's no rpath. This is where the build system itself puts libraries;
+# --libdir is used to configure the installation directory.
 # FIXME: Thise needs to parameterized over target triples. Do it in platform.mk
 CFG_LIBDIR_RELATIVE=lib
 if [ "$CFG_OSTYPE" = "pc-mingw32" ]
@@ -410,7 +411,6 @@ then
 fi
 
 valopt libdir "${CFG_PREFIX}/${CFG_LIBDIR_RELATIVE}" "install libraries"
-valopt rustlibdir "rustlib" "subdirectory name for rustc's libraries"
 
 if [ $HELP -eq 1 ]
 then
@@ -777,10 +777,10 @@ do
             make_dir $h/stage$i/test
 
             # target bin dir
-            make_dir $h/stage$i/$CFG_LIBDIR_RELATIVE/$CFG_RUSTLIBDIR/$t/bin
+            make_dir $h/stage$i/$CFG_LIBDIR_RELATIVE/rustlib/$t/bin
 
             # target lib dir
-            make_dir $h/stage$i/$CFG_LIBDIR_RELATIVE/$CFG_RUSTLIBDIR/$t/lib
+            make_dir $h/stage$i/$CFG_LIBDIR_RELATIVE/rustlib/$t/lib
         done
     done
 
@@ -1039,7 +1039,6 @@ putvar CFG_HOST
 putvar CFG_TARGET
 putvar CFG_C_COMPILER
 putvar CFG_LIBDIR
-putvar CFG_RUSTLIBDIR
 putvar CFG_LIBDIR_RELATIVE
 putvar CFG_DISABLE_MANAGE_SUBMODULES
 putvar CFG_ANDROID_CROSS_PATH
index 91f64decb0c67959d1433089b0082634793ab382..60549e299cce2375bb27a1488bad3f519ed2d522 100644 (file)
@@ -200,7 +200,7 @@ dist-install-dir-$(1): PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
 dist-install-dir-$(1): PREPARE_CLEAN=true
 dist-install-dir-$(1): prepare-base-dir-$(1)
        $$(Q)(cd $$(PREPARE_DEST_DIR)/ && find -type f | sed 's/^\.\///') \
-      > $$(PREPARE_DEST_DIR)/$$(CFG_LIBDIR_RELATIVE)/$$(CFG_RUSTLIBDIR)/manifest
+      > $$(PREPARE_DEST_DIR)/$$(CFG_LIBDIR_RELATIVE)/rustlib/manifest
        $$(Q)$$(PREPARE_MAN_CMD) $$(S)COPYRIGHT $$(PREPARE_DEST_DIR)
        $$(Q)$$(PREPARE_MAN_CMD) $$(S)LICENSE-APACHE $$(PREPARE_DEST_DIR)
        $$(Q)$$(PREPARE_MAN_CMD) $$(S)LICENSE-MIT $$(PREPARE_DEST_DIR)
index ccbdf30a1ffe4421c2ada3639e3de59ceee94fe4..38943f1f7739fabf5e373d6fe3735644a6d045f9 100644 (file)
@@ -281,7 +281,6 @@ export CFG_LLVM_ROOT
 export CFG_ENABLE_MINGW_CROSS
 export CFG_PREFIX
 export CFG_LIBDIR
-export CFG_RUSTLIBDIR
 export CFG_LIBDIR_RELATIVE
 export CFG_DISABLE_INJECT_STD_VERSION
 
@@ -302,7 +301,7 @@ HBIN$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/bin
 HLIB$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/$$(CFG_LIBDIR_RELATIVE)
 
 # Destinations of artifacts for target architectures
-TROOT$(1)_T_$(2)_H_$(3) = $$(HLIB$(1)_H_$(3))/$$(CFG_RUSTLIBDIR)/$(2)
+TROOT$(1)_T_$(2)_H_$(3) = $$(HLIB$(1)_H_$(3))/rustlib/$(2)
 TBIN$(1)_T_$(2)_H_$(3) = $$(TROOT$(1)_T_$(2)_H_$(3))/bin
 TLIB$(1)_T_$(2)_H_$(3) = $$(TROOT$(1)_T_$(2)_H_$(3))/lib
 
index bf626b2101e41dc3d1d813bc0fad521852365811..ae76ecc594ce41cda5ed2a545e20920dceb35341 100644 (file)
@@ -121,8 +121,8 @@ endef
 # $(4) tag
 define DEF_PREPARE_TARGET_N
 # Rebind PREPARE_*_LIB_DIR to point to rustlib, then install the libs for the targets
-prepare-target-$(2)-host-$(3)-$(1)-$(4): PREPARE_WORKING_SOURCE_LIB_DIR=$$(PREPARE_SOURCE_LIB_DIR)/$$(CFG_RUSTLIBDIR)/$(2)/lib
-prepare-target-$(2)-host-$(3)-$(1)-$(4): PREPARE_WORKING_DEST_LIB_DIR=$$(PREPARE_DEST_LIB_DIR)/$$(CFG_RUSTLIBDIR)/$(2)/lib
+prepare-target-$(2)-host-$(3)-$(1)-$(4): PREPARE_WORKING_SOURCE_LIB_DIR=$$(PREPARE_SOURCE_LIB_DIR)/rustlib/$(2)/lib
+prepare-target-$(2)-host-$(3)-$(1)-$(4): PREPARE_WORKING_DEST_LIB_DIR=$$(PREPARE_DEST_LIB_DIR)/rustlib/$(2)/lib
 prepare-target-$(2)-host-$(3)-$(1)-$(4): prepare-maybe-clean-$(4) \
         $$(foreach crate,$$(TARGET_CRATES), \
           $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$$(crate)) \
index 5582e50b7c42f36a53d45557d06e86c68c29c089..080e733724d46f4f2f7f079208deaa35eddf7c24 100644 (file)
@@ -15,7 +15,7 @@ $(SNAPSHOT_RUSTC_POST_CLEANUP):                                               \
 #   Note: the variable "SNAPSHOT_FILE" is generally not set, and so
 #   we generally only pass one argument to this script.
 ifdef CFG_ENABLE_LOCAL_RUST
-       $(Q)$(S)src/etc/local_stage0.sh $(CFG_BUILD) $(CFG_LOCAL_RUST_ROOT) $(CFG_RUSTLIBDIR)
+       $(Q)$(S)src/etc/local_stage0.sh $(CFG_BUILD) $(CFG_LOCAL_RUST_ROOT) rustlib
 else
        $(Q)$(CFG_PYTHON) $(S)src/etc/get-snapshot.py $(CFG_BUILD) $(SNAPSHOT_FILE)
 ifdef CFG_ENABLE_PAX_FLAGS
index 22d686b1b0e24a6ae94f23a65a22d4b9a583f107..b0ae685faa899e649777fe44579b0d553e41c325 100644 (file)
@@ -104,7 +104,7 @@ ifdef CFG_WINDOWSY_$(1)
                stage2/$$(CFG_LIBDIR_RELATIVE), \
                $$(if $$(findstring stage3,$$(1)), \
                     stage3/$$(CFG_LIBDIR_RELATIVE), \
-               )))))/$$(CFG_RUSTLIBDIR)/$$(CFG_BUILD)/lib
+               )))))/rustlib/$$(CFG_BUILD)/lib
   CFG_RUN_TEST_$(1)=$$(call CFG_RUN_$(1),$$(call CFG_TESTLIB_$(1),$$(1),$$(3)),$$(1))
 endif
 
index 8dfc1903094e7d82912b8eba214aaf1e409c50e6..e6d20b932b39ef7fd795c1f23965ae6852f77c72 100644 (file)
@@ -237,7 +237,6 @@ need_ok "failed to remove install probe"
 
 # First, uninstall from the installation prefix.
 # Errors are warnings - try to rm everything in the manifest even if some fail.
-# FIXME: Hardcoded 'rustlib' ignores CFG_RUSTLIBDIR
 if [ -f "${CFG_PREFIX}/lib/rustlib/manifest" ]
 then
     # Iterate through installed manifest and remove files
index fa794c883450a928736aac6bb7eb87b2ba8b067c..31252ab4f82af68aa12e6c87177e6b5490ba3c67 100644 (file)
@@ -242,5 +242,5 @@ pub fn libdir() -> ~str {
 // The name of rustc's own place to organize libraries.
 // Used to be "rustc", now the default is "rustlib"
 pub fn rustlibdir() -> ~str {
-    (env!("CFG_RUSTLIBDIR")).to_owned()
+    ~"rustlib"
 }