mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-16 09:53:36 +00:00
INSTALL: Change the installation instructions from a verbal list of commands to a shell script.
59 lines
1.1 KiB
Plaintext
Executable File
59 lines
1.1 KiB
Plaintext
Executable File
#!/bin/sh
|
|
#
|
|
# Installation instructions:
|
|
#
|
|
# 0. The source will be distributed with the .dep files and Makefile
|
|
# already created and up-to-date. But if you obtained the source
|
|
# using `cvs checkout', you will need GNU make and you will need to
|
|
# type
|
|
#
|
|
# make depend
|
|
|
|
MAKE="${MAKE:-make} MERCC=mc"
|
|
|
|
if $MAKE --version 2>&1 | grep "GNU Make"; then
|
|
GNUMAKE=true
|
|
else
|
|
GNUMAKE=false
|
|
fi
|
|
|
|
if $GNUMAKE; then
|
|
: $MAKE depend
|
|
else
|
|
cat Makefile.common Makefile.mercury > Makefile.tmp
|
|
$MAKE -f Makefile.tmp Makefile
|
|
fi
|
|
|
|
$MAKE install_scripts
|
|
|
|
# When using GNU make, the individual file dependencies are automatically
|
|
# generated on the fly, but the above command is necessary so that
|
|
# the system can determine which files need to be linked in to produce
|
|
# the main executable.
|
|
#
|
|
# 1. If you don't have GNU make, then type
|
|
#
|
|
# make ints
|
|
|
|
if $GNUMAKE; then
|
|
true
|
|
else
|
|
$MAKE ints
|
|
fi
|
|
|
|
# This is necessary because ordinary make doesn't handle transitive
|
|
# dependencies.
|
|
#
|
|
# 2. Type
|
|
#
|
|
# make install
|
|
|
|
$MAKE install
|
|
|
|
# 3. (Optional)
|
|
# Type
|
|
#
|
|
# make clean
|
|
#
|
|
# That's it.
|