Prepare for calc version 2.13.0.1

Replaced /usr/local with the use of ${PREFIX} in calc Makefiles.

    The ${PREFIX} is not the same as ${T}.  The ${T} specifies
    a top level directory under which calc installs things.
    While usally ${T} is empty, it can be specific path
    as if calc where "chrooted" during an install.
    The ${PREFIX} value, during install, is a path between
    the top level ${T} install directory and the object
    such as an include file.

    Corrected a few more typos in Makefile comments.
This commit is contained in:
Landon Curt Noll
2021-04-09 12:40:51 -07:00
parent 6bc0747a71
commit ebf065dcb8
9 changed files with 326 additions and 86 deletions

View File

@@ -68,6 +68,22 @@ endif
#-=-=-=-=-=-=-=-=- You may want to change some values below -=-=-=-=-=-=-=-=-#
##############################################################################
# PREFIX - Top level location for calc
#
# The PREFIX is often prepended to paths within calc and calc Makefiles.
#
# Starting with calc v2.13.0.1, nearly all Makefile places that used
# /usr/local now use ${PREFIX}. An exception is the olduninstall rule
# and, of course, this section. :-)
#
# When in doubt, try:
#
# PREFIX= /usr/local
#
PREFIX= /usr/local
#PREFIX= /usr
#PREFIX= /usr/global
# CCBAN is given to ${CC} in order to control if banned.h is in effect.
#
# The banned.h attempts to ban the use of certain dangerous functions
@@ -111,22 +127,22 @@ USE_READLINE= -DUSE_READLINE
#
#READLINE_LIB=
#READLINE_LIB= -L/usr/gnu/lib -lreadline -lhistory -lncurses
#READLINE_LIB= -L/usr/local/lib -lreadline -lhistory -lncurses
#READLINE_LIB= -L${PREFIX}/lib -lreadline -lhistory -lncurses
ifeq ($(target),Darwin)
# homebrew installs readline & history libs in /usr/local/opt/readline/lib
READLINE_LIB= -L/usr/local/opt/readline/lib -lreadline -lhistory -lncurses
# homebrew installs readline & history libs in ${PREFIX}/opt/readline/lib
READLINE_LIB= -L${PREFIX}/opt/readline/lib -lreadline -lhistory -lncurses
else
READLINE_LIB= -lreadline -lhistory -lncurses
endif
#
ifeq ($(target),Darwin)
# homebrew installs readline & history *.h under /usr/local/opt/readline/include
READLINE_INCLUDE= -I/usr/local/opt/readline/include
# homebrew installs readline & history *.h under ${PREFIX}/opt/readline/include
READLINE_INCLUDE= -I${PREFIX}/opt/readline/include
else
READLINE_INCLUDE=
endif
#READLINE_INCLUDE= -I/usr/gnu/include
#READLINE_INCLUDE= -I/usr/local/include
#READLINE_INCLUDE= -I${PREFIX}/include
# Normally certain files depend on the Makefile. If the Makefile is
# changed, then certain steps should be redone. If MAKE_FILE is
@@ -242,6 +258,7 @@ XVAR= \
MAKE_FILE='${MAKE_FILE}' \
NROFF='${NROFF}' \
Q='${Q}' \
PREFIX='${PREFIX}' \
READLINE_INCLUDE='${READLINE_INCLUDE}' \
READLINE_LIB='${READLINE_LIB}' \
RPM_TOP='${RPM_TOP}' \