make: DESTDIR must be an absolute path
Clarify in the installation notes, and add a check in the makefile. Closes PR 14935
This commit is contained in:
parent
dbba480ad3
commit
5e6debf854
16
INSTALL.txt
16
INSTALL.txt
|
@ -74,13 +74,14 @@ See "More Instructions: Building Racket" below for more information.
|
||||||
Quick Instructions: Unix-style Install
|
Quick Instructions: Unix-style Install
|
||||||
======================================
|
======================================
|
||||||
|
|
||||||
On Unix, `make unix-style PREFIX=<dir>' builds and installs into <dir>
|
On Unix, `make unix-style PREFIX=<dir>' builds and installs into
|
||||||
with binaries in "<dir>/bin", packages in "<dir>/share/racket/pkgs",
|
"<dir>" (which must be an absolute path) with binaries in "<dir>/bin",
|
||||||
documentation in "<dir>/share/racket/doc", etc.
|
packages in "<dir>/share/racket/pkgs", documentation in
|
||||||
|
"<dir>/share/racket/doc", etc.
|
||||||
|
|
||||||
On Mac OS X, `make unix-style PREFIX=<dir>' builds and installs into
|
On Mac OS X, `make unix-style PREFIX=<dir>' builds and installs into
|
||||||
"<dir>" with binaries in "<dir>/bin", packges in "<dir>/share/pkgs",
|
"<dir>" (whichmust be an absolute path) with binaries in "<dir>/bin",
|
||||||
documentation in "<dir>/doc", etc.
|
packges in "<dir>/share/pkgs", documentation in "<dir>/doc", etc.
|
||||||
|
|
||||||
On Windows, Unix-style install is not supported.
|
On Windows, Unix-style install is not supported.
|
||||||
|
|
||||||
|
@ -88,8 +89,9 @@ A Unix-style install leaves no reference to this source directory.
|
||||||
|
|
||||||
To split the build and install steps of a Unix-style installation,
|
To split the build and install steps of a Unix-style installation,
|
||||||
supply `DESTDIR=<dest-dir>' with `make unix-style PREFIX=<dir>', which
|
supply `DESTDIR=<dest-dir>' with `make unix-style PREFIX=<dir>', which
|
||||||
assembles the installation in "<dest-dir>". Then, copy the content of
|
assembles the installation in "<dest-dir>" (which must be an absolute
|
||||||
"<dest-dir>" to the target root.
|
path). Then, copy the content of "<dest-dir>" to the target root
|
||||||
|
"<dir>".
|
||||||
|
|
||||||
See "More Instructions: Building Racket" below for more information.
|
See "More Instructions: Building Racket" below for more information.
|
||||||
|
|
||||||
|
|
|
@ -92,6 +92,11 @@ plain-install:
|
||||||
$(MAKE) plain-install-@MAIN_VARIANT@
|
$(MAKE) plain-install-@MAIN_VARIANT@
|
||||||
|
|
||||||
install-common-first:
|
install-common-first:
|
||||||
|
if [ "$(DESTDIR)" != "" ]; then \
|
||||||
|
if [[ "$(DESTDIR)" != /* ]]; then \
|
||||||
|
echo "expected an absolute path for DESTDIR; given: $(DESTDIR)"; exit 1; \
|
||||||
|
fi; \
|
||||||
|
fi
|
||||||
mkdir -p $(ALLDIRINFO)
|
mkdir -p $(ALLDIRINFO)
|
||||||
|
|
||||||
install-common-middle:
|
install-common-middle:
|
||||||
|
|
|
@ -227,11 +227,12 @@ Detailed instructions:
|
||||||
can find the installation directories. At this stage, in case you
|
can find the installation directories. At this stage, in case you
|
||||||
are packaging an installation instead of installing directly, you
|
are packaging an installation instead of installing directly, you
|
||||||
can redirect the installation by setting the "DESTDIR" environment
|
can redirect the installation by setting the "DESTDIR" environment
|
||||||
variable. For example, `make DESTDIR=/tmp/racket-build install'
|
variable to an absolute path for the packaging area. For example,
|
||||||
places the installation into "/tmp/racket-build" instead of the
|
`make DESTDIR=/tmp/racket-build install' places the installation
|
||||||
location originally specified with `--prefix'. The resulting
|
into "/tmp/racket-build" instead of the location originally
|
||||||
installation will not work, however, until it is moved to the
|
specified with `--prefix'. The resulting installation will not
|
||||||
location originally specified with `--prefix'.
|
work, however, until it is moved to the location originally
|
||||||
|
specified with `--prefix'.
|
||||||
|
|
||||||
Finally, the `make install' step compiles ".zo" bytecode files for
|
Finally, the `make install' step compiles ".zo" bytecode files for
|
||||||
installed Racket source, generates launcher programs like
|
installed Racket source, generates launcher programs like
|
||||||
|
|
Loading…
Reference in New Issue
Block a user