--- Makefile.orig 2017-06-02 21:50:17 UTC +++ Makefile @@ -571,7 +571,7 @@ HAVE_UNUSED= #INCDIR= /usr/local/include #INCDIR= /dev/env/DJDIR/include -INCDIR= /usr/include +INCDIR= ${PREFIX}/include # Where to install calc related things # @@ -610,15 +610,15 @@ INCDIR= /usr/include # #BINDIR= /usr/local/bin #BINDIR= /dev/env/DJDIR/bin -BINDIR= /usr/bin +BINDIR= ${PREFIX}/bin #LIBDIR= /usr/local/lib #LIBDIR= /dev/env/DJDIR/lib -LIBDIR= /usr/lib +LIBDIR= ${PREFIX}/lib #CALC_SHAREDIR= /usr/local/lib/calc #CALC_SHAREDIR= /dev/env/DJDIR/share/calc -CALC_SHAREDIR= /usr/share/calc +CALC_SHAREDIR= ${PREFIX}/share/calc # NOTE: Do not set CALC_INCDIR to /usr/include or /usr/local/include!!! # Always be sure that the CALC_INCDIR path ends in /calc to avoid @@ -685,7 +685,7 @@ SCRIPTDIR= ${BINDIR}/cscript # # If in doubt, use T= # -T= +T=${DESTDIR} # where man pages are installed # @@ -696,7 +696,7 @@ T= #MANDIR= #MANDIR= /usr/local/man/man1 #MANDIR= /usr/man/man1 -MANDIR= /usr/share/man/man1 +MANDIR= ${PREFIX}/man/man1 #MANDIR= /dev/env/DJDIR/man/man1 #MANDIR= /usr/man/u_man/man1 #MANDIR= /usr/contrib/man/man1 @@ -831,14 +831,14 @@ CALCRC= ${CALC_SHAREDIR}/startup:~/.calc # # 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 @@ -872,7 +872,7 @@ READLINE_INCLUDE= #CALCPAGER= more #CALCPAGER= pg #CALCPAGER= cat -CALCPAGER= less +#CALCPAGER= less #CALCPAGER= less.exe -ci # Debug/Optimize options for ${CC} and ${LCC} @@ -999,35 +999,36 @@ LIB_EXT_VERSION= ${LIB_EXT}.${VERSION} # standard utilities used during make # -SHELL= /bin/sh +#SHELL= /bin/sh LANG= C -MAKE= make +#MAKE= make AWK= awk -SED= sed +#SED= sed DIFF= diff GREP= egrep SORT= sort TEE= tee CTAGS= ctags -CHMOD= chmod +#CHMOD= chmod FMT= fmt XARGS= xargs CMP= cmp -MKDIR= mkdir +#MKDIR= mkdir SPLINT= splint SPLINT_OPTS= -RM= rm -TOUCH= touch +#RM= rm +#TOUCH= touch RMDIR= rmdir -CP= cp -MV= mv +#CP= cp +#MV= mv CO= co AR= ar -TRUE= true -CAT= cat +#TRUE= true +#CAT= cat COL= col -LN= ln -LDCONFIG= ldconfig +#LN= ln +#LDCONFIG= ldconfig +LDCONFIG= # assume the X11 makedepend tool for the depend rule MAKEDEPEND= makedepend STRIP= strip @@ -1327,13 +1328,15 @@ WNO_IMPLICT= -Wno-implicit WNO_ERROR_LONG_LONG= -Wno-error=long-long WNO_LONG_LONG= -Wno-long-long CCWERR= -CCOPT= ${DEBUG} +#CCOPT= ${DEBUG} +CCOPT= CCMISC= # -LCC= gcc -CC= ${PURIFY} ${LCC} ${CCWERR} +LCC= ${CC} +#CC= ${PURIFY} ${LCC} ${CCWERR} # -MAKE= gmake +#MAKE= gmake +MAKE= ${GMAKE} # endif @@ -1680,7 +1683,8 @@ ICFLAGS= ${COMMON_CFLAGS} ${CC_STATIC} else ICFLAGS= ${COMMON_CFLAGS} ${CC_SHARE} endif -CFLAGS= ${ICFLAGS} ${CCOPT} +#CFLAGS= ${ICFLAGS} ${CCOPT} +CFLAGS+= ${ICFLAGS} ${CCOPT} # Required flags to link files for calc # @@ -1865,7 +1869,7 @@ CUSTOM_PASSDOWN= \ COMMON_ADD="${COMMON_ADD}" \ COMMON_CFLAGS="${COMMON_CFLAGS} -I.." \ COMMON_LDFLAGS="${COMMON_LDFLAGS}" \ - CP=${CP} \ + CP="${CP}" \ CUSTOMCALDIR="${CUSTOMCALDIR}" \ CUSTOMHELPDIR="${CUSTOMHELPDIR}" \ CUSTOMINCDIR="${CUSTOMINCDIR}" \ @@ -1893,7 +1897,7 @@ CUSTOM_PASSDOWN= \ PURIFY="${PURIFY}" \ Q="${Q}" \ RANLIB="${RANLIB}" \ - RM=${RM} \ + RM="${RM}" \ RMDIR=${RMDIR} \ SCRIPTDIR="${SCRIPTDIR}" \ SED=${SED} \ @@ -1920,7 +1924,7 @@ HELP_PASSDOWN= \ COMMON_ADD="${COMMON_ADD}" \ COMMON_CFLAGS="${COMMON_CFLAGS}" \ COMMON_LDFLAGS="${COMMON_LDFLAGS}" \ - CP=${CP} \ + CP="${CP}" \ EXT=${EXT} \ FMT=${FMT} \ GREP=${GREP} \ @@ -1935,7 +1939,7 @@ HELP_PASSDOWN= \ MKDIR=${MKDIR} \ MV=${MV} \ Q="${Q}" \ - RM=${RM} \ + RM="${RM}" \ RMDIR=${RMDIR} \ SCRIPTDIR="${SCRIPTDIR}" \ SED=${SED} \ @@ -1955,7 +1959,7 @@ CAL_PASSDOWN= \ CHMOD=${CHMOD} \ CMP=${CMP} \ CO=${CO} \ - CP=${CP} \ + CP="${CP}" \ HELPDIR="${HELPDIR}" \ INCDIR="${INCDIR}" \ LANG=${LANG} \ @@ -1964,7 +1968,7 @@ CAL_PASSDOWN= \ MKDIR=${MKDIR} \ MV=${MV} \ Q="${Q}" \ - RM=${RM} \ + RM="${RM}" \ RMDIR=${RMDIR} \ SCRIPTDIR="${SCRIPTDIR}" \ T=${T} \ @@ -1983,7 +1987,7 @@ CSCRIPT_PASSDOWN= \ CHMOD=${CHMOD} \ CMP=${CMP} \ CO=${CO} \ - CP=${CP} \ + CP="${CP}" \ FMT=${FMT} \ HELPDIR="${HELPDIR}" \ INCDIR="${INCDIR}" \ @@ -1993,7 +1997,7 @@ CSCRIPT_PASSDOWN= \ MKDIR=${MKDIR} \ MV=${MV} \ Q="${Q}" \ - RM=${RM} \ + RM="${RM}" \ RMDIR=${RMDIR} \ SCRIPTDIR="${SCRIPTDIR}" \ SED=${SED} \