mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-24 04:46:58 +00:00
install: name the bundled manifest 'manifest.in'. Cleanup
The installed manifest is a different file, so they should have different names. This should prevent various wierd conflicts in the future.
This commit is contained in:
parent
ce1e48a52b
commit
92d0ec2ec7
@ -199,9 +199,11 @@ dist-install-dir-$(1): PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
|
||||
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)
|
||||
# Write the install manifest, making sure the manifest contains itself
|
||||
$$(Q)touch $$(PREPARE_DEST_DIR)/$$(CFG_LIBDIR_RELATIVE)/rustlib/manifest-$(1).in
|
||||
$$(Q)(cd $$(PREPARE_DEST_DIR)/ && find -type f | sed 's/^\.\///') \
|
||||
> tmp/manifest-$(1) # NB Use a tmp file so `find` doesn't *find the manifest*
|
||||
$$(Q)cp tmp/manifest-$(1) $$(PREPARE_DEST_DIR)/$$(CFG_LIBDIR_RELATIVE)/rustlib/manifest
|
||||
> $$(PREPARE_DEST_DIR)/$$(CFG_LIBDIR_RELATIVE)/rustlib/manifest-$(1).in
|
||||
# Add remaining non-installed files
|
||||
$$(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)
|
||||
|
@ -11,6 +11,8 @@
|
||||
|
||||
install: dist-install-dir-$(CFG_BUILD)
|
||||
$(Q)sh tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --prefix="$(CFG_PREFIX)" --libdir="$(CFG_LIBDIR)" --mandir="$(CFG_MANDIR)"
|
||||
# Remove tmp files while we can because they may have been created under sudo
|
||||
$(Q)rm -R tmp/dist/$(PKG_NAME)-$(CFG_BUILD/
|
||||
|
||||
uninstall: dist-install-dir-$(CFG_BUILD)
|
||||
$(Q)sh tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --uninstall --prefix="$(CFG_PREFIX)" --libdir="$(CFG_LIBDIR)" --mandir="$(CFG_MANDIR)"
|
||||
|
@ -229,15 +229,16 @@ validate_opt
|
||||
|
||||
# Sanity check: can we can write to the destination?
|
||||
umask 022 && mkdir -p "${CFG_LIBDIR}"
|
||||
need_ok "directory creation failed"
|
||||
need_ok "can't write to destination. consider `sudo`."
|
||||
touch "${CFG_LIBDIR}/rust-install-probe" 2> /dev/null
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
err "can't write to destination. try again with 'sudo'."
|
||||
err "can't write to destination. consider `sudo`."
|
||||
fi
|
||||
rm "${CFG_LIBDIR}/rust-install-probe"
|
||||
need_ok "failed to remove install probe"
|
||||
|
||||
# The file name of the manifest we're going to create during install
|
||||
INSTALLED_MANIFEST="${CFG_LIBDIR}/rustlib/manifest"
|
||||
|
||||
# First, uninstall from the installation prefix.
|
||||
@ -267,6 +268,7 @@ then
|
||||
warn "failed to remove rustlib"
|
||||
fi
|
||||
else
|
||||
# There's no manifest. If we were asked to uninstall, then that's a problem.
|
||||
if [ -n "${CFG_UNINSTALL}" ]
|
||||
then
|
||||
err "unable to find installation manifest at ${CFG_LIBDIR}/rustlib"
|
||||
@ -304,7 +306,7 @@ while read p; do
|
||||
FILE_INSTALL_PATH="${CFG_MANDIR}/$pp"
|
||||
fi
|
||||
|
||||
# Make sure ther's a directory for it
|
||||
# Make sure there's a directory for it
|
||||
umask 022 && mkdir -p "$(dirname ${FILE_INSTALL_PATH})"
|
||||
need_ok "directory creation failed"
|
||||
|
||||
@ -330,7 +332,7 @@ while read p; do
|
||||
need_ok "failed to update manifest"
|
||||
|
||||
# The manifest lists all files to install
|
||||
done < "${CFG_SRC_DIR}/lib/rustlib/manifest"
|
||||
done < "${CFG_SRC_DIR}/lib/rustlib/manifest.in"
|
||||
|
||||
echo
|
||||
echo " Rust is ready to roll."
|
||||
|
Loading…
Reference in New Issue
Block a user