mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
checkpoint on ALLOW_CUSTOM use
Updated comments in Makefile.local for how to Diagnosing memory, thread, and crash issues under RHEL and macOS. We no longer support the Makefile variable ${ALLOW_CUSTOM} to be empty. Normally ${ALLOW_CUSTOM} is: ALLOW_CUSTOM= -DCUSTOM Now, to disable custom disable custom even if -C is given, use: ALLOW_CUSTOM="-UCUSTOM" Added comments in Makefile.local for how to reduce dependency chains under macOS. XXX - this doesn't yet work so don't uncomment - XXX.
This commit is contained in:
@@ -19,6 +19,10 @@ must be invoked with a -C argument:
|
||||
|
||||
when it is run.
|
||||
|
||||
To disable custom even if -C is given, calc must be built with:
|
||||
|
||||
ALLOW_CUSTOM="-UCUSTOM"
|
||||
|
||||
See the ../cal/README or "help resource" for information about
|
||||
calc resource standards and guidelines.
|
||||
|
||||
@@ -41,7 +45,7 @@ pzasusb8.cal
|
||||
Run custom("pzasusb8") on a standard set of data, print Endian
|
||||
related information and print value size information.
|
||||
|
||||
## Copyright (C) 1999,2021 Landon Curt Noll
|
||||
## Copyright (C) 1999,2021,2023 Landon Curt Noll
|
||||
##
|
||||
## Calc is open software; you can redistribute it and/or modify it under
|
||||
## the terms of the version 2.1 of the GNU Lesser General Public License
|
||||
|
@@ -168,8 +168,7 @@ Step 5: Write your custom function
|
||||
#endif /* CUSTOM */
|
||||
|
||||
This allows this code to 'go away' when the upper Makefile
|
||||
disables the custom code (because ALLOW_CUSTOM no longer
|
||||
has the -DCUSTOM define).
|
||||
disables the custom code when CUSTOM is not defined.
|
||||
|
||||
b) The function type must be:
|
||||
|
||||
|
@@ -453,12 +453,13 @@ CALC_ENV= CALCPATH=./cal
|
||||
# disable custom builtin functions by not compiling any of code
|
||||
#
|
||||
# ALLOW_CUSTOM= -DCUSTOM # allow custom only if -C is given
|
||||
# ALLOW_CUSTOM= # disable custom even if -C is given
|
||||
# ALLOW_CUSTOM= -UCUSTOM # disable custom even if -C is given
|
||||
#
|
||||
# If in doubt, use ALLOW_CUSTOM= -DCUSTOM
|
||||
#
|
||||
ALLOW_CUSTOM= -DCUSTOM
|
||||
#ALLOW_CUSTOM=
|
||||
#ALLOW_CUSTOM= -UCUSTOM
|
||||
|
||||
|
||||
# Some out of date operating systems require / want an executable to
|
||||
# end with a certain file extension. Some compile systems such as
|
||||
@@ -1079,7 +1080,7 @@ install: all
|
||||
${RM} -f ${T}${CUSTOMCALDIR}/libcustcalc.a; \
|
||||
echo "removed old ${T}${CUSTOMCALDIR}/libcustcalc.a"; \
|
||||
fi
|
||||
-${Q} if [ ! -z ${ALLOW_CUSTOM} ]; then \
|
||||
-${Q} if [ X"${ALLOW_CUSTOM}" = "X-DCUSTOM" ]; then \
|
||||
if [ -f libcustcalc.a ]; then \
|
||||
if ${CMP} -s libcustcalc.a ${T}${LIBDIR}/libcustcalc.a; then \
|
||||
${TRUE}; \
|
||||
|
@@ -423,12 +423,13 @@ CALC_ENV= CALCPATH=./cal
|
||||
# disable custom builtin functions by not compiling any of code
|
||||
#
|
||||
# ALLOW_CUSTOM= -DCUSTOM # allow custom only if -C is given
|
||||
# ALLOW_CUSTOM= # disable custom even if -C is given
|
||||
# ALLOW_CUSTOM= -UCUSTOM # disable custom even if -C is given
|
||||
#
|
||||
# If in doubt, use ALLOW_CUSTOM= -DCUSTOM
|
||||
#
|
||||
ALLOW_CUSTOM= -DCUSTOM
|
||||
#ALLOW_CUSTOM=
|
||||
#ALLOW_CUSTOM= -UCUSTOM
|
||||
|
||||
|
||||
# Some out of date operating systems require / want an executable to
|
||||
# end with a certain file extension. Some compile systems such as
|
||||
@@ -1073,7 +1074,7 @@ install: all
|
||||
${RM} -f ${T}${CUSTOMCALDIR}/libcustcalc.a; \
|
||||
echo "removed old ${T}${CUSTOMCALDIR}/libcustcalc.a"; \
|
||||
fi
|
||||
-${Q} if [ ! -z ${ALLOW_CUSTOM} ]; then \
|
||||
-${Q} if [ X"${ALLOW_CUSTOM}" = "X-DCUSTOM" ]; then \
|
||||
if [ -f libcustcalc.a ]; then \
|
||||
if ${CMP} -s libcustcalc.a ${T}${LIBDIR}/libcustcalc.a; then \
|
||||
${TRUE}; \
|
||||
|
Reference in New Issue
Block a user