improve calc error code system

Added help/errorcodes rule to the top level Makefile.

Added E_USERMAX symbol (== 32767) to indicate the maximum value
allowed for user error codes.

Improve help/error.  Added text about error code ranges and
range symbols.
This commit is contained in:
Landon Curt Noll
2023-09-12 14:08:49 -07:00
parent 4c65986502
commit 19819340ff
6 changed files with 105 additions and 17 deletions

View File

@@ -325,7 +325,8 @@ STATIC_FIRST_TARGETS= ${LICENSE} .static
# late targets - things needed after the main build phase is complete
#
LATE_TARGETS= calc.1 calc.usage \
cal/.all help/.all help/builtin cscript/.all
cal/.all help/.all help/builtin help/errorcodes \
cscript/.all
# calc tools - tools used by the maintainers of the calc source base
#
@@ -2465,6 +2466,15 @@ help/builtin: help/Makefile \
${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
help/errorcodes: help/Makefile \
calcerr.h help/errorcodes.hdr help/errorcodes.sed
${V} echo '=-=-=-=-= ${MAKE_FILE} start of $@ rule =-=-=-=-='
${V} echo '=-=-=-=-= Invoking builtin rule for help =-=-=-=-='
${RM} -f $@
cd help; ${MAKE} -f Makefile errorcodes
${V} echo '=-=-=-=-= Back to the main Makefile for $@ rule =-=-=-=-='
${V} echo '=-=-=-=-= ${MAKE_FILE} end of $@ rule =-=-=-=-='
cscript/.all: ${CSCRIPT_TARGETS}
${CSCRIPT_TARGETS}: cscript/Makefile