diff --git a/CHANGES b/CHANGES
index a78bfd3..3f14dce 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,15 @@
-The following are the changes from calc version 2.14.0.14 to date:
+The following are the changes from calc version 2.14.0.15 to date:
+
+ Changed Makefile to set shell before setting the SHELL Makefile
+ variable.
+
+ Added text to HOWTO.INSTALL to help people with systems that
+ lack the readline package.
+
+ Trimmed long line in the CONTRIBUTING.md file.
+
+
+The following are the changes from calc version 2.14.0.14 to 2.14.0.14:
Fixed typo in Makefile.local comment.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 9d8472e..1f30809 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -2,4 +2,6 @@
## CONTRIB-CODE
-See the file CONTRIB-CODE for how to contribue code to calc.
+See the file
+CONTRIB-CODE
+for how to contribue code to calc.
diff --git a/HOWTO.INSTALL b/HOWTO.INSTALL
index 6aff869..88918b0 100644
--- a/HOWTO.INSTALL
+++ b/HOWTO.INSTALL
@@ -47,22 +47,114 @@ or from:
4 steps:
- (1) Look at the makefile, and adjust it to suit your needs.
+(1) Look at the makefile, and adjust it to suit your needs.
The top level Makefile and the custom/Makefile require a modern
Make (such as gmake) or an equivalently advanced make. On many
targets, the default make is sufficient. On FreeBSD for example,
probably want to use gmake instead of make.
- Some report that under macOS, one has to declare the target
- to be Darwin. So for macOS, one might have to do:
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ ! By default, calc assumes you have the readline package installed !
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ ! macOS does not have readline, so mac users need to make a choice !
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- # for macOS users only, force the target to be Darwin
- #
- make target=Darwin clobber
- make target=Darwin all
- make target=Darwin chk
- make target=Darwin install
+ The readline package (-lreadline, -lhistory, -lncurses) used by and
+ linked into calc by default. If your system does NOT have those
+ libaraies, then you have two options:
+
+ (1-with readline) Install the readline package <- Recommended
+
+ Install the readline package first, then compile calc.
+
+ For information on the readline package, see:
+
+ https://tiswww.case.edu/php/chet/readline/rltop.html
+
+ MacOS users can use MacPorts or HomeBrew to install readline:
+
+ https://www.macports.org
+ https://brew.sh
+
+ Or compile from the readline.git repo:
+
+ http://git.savannah.gnu.org/cgit/readline.git/
+
+ (1-w/o readline) Compile calc without readline (not recommended)
+
+ Why do we not recommend (1b)? Because using calc with readline
+ provides a beter user experience.
+
+ If you feel you must use calc without the readline package, then you
+ will need to change your calc Makefile with this patch:
+
+--- Makefile.old 2021-12-29 14:57:56.000000000 -0800
++++ Makefile 2021-12-29 14:59:13.000000000 -0800
+@@ -1140,14 +1140,14 @@
+ #
+ # If in doubt, set USE_READLINE, READLINE_LIB and READLINE_INCLUDE to nothing.
+ #
+-#USE_READLINE=
+-USE_READLINE= -DUSE_READLINE
++USE_READLINE=
++#USE_READLINE= -DUSE_READLINE
+ #
+-#READLINE_LIB=
+-#READLINE_EXTRAS=
++READLINE_LIB=
++READLINE_EXTRAS=
+ #
+-READLINE_LIB= -lreadline
+-READLINE_EXTRAS= -lhistory -lncurses
++#READLINE_LIB= -lreadline
++#READLINE_EXTRAS= -lhistory -lncurses
+ #
+ #READLINE_LIB= -L/usr/gnu/lib -lreadline
+ #READLINE_EXTRAS= -lhistory -lncurses
+@@ -1181,8 +1181,8 @@
+ # # and using the readline, history, and ncurses libraries.
+ # #
+ ifneq ($(HOMEBREW_PREFIX),)
+-READLINE_LIB:= -L${HOMEBREW_PREFIX}/opt/readline/lib -lreadline
+-READLINE_INCLUDE:= -I${HOMEBREW_PREFIX}/opt/readline/include
++#READLINE_LIB:= -L${HOMEBREW_PREFIX}/opt/readline/lib -lreadline
++#READLINE_INCLUDE:= -I${HOMEBREW_PREFIX}/opt/readline/include
+ endif
+ #
+ #endif /* end of skip for non-Gnu makefiles */
+
+ If your target system does not have a modern Makefile
+ (such as gmake), then you will need to change your
+ Makefile.simple with this patch:
+
+--- Makefile.simple.orig 2021-12-29 15:00:53.000000000 -0800
++++ Makefile.simple 2021-12-29 15:01:00.000000000 -0800
+@@ -1005,14 +1005,14 @@
+ #
+ # If in doubt, set USE_READLINE, READLINE_LIB and READLINE_INCLUDE to nothing.
+ #
+-#USE_READLINE=
+-USE_READLINE= -DUSE_READLINE
++USE_READLINE=
++#USE_READLINE= -DUSE_READLINE
+ #
+-#READLINE_LIB=
+-#READLINE_EXTRAS=
++READLINE_LIB=
++READLINE_EXTRAS=
+ #
+-READLINE_LIB= -lreadline
+-READLINE_EXTRAS= -lhistory -lncurses
++#READLINE_LIB= -lreadline
++#READLINE_EXTRAS= -lhistory -lncurses
+ #
+ #READLINE_LIB= -L/usr/gnu/lib -lreadline
+ #READLINE_EXTRAS= -lhistory -lncurses
+
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ ! By default, calc assumes you are using a modern gnu-like make tool !
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
If your target system does not have a modern Makefile (such as gmake),
then you should try using the Makefile.simple and custom/Makefile.simple
@@ -212,15 +304,15 @@ or from:
(3) test calc:
- make check
+ make check
NOTE: For a quiet check which only prints if something goes wrong:
- make chk
+ make chk
(4) install calc:
- make install
+ make install
We suggest that you might want to read the README.FIRST file and look at
the calc help subsystem. See also the README.md file.
diff --git a/Makefile b/Makefile
index 61812a2..94e40d4 100644
--- a/Makefile
+++ b/Makefile
@@ -34,33 +34,7 @@
#
# calculator by David I. Bell with help/mods from others
# Makefile by Landon Curt Noll
-
-# The shell used by this Makefile
#
-# On some systems, /bin/sh is a rather reduced shell with
-# deprecated behavior.
-#
-# If your system has a up to date, bash shell, then
-# you may wish to use:
-#
-# SHELL= /bin/bash
-#
-# On some systems such as macOS, the bash shell is very
-# far behind to the point where is cannot be depended on.
-# On such systems, the sh may be a much better alternative
-# shell for this Makefile to use:
-#
-# SHELL= /bin/sh
-#
-SHELL= /bin/bash
-#SHELL= /bin/sh
-#if 0 /* start of skip for non-Gnu makefiles */
-#
-ifeq ($(target),Darwin)
-SHELL:= /bin/sh
-endif
-#
-#endif /* end of skip for non-Gnu makefiles */
#if 0 /* start of skip for non-Gnu makefiles */
@@ -105,6 +79,34 @@ hardware=$(shell uname -m 2>/dev/null)
endif
#
#endif /* end of skip for non-Gnu makefiles */
+#
+# The shell used by this Makefile
+#
+# On some systems, /bin/sh is a rather reduced shell with
+# deprecated behavior.
+#
+# If your system has a up to date, bash shell, then
+# you may wish to use:
+#
+# SHELL= /bin/bash
+#
+# On some systems such as macOS, the bash shell is very
+# far behind to the point where is cannot be depended on.
+# On such systems, the sh may be a much better alternative
+# shell for this Makefile to use:
+#
+# SHELL= /bin/sh
+#
+SHELL= /bin/bash
+#SHELL= /bin/sh
+#if 0 /* start of skip for non-Gnu makefiles */
+#
+ifeq ($(target),Darwin)
+SHELL:= /bin/sh
+endif
+#
+#endif /* end of skip for non-Gnu makefiles */
+
##############################################################################
#-=-=-=-=-=-=-=-=- You may want to change some values below -=-=-=-=-=-=-=-=-#
diff --git a/Makefile.simple b/Makefile.simple
index eb5d014..a613bb7 100644
--- a/Makefile.simple
+++ b/Makefile.simple
@@ -34,7 +34,10 @@
#
# calculator by David I. Bell with help/mods from others
# Makefile by Landon Curt Noll
+#
+
+#
# The shell used by this Makefile
#
# On some systems, /bin/sh is a rather reduced shell with
@@ -56,7 +59,6 @@ SHELL= /bin/bash
#SHELL= /bin/sh
-
##############################################################################
#-=-=-=-=-=-=-=-=- You may want to change some values below -=-=-=-=-=-=-=-=-#
##############################################################################