mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-10 11:23:15 +00:00
Modify the documentation that discusses how to override INSTALL_PATH
Mmke.vars.in:
Modify the documentation that discusses how to override INSTALL_PATH
to describe setting of $DESTDIR instead.
Don't add a slash before INSTALL_PATH if DESTDIR is empty since this
breaks installation on Windows. (This change has already been made
in Mmake.common.in)
Set more FINAL_INSTALL_ variables to support the new code in
Mmakefile and bindist.Makefile.in.
Mmake.common.in:
Improve the prose in a comment.
Mmakefile:
Update installation message.
Tell the user that their install is in $(DESTDIR) if applicable.
Use FINAL_INSTALL variables rather than INSTALL variables.
This commit is contained in:
@@ -119,9 +119,9 @@ SHARED_LIBS = @SHARED_LIBS@
|
||||
# in scripts/Mmake.vars to avoid accidentally overwriting an
|
||||
# existing installation when using an installed mmake.
|
||||
ifeq ($(DESTDIR),)
|
||||
# DESTDIR is The empty string, DESTDIR_AND_SLASH is therefore empty. since
|
||||
# the slash can change a relative path into an absolute one; or on Windows,
|
||||
# from an invalid path name.
|
||||
# DESTDIR is the empty string, DESTDIR_AND_SLASH must therefore be empty.
|
||||
# Otherwise the slash can change a relative path into an absolute one; or
|
||||
# on Windows, it can create an invalid path name.
|
||||
DESTDIR_AND_SLASH=
|
||||
else
|
||||
# We cannot append paths like this in Windows, but we don't think anyone
|
||||
|
||||
16
Mmakefile
16
Mmakefile
@@ -518,20 +518,26 @@ install: install_main install_grades
|
||||
@echo
|
||||
@echo "-- Installation complete."
|
||||
@echo
|
||||
@echo "-- Don't forget to add $(INSTALL_BINDIR) to your PATH,"
|
||||
@echo "-- $(INSTALL_MAN_DIR) to your MANPATH,"
|
||||
@echo "-- and $(INSTALL_INFO_DIR) to your INFOPATH,"
|
||||
@if test -n "$(DESTDIR)"; then \
|
||||
echo "-- The installation was placed in $(DESTDIR)."; \
|
||||
echo "-- to complete installation copy the contents of"; \
|
||||
echo "-- $(DESTDIR) to the root directory of your system(s)."; \
|
||||
echo; \
|
||||
fi
|
||||
@echo "-- Don't forget to add $(FINAL_INSTALL_BINDIR) to your PATH,"
|
||||
@echo "-- $(FINAL_INSTALL_MAN_DIR) to your MANPATH,"
|
||||
@echo "-- and $(FINAL_INSTALL_INFO_DIR) to your INFOPATH,"
|
||||
@if test $(ENABLE_DEEP_PROFILER) != yes || \
|
||||
cmp -s deep_profiler/mdprof_cgi \
|
||||
$(INSTALL_CGI_DIR)/mdprof_cgi; \
|
||||
then true ; else \
|
||||
echo "-- to copy deep_profiler/mdprof_cgi" \
|
||||
"to $(INSTALL_CGI_DIR),"; \
|
||||
"to $(FINAL_INSTALL_CGI_DIR),"; \
|
||||
fi
|
||||
@echo "-- and to add the following lines to the \`.emacs' file"
|
||||
@echo "-- in your home directory:"
|
||||
@echo " (add-to-list 'load-path "
|
||||
@echo " \"$(INSTALL_ELISP_DIR)\")"
|
||||
@echo " \"$(FINAL_INSTALL_ELISP_DIR)\")"
|
||||
@echo " (autoload 'mdb \"gud\" \"Invoke the Mercury debugger\" t)"
|
||||
|
||||
.PHONY: install_main
|
||||
|
||||
@@ -664,43 +664,60 @@ INSTALL_MKDIR = mkdir -p
|
||||
# HTML files.
|
||||
|
||||
# FINAL_INSTALL_PREFIX describes the directory that the installation
|
||||
# will finally end up in. When building the Mercury compiler, it
|
||||
# should only be set by the configure script. Other
|
||||
# FINAL_INSTALL_* variables have a similar meaning.
|
||||
# will finally end up in. When building the Mercury compiler, it should
|
||||
# only be set by the configure script. Other FINAL_INSTALL_* variables
|
||||
# have a similar meaning.
|
||||
#
|
||||
# If you want to install to a different directory temporarily (e.g. to
|
||||
# build a package, or if you don't have the permissions to install to a
|
||||
# final directory), set DESTDIR on the command-line. If you have
|
||||
# previously configured to the directory you want to finally install to,
|
||||
# you will then be able to move the files safely, since any hard-coded
|
||||
# paths will be set to their final destination already (note that the
|
||||
# installation in the temporary directory may not work until moved into
|
||||
# its final destination). e.g.
|
||||
#
|
||||
# If you want to install to a different directory temporarily (e.g.
|
||||
# to build a package, or if you don't have the permissions to install
|
||||
# to a final directory), override INSTALL_PREFIX on the command-line.
|
||||
# If you have previously configured to the directory you want to
|
||||
# finally install to, you will then be able to move the files safely,
|
||||
# since any hard-coded paths will be set to their final destination
|
||||
# already (note that the installation in the temporary directory may
|
||||
# not work until moved into its final destination).
|
||||
# e.g.
|
||||
# configure --prefix /usr
|
||||
# make INSTALL_PREFIX=/some/temporary/directory/usr
|
||||
# make DESTDIR=/some/temporary/directory
|
||||
|
||||
# If you don't intend to install to a temporary directory, rather than
|
||||
# overriding INSTALL_PREFIX you should reconfigure using the configure
|
||||
# script, since there are some hardcoded paths created by the configure
|
||||
# script (e.g. in the shell scripts mmc, ml, mmake, etc) that will not
|
||||
# be updated simply by overriding INSTALL_PREFIX.
|
||||
# setting DESTDIR you should reconfigure using the configure script,
|
||||
# since there are some hardcoded paths created by the configure script
|
||||
# (e.g. in the shell scripts mmc, ml, mmake, etc) that will not be
|
||||
# updated simply by overriding INSTALL_PREFIX.
|
||||
|
||||
INSTALL_PREFIX = $(DESTDIR)/@prefix@
|
||||
FINAL_INSTALL_PREFIX = @prefix@
|
||||
ifeq ($(DESTDIR),)
|
||||
# DESTDIR is the empty string, DESTDIR_AND_SLASH must therefore be empty.
|
||||
# Otherwise the slash can change a relative path into an absolute one; or
|
||||
# on Windows, it can create an invalid path name.
|
||||
DESTDIR_AND_SLASH=
|
||||
else
|
||||
# We cannot append paths like this in Windows, but we don't think anyone
|
||||
# will use DESTDIR on Windows.
|
||||
DESTDIR_AND_SLASH=$(DESTDIR)/
|
||||
endif
|
||||
|
||||
INSTALL_PREFIX = $(DESTDIR_AND_SLASH)@prefix@
|
||||
INSTALL_BINDIR = $(INSTALL_PREFIX)/bin
|
||||
INSTALL_LIBDIR = $(INSTALL_PREFIX)/lib/mercury
|
||||
FINAL_INSTALL_LIBDIR = $(FINAL_INSTALL_PREFIX)/lib/mercury
|
||||
INSTALL_INFO_DIR = $(INSTALL_PREFIX)/info
|
||||
INSTALL_DVI_DIR = $(INSTALL_PREFIX)/lib/mercury/doc
|
||||
INSTALL_TEXT_DIR = $(INSTALL_PREFIX)/lib/mercury/doc
|
||||
INSTALL_PS_DIR = $(INSTALL_PREFIX)/lib/mercury/doc
|
||||
INSTALL_PDF_DIR = $(INSTALL_PREFIX)/lib/mercury/doc
|
||||
INSTALL_MAN_DIR = $(INSTALL_PREFIX)/man
|
||||
INSTALL_MAN_DIR = $(INSTALL_PREFIX)/Man
|
||||
INSTALL_HTML_DIR = $(INSTALL_PREFIX)/lib/mercury/html
|
||||
INSTALL_MDB_DOC_DIR = $(INSTALL_PREFIX)/lib/mercury/mdb
|
||||
INSTALL_ELISP_DIR = $(INSTALL_PREFIX)/lib/mercury/elisp
|
||||
INSTALL_CGI_DIR = $(DESTDIR)/@CGIDIR@
|
||||
INSTALL_CGI_DIR = $(DESTDIR_AND_SLASH)@CGIDIR@
|
||||
|
||||
FINAL_INSTALL_PREFIX = @prefix@
|
||||
FINAL_INSTALL_BINDIR = $(FINAL_INSTALL_PREFIX)/bin
|
||||
FINAL_INSTALL_LIBDIR = $(FINAL_INSTALL_PREFIX)/lib/mercury
|
||||
FINAL_INSTALL_INFO_DIR = $(FINAL_INSTALL_PREFIX)/info
|
||||
FINAL_INSTALL_MAN_DIR = $(FINAL_INSTALL_PREFIX)/man
|
||||
FINAL_INSTALL_ELISP_DIR = $(FINAL_INSTALL_PREFIX)/lib/mercury/elisp
|
||||
FINAL_INSTALL_CGI_DIR = @CGIDIR@
|
||||
|
||||
# You should not need to override anything below here
|
||||
|
||||
|
||||
Reference in New Issue
Block a user