diff --git a/CHANGES b/CHANGES index 73c255f..b95e633 100644 --- a/CHANGES +++ b/CHANGES @@ -35,6 +35,8 @@ The following are the changes from calc version 2.12.8.1 to date: Declare the SHELL at the top of Makefiles. + Fixed the depend rule in the custom Makefile. + The following are the changes from calc version 2.12.7.5 to 2.12.8.0: diff --git a/Makefile b/Makefile index 4917063..de0ae9a 100644 --- a/Makefile +++ b/Makefile @@ -56,7 +56,7 @@ # our shell # -SHELL= /bin/sh +SHELL= /bin/zsh # Try uname -s if the target was not already set on the make command line # diff --git a/Makefile.ship b/Makefile.ship index 06a6d13..9d68df9 100644 --- a/Makefile.ship +++ b/Makefile.ship @@ -1085,6 +1085,7 @@ LANG= C LDCONFIG= ldconfig LN= ln MAKE= make +MAKEDEPEND= makedepend MKDIR= mkdir MV= mv PWDCMD= pwd @@ -1094,6 +1095,7 @@ SED= sed SORT= sort SPLINT= splint SPLINT_OPTS= +STRIP= strip TEE= tee TOUCH= touch TRUE= true @@ -1103,12 +1105,9 @@ XARGS= xargs # NOTE: On some shells, echo is a builtin that does # not understand -n, so we call /bin/echo -n # directly to get around such shells. +# ECHON= /bin/echo -n -# assume the X11 makedepend tool for the depend rule -MAKEDEPEND= makedepend -STRIP= strip - # Extra compiling and linking flags # # EXTRA_CFLAGS are flags given to ${CC} when compiling C files @@ -2062,6 +2061,7 @@ CSCRIPT_PASSDOWN= \ CMP=${CMP} \ CO=${CO} \ CP=${CP} \ + ECHON="${ECHON}" \ FMT=${FMT} \ HELPDIR="${HELPDIR}" \ INCDIR="${INCDIR}" \ @@ -3894,19 +3894,12 @@ depend: custom/Makefile hsrc ${Q} ${RM} -rf skel -${Q} if ${CMP} -s ${MAKE_FILE}.bak ${MAKE_FILE}; then \ echo 'top level ${MAKE_FILE} was already up to date'; \ + echo 'restoring original ${MAKE_FILE};' \ ${MV} -f ${MAKE_FILE}.bak ${MAKE_FILE}; \ else \ - ${RM} -f ${MAKE_FILE}.tmp; \ - ${MV} ${MAKE_FILE} ${MAKE_FILE}.tmp; \ - if [ -d RCS -a ! -w "${MAKE_FILE}" ]; then \ - ${CO} -l ${MAKE_FILE}; \ - fi ;\ - ${MV} ${MAKE_FILE}.tmp ${MAKE_FILE}; \ - if [ -d RCS ]; then \ - echo '********************************************************'; \ - echo 'new top level ${MAKE_FILE} formed -- need to check it in'; \ - echo '********************************************************'; \ - fi; \ + echo 'previous ${MAKE_FILE} is now ${MAKE_FILE}.bak'; \ + echo 'new top level ${MAKE_FILE} formed'; \ + echo 'try: diff -u ${MAKE_FILE}.bak ${MAKE_FILE}'; \ fi # generate the list of h files for lower level depend use diff --git a/cal/Makefile b/cal/Makefile index 1491620..a09e6ff 100644 --- a/cal/Makefile +++ b/cal/Makefile @@ -188,25 +188,24 @@ TRUE= true # # make calc_files_list # -# to keep this list in nice sorted order and to check that these -# detailed help files are under RCS control. +# to keep this list in nice sorted order. # CALC_FILES= README alg_config.cal beer.cal bernoulli.cal \ bernpoly.cal bigprime.cal bindings brentsolve.cal chi.cal chrem.cal \ constants.cal deg.cal dms.cal dotest.cal ellip.cal factorial.cal \ - factorial2.cal gvec.cal hello.cal hms.cal infinities.cal \ - intfile.cal intnum.cal lambertw.cal linear.cal lnseries.cal \ - lucas.cal lucas_chk.cal mersenne.cal mfactor.cal \ - mod.cal natnumset.cal pell.cal pi.cal pix.cal pollard.cal poly.cal \ - prompt.cal psqrt.cal qtime.cal quat.cal randbitrun.cal randmprime.cal \ - randombitrun.cal randomrun.cal randrun.cal regress.cal repeat.cal \ - screen.cal seedrandom.cal set8700.cal set8700.line smallfactors.cal \ - solve.cal specialfunctions.cal statistics.cal strings.cal sumsq.cal \ - sumtimes.cal surd.cal test1700.cal test2300.cal test2600.cal \ - test2700.cal test3100.cal test3300.cal test3400.cal test3500.cal \ - test4000.cal test4100.cal test4600.cal test5100.cal test5200.cal \ - test8400.cal test8500.cal test8600.cal test8900.cal toomcook.cal \ - unitfrac.cal varargs.cal xx_print.cal zeta2.cal + factorial2.cal gvec.cal hello.cal hms.cal infinities.cal intfile.cal \ + intnum.cal lambertw.cal linear.cal lnseries.cal lucas.cal \ + lucas_chk.cal mersenne.cal mfactor.cal mod.cal natnumset.cal pell.cal \ + pi.cal pix.cal pollard.cal poly.cal prompt.cal psqrt.cal qtime.cal \ + quat.cal randbitrun.cal randmprime.cal randombitrun.cal randomrun.cal \ + randrun.cal regress.cal repeat.cal screen.cal seedrandom.cal \ + set8700.cal set8700.line smallfactors.cal solve.cal \ + specialfunctions.cal statistics.cal strings.cal sumsq.cal sumtimes.cal \ + surd.cal test1700.cal test2300.cal test2600.cal test2700.cal \ + test3100.cal test3300.cal test3400.cal test3500.cal test4000.cal \ + test4100.cal test4600.cal test5100.cal test5200.cal test8400.cal \ + test8500.cal test8600.cal test8900.cal toomcook.cal unitfrac.cal \ + varargs.cal xx_print.cal zeta2.cal # These calc files are now obsolete and are removed by the install rule. # @@ -262,19 +261,13 @@ calcliblist: # calc_files_list: ${Q} -(find . -mindepth 1 -maxdepth 1 -type f -name '*.cal' -print | \ - while read i; do \ - if [ X"$$i" != X"/dev/null" ]; then \ - if [ ! -f RCS/$$i,v ]; then \ - echo "WARNING: $$i not under RCS control" 1>&2; \ - else \ - echo $$i; \ - fi; \ - fi; \ - done; \ - echo '--first_line--'; \ - echo README; \ - echo set8700.line; \ - echo bindings) | \ + while read i; do \ + echo $$i; \ + done; \ + echo '--first_line--'; \ + echo README; \ + echo set8700.line; \ + echo bindings) | \ ${SED} -e 's:^\./::' | LANG=C ${SORT} | ${FMT} -70 | \ ${SED} -e '1s/--first_line--/CALC_FILES=/' -e '2,$$s/^/ /' \ -e 's/$$/ \\/' -e '$$s/ \\$$//' diff --git a/cscript/Makefile b/cscript/Makefile index be80769..0d1c732 100644 --- a/cscript/Makefile +++ b/cscript/Makefile @@ -183,6 +183,7 @@ TRUE= true # NOTE: On some shells, echo is a builtin that does # not understand -n, so we call /bin/echo -n # directly to get around such shells. +# ECHON= /bin/echo -n # The ${SCRIPT} list is the list of calc shell script files (without the .calc @@ -194,19 +195,17 @@ ECHON= /bin/echo -n # To add a script: # # 1) Name the file with a .calc filename extension -# 2) Place that file under RCS control -# 3) Add the name, without the .calc extension to the ${SCRIPT} below -# 4) Write out this Makefile -# 5) Replace the ${SCRIPT} and ${SCRIPT_SRC} lines with the output of: +# 2) Add the name, without the .calc extension to the ${SCRIPT} below +# 3) Write out this Makefile +# 4) Replace the SCRIPT= and SCRIPT_SRC= lines with the output of: # # make detaillist # -SCRIPT= 4dsphere fproduct mersenne piforever plus powerterm \ - simple square +SCRIPT= 4dsphere fproduct mersenne piforever plus powerterm simple \ + square -SCRIPT_SRC= 4dsphere.calc fproduct.calc mersenne.calc \ - piforever.calc plus.calc powerterm.calc simple.calc \ - square.calc +SCRIPT_SRC= 4dsphere.calc fproduct.calc mersenne.calc piforever.calc \ + plus.calc powerterm.calc simple.calc square.calc # These files are found (but not built) in the distribution # @@ -270,11 +269,7 @@ detaillist: ${Q} -(echo "xxxxxxx"; \ for i in ${SCRIPT} /dev/null; do \ if [ X"$$i" != X"/dev/null" ]; then \ - if [ ! -f RCS/$$i.calc,v ]; then \ - echo "WARNING: $$i.calc not under RCS control" 1>&2; \ - else \ - echo $$i; \ - fi; \ + echo $$i; \ fi; \ done | LANG=C ${SORT}) | ${FMT} -70 | \ ${SED} -e '1s/xxxxxxx/SCRIPT=/' -e '2,$$s/^/ /' \ @@ -283,11 +278,7 @@ detaillist: ${Q} -(echo "xxxxxxxxxxx"; \ for i in ${SCRIPT} /dev/null; do \ if [ X"$$i" != X"/dev/null" ]; then \ - if [ ! -f RCS/$$i.calc,v ]; then \ - echo "WARNING: $$i.calc not under RCS control" 1>&2; \ - else \ - echo $$i.calc; \ - fi; \ + echo $$i.calc; \ fi; \ done | LANG=C ${SORT}) | ${FMT} -70 | \ ${SED} -e '1s/xxxxxxxxxxx/SCRIPT_SRC=/' -e '2,$$s/^/ /' \ @@ -333,20 +324,13 @@ depend: ${Q} ${CAT} makedep.out >> ${MAKE_FILE} ${Q} ${RM} -f makedep.out -${Q} if ${CMP} -s ${MAKE_FILE}.bak ${MAKE_FILE}; then \ - echo 'sample ${MAKE_FILE} was already up to date'; \ + echo 'sample/${MAKE_FILE} was already up to date'; \ + echo 'restoring original sample/${MAKE_FILE}'; \ ${MV} -f ${MAKE_FILE}.bak ${MAKE_FILE}; \ else \ - ${RM} -f ${MAKE_FILE}.tmp; \ - ${MV} ${MAKE_FILE} ${MAKE_FILE}.tmp; \ - if [ -d RCS -a ! -w "${MAKE_FILE}" ]; then \ - ${CO} -l ${MAKE_FILE}; \ - fi; \ - ${MV} ${MAKE_FILE}.tmp ${MAKE_FILE}; \ - if [ -d RCS ]; then \ - echo '******************************************************'; \ - echo 'new cscript ${MAKE_FILE} formed -- need to check it in'; \ - echo '******************************************************'; \ - fi; \ + echo 'previous sample/${MAKE_FILE} is now sample/${MAKE_FILE}.bak'; \ + echo 'new sample/${MAKE_FILE} formed'; \ + echo 'try: diff -u sample/${MAKE_FILE}.bak sample/${MAKE_FILE};' \ fi ## diff --git a/custom/Makefile b/custom/Makefile index 43f36f4..342766a 100644 --- a/custom/Makefile +++ b/custom/Makefile @@ -1226,7 +1226,7 @@ Makefile.simple: ${MAKE_FILE} depend: ${Q} if [ -f ${MAKE_FILE}.bak ]; then \ - echo "${MAKE_FILE}.bak exists, remove or move it"; \ + echo "custom/${MAKE_FILE}.bak exists, remove or move it"; \ exit 1; \ else \ ${TRUE}; \ @@ -1242,9 +1242,7 @@ depend: fi; \ done -${Q} for i in ${H_SRC} /dev/null; do \ - if [ "$$i" = "/dev/null" ]; then \ - continue; \ - fi; \ + if [ "$$i" = "/dev/null" ]; then continue; fi; \ tag="`echo $$i | ${SED} 's/[\.+,:]/_/g'`"; \ echo "#if !defined($$tag)" > "skel/custom/$$i"; \ echo "#define $$tag" >> "skel/custom/$$i"; \ @@ -1253,25 +1251,24 @@ depend: echo '#endif /* '"$$tag"' */' >> "skel/custom/$$i"; \ done ${Q} (cd ..; ${MAKE} -f ${TOP_MAKE_FILE} hsrc) - ${Q} for i in `cd ..; ${MAKE} -f ${TOP_MAKE_FILE} h_list 2>&1 | \ - ${SED} -e '/Entering directory/d' \ - -e '/Nothing to be done/d' \ - -e '/Leaving directory/d'` /dev/null; do \ - if [ "$$i" = "/dev/null" ]; then \ - continue; \ - fi; \ - tag="`echo $$i | ${SED} 's/[\.+,:]/_/g'`"; \ - echo "#if !defined($$tag)" > "skel/$$i"; \ - echo "#define $$tag" >> "skel/$$i"; \ - ${SED} -n '/^#[ ]*include[ ]*"/p' "../$$i" \ - >> "skel/$$i"; \ - echo '#endif /* '"$$tag"' */' >> "skel/$$i"; \ - done + ${MAKE} -f ../${TOP_MAKE_FILE} h_list 2>/dev/null | \ + while read i; do \ + if [ ! -f "../$$i" ]; then continue; fi; \ + tag="`echo $$i | ${SED} 's/[\.+,:]/_/g'`"; \ + echo "#if !defined($$tag)" > "skel/$$i"; \ + echo "#define $$tag" >> "skel/$$i"; \ + ${SED} -n '/^#[ ]*include[ ]*"/p' "../$$i" \ + >> "skel/$$i"; \ + echo '#endif /* '"$$tag"' */' >> "skel/$$i"; \ + done ${Q} ${RM} -f skel/custom/makedep.out ${Q} echo custom/skel formed ${Q} echo forming custom dependency list ${Q} :> skel/custom/makedep.out - ${Q} cd skel/custom; ${MAKEDEPEND} -I.. -w 1 -f makedep.out ${C_SRC} + ${Q} cd skel/custom; ${MAKEDEPEND} \ + -I../../.. -w 1 -f makedep.out \ + ${C_SRC} 2>/dev/null + ${Q} ${SED} -e 's|: ../../|: |' -E -i '' -l skel/custom/makedep.out -${Q} for i in ${C_SRC} /dev/null; do \ if [ X"$$i" != X"/dev/null" ]; then \ echo "$$i" | ${SED} 's/^\(.*\)\.c/\1.o: \1.c/'; \ @@ -1288,20 +1285,13 @@ depend: ${Q} ${GREP} -v '^#' skel/custom/makedep.out >> ${MAKE_FILE} ${Q} ${RM} -rf skel -${Q} if ${CMP} -s ${MAKE_FILE}.bak ${MAKE_FILE}; then \ - echo 'custom ${MAKE_FILE} was already up to date'; \ + echo 'custom/${MAKE_FILE} was already up to date'; \ + echo 'restoring original custom/${MAKE_FILE}'; \ ${MV} -f ${MAKE_FILE}.bak ${MAKE_FILE}; \ else \ - ${RM} -f ${MAKE_FILE}.tmp; \ - ${MV} ${MAKE_FILE} ${MAKE_FILE}.tmp; \ - if [ -d RCS -a ! -w "${MAKE_FILE}" ]; then \ - ${CO} -l ${MAKE_FILE}; \ - fi ;\ - ${MV} ${MAKE_FILE}.tmp ${MAKE_FILE}; \ - if [ -d RCS ]; then \ - echo '****************************************************'; \ - echo 'new custom ${MAKE_FILE} formed -- you to check it in'; \ - echo '****************************************************'; \ - fi; \ + echo 'previous custom/${MAKE_FILE} is now custom/${MAKE_FILE}.bak'; \ + echo 'new custom/${MAKE_FILE} formed'; \ + echo 'try: diff -u custom/${MAKE_FILE}.bak custom/${MAKE_FILE};' \ fi ## diff --git a/custom/Makefile.tail b/custom/Makefile.tail index 5053cd1..27687a7 100644 --- a/custom/Makefile.tail +++ b/custom/Makefile.tail @@ -170,7 +170,7 @@ Makefile.simple: ${MAKE_FILE} depend: ${Q} if [ -f ${MAKE_FILE}.bak ]; then \ - echo "${MAKE_FILE}.bak exists, remove or move it"; \ + echo "custom/${MAKE_FILE}.bak exists, remove or move it"; \ exit 1; \ else \ ${TRUE}; \ @@ -186,9 +186,7 @@ depend: fi; \ done -${Q} for i in ${H_SRC} /dev/null; do \ - if [ "$$i" = "/dev/null" ]; then \ - continue; \ - fi; \ + if [ "$$i" = "/dev/null" ]; then continue; fi; \ tag="`echo $$i | ${SED} 's/[\.+,:]/_/g'`"; \ echo "#if !defined($$tag)" > "skel/custom/$$i"; \ echo "#define $$tag" >> "skel/custom/$$i"; \ @@ -197,25 +195,24 @@ depend: echo '#endif /* '"$$tag"' */' >> "skel/custom/$$i"; \ done ${Q} (cd ..; ${MAKE} -f ${TOP_MAKE_FILE} hsrc) - ${Q} for i in `cd ..; ${MAKE} -f ${TOP_MAKE_FILE} h_list 2>&1 | \ - ${SED} -e '/Entering directory/d' \ - -e '/Nothing to be done/d' \ - -e '/Leaving directory/d'` /dev/null; do \ - if [ "$$i" = "/dev/null" ]; then \ - continue; \ - fi; \ - tag="`echo $$i | ${SED} 's/[\.+,:]/_/g'`"; \ - echo "#if !defined($$tag)" > "skel/$$i"; \ - echo "#define $$tag" >> "skel/$$i"; \ - ${SED} -n '/^#[ ]*include[ ]*"/p' "../$$i" \ - >> "skel/$$i"; \ - echo '#endif /* '"$$tag"' */' >> "skel/$$i"; \ - done + ${MAKE} -f ../${TOP_MAKE_FILE} h_list 2>/dev/null | \ + while read i; do \ + if [ ! -f "../$$i" ]; then continue; fi; \ + tag="`echo $$i | ${SED} 's/[\.+,:]/_/g'`"; \ + echo "#if !defined($$tag)" > "skel/$$i"; \ + echo "#define $$tag" >> "skel/$$i"; \ + ${SED} -n '/^#[ ]*include[ ]*"/p' "../$$i" \ + >> "skel/$$i"; \ + echo '#endif /* '"$$tag"' */' >> "skel/$$i"; \ + done ${Q} ${RM} -f skel/custom/makedep.out ${Q} echo custom/skel formed ${Q} echo forming custom dependency list ${Q} :> skel/custom/makedep.out - ${Q} cd skel/custom; ${MAKEDEPEND} -I.. -w 1 -f makedep.out ${C_SRC} + ${Q} cd skel/custom; ${MAKEDEPEND} \ + -I../../.. -w 1 -f makedep.out \ + ${C_SRC} 2>/dev/null + ${Q} ${SED} -e 's|: ../../|: |' -E -i '' -l skel/custom/makedep.out -${Q} for i in ${C_SRC} /dev/null; do \ if [ X"$$i" != X"/dev/null" ]; then \ echo "$$i" | ${SED} 's/^\(.*\)\.c/\1.o: \1.c/'; \ @@ -232,20 +229,13 @@ depend: ${Q} ${GREP} -v '^#' skel/custom/makedep.out >> ${MAKE_FILE} ${Q} ${RM} -rf skel -${Q} if ${CMP} -s ${MAKE_FILE}.bak ${MAKE_FILE}; then \ - echo 'custom ${MAKE_FILE} was already up to date'; \ + echo 'custom/${MAKE_FILE} was already up to date'; \ + echo 'restoring original custom/${MAKE_FILE}'; \ ${MV} -f ${MAKE_FILE}.bak ${MAKE_FILE}; \ else \ - ${RM} -f ${MAKE_FILE}.tmp; \ - ${MV} ${MAKE_FILE} ${MAKE_FILE}.tmp; \ - if [ -d RCS -a ! -w "${MAKE_FILE}" ]; then \ - ${CO} -l ${MAKE_FILE}; \ - fi ;\ - ${MV} ${MAKE_FILE}.tmp ${MAKE_FILE}; \ - if [ -d RCS ]; then \ - echo '****************************************************'; \ - echo 'new custom ${MAKE_FILE} formed -- you to check it in'; \ - echo '****************************************************'; \ - fi; \ + echo 'previous custom/${MAKE_FILE} is now custom/${MAKE_FILE}.bak'; \ + echo 'new custom/${MAKE_FILE} formed'; \ + echo 'try: diff -u custom/${MAKE_FILE}.bak custom/${MAKE_FILE};' \ fi ## diff --git a/help/Makefile b/help/Makefile index 0aa3829..9d14027 100644 --- a/help/Makefile +++ b/help/Makefile @@ -277,8 +277,7 @@ BLT_HELP_FILES= ${BLT_HELP_FILES_3} ${BLT_HELP_FILES_5} \ # # make detail_help_list # -# to keep this list in nice sorted order and to check that these -# non-special help files are under RCS control. +# to keep this list in nice sorted order. # DETAIL_HELP= abs access acos acosh acot acoth acsc acsch address agd \ append appr arg argv arrow asec asech asin asinh assign atan atan2 \ @@ -301,14 +300,15 @@ DETAIL_HELP= abs access acos acosh acot acoth acsc acsch address agd \ matsum mattrace mattrans max memsize meq min minv mmin mne mod modify \ name near newerror nextcand nextprime norm null num oldvalue ord param \ perm pfact pi pix places pmod polar poly pop popcnt pound power \ - prevcand prevprime printf prompt protect ptest push putenv quo quomod \ - rand randbit random randombit randperm rcin rcmul rcout rcpow rcsq re \ - remove reverse rewind rm root round rsearch runtime saveval scale scan \ - scanf search sec sech seed segment select sgn sha1 sin sinh size \ - sizeof sleep sort sqrt srand srandom ssq stoponerror str strcasecmp \ - strcat strcmp strcpy strerror strlen strncasecmp strncmp strncpy \ - strpos strprintf strscan strscanf strtolower strtoupper substr sum \ - swap system systime tail tan tanh test time trunc usertime version xor + prevcand prevprime printf prompt protect ptest push putenv questions \ + quo quomod rand randbit random randombit randperm rcin rcmul rcout \ + rcpow rcsq re remove reverse rewind rm root round rsearch runtime \ + saveval scale scan scanf search sec sech seed segment select sgn sha1 \ + sin sinh size sizeof sleep sort sqrt srand srandom ssq stoponerror str \ + strcasecmp strcat strcmp strcpy strerror strlen strncasecmp strncmp \ + strncpy strpos strprintf strscan strscanf strtolower strtoupper substr \ + sum swap system systime tail tan tanh test time trunc usertime version \ + xor # This list is of files that are clones of DETAIL_HELP files. They are # built from DETAIL_HELP files. @@ -690,11 +690,7 @@ detail_help_list: -print | \ while read i; do \ if [ X"$$i" != X"/dev/null" ]; then \ - if [ ! -f RCS/$$i,v ]; then \ - echo "WARNING: $$i not under RCS control" 1>&2; \ - else \ - echo $$i; \ - fi; \ + echo $$i; \ fi; \ done; \ echo '--first_line--') | \