Commit Graph

661 Commits

Author SHA1 Message Date
Landon Curt Noll
b95a62c14e fix setting an invalid epsilon
Setting an invalid epsilon via the epsilon(value) or confiv("epsilon",
value) triggers an error.  The epsilon value must be: 0 < epsilon < 1.
2023-08-31 03:20:38 -07:00
Landon Curt Noll
e021e2130f add calv 3 wish to value.h 2023-08-31 02:15:51 -07:00
Landon Curt Noll
94d4c1ad64 fix Makefile use of ${EXT} for hsrc intermediates
Also improve .gitignore sort comment.  Sort generic excluded patterns
and added *.exe plus library exclusions.
2023-08-31 02:14:56 -07:00
Landon Curt Noll
5659ddbc4e remove CALC2_COMPAT symbol in source code
Removed CALC2_COMPAT in favor of ckecking if MAJOR_VER < 3.

The sign element in a ZVALUE is now of type SIGN, which is either
SB32 when MAJOR_VER < 3, or a bool otherwise.

The len element in a ZVALUE is of type LEN.  LEN type is SB32 when
MAJOR_VER < 3, or a uintptr_t otherwise.

Noted version.h symbols in README.RELEASE instead of CALC2_COMPAT.

Improve .gitignore.  Add excludes of hsrc temporary and test
programs.  Added note about how the list is sorted.
Moved the generic excludes to the top.
2023-08-31 02:02:40 -07:00
Landon Curt Noll
faa93bf085 add calc v3 wishlist for v_type to become an enum 2023-08-31 01:06:55 -07:00
Landon Curt Noll
0d2d5e3df3 add comment about turning off optimizer in .lldbinit 2023-08-31 01:02:21 -07:00
Landon Curt Noll
969e72b5c6 add .lldbinit improve debug comment in Makefile.local 2023-08-31 00:05:49 -07:00
Landon Curt Noll
4dbc4dfe9a add qispowerof2() to qfunc.c, improve log2() code
Change zispowerof2() interaface to take a FULL ptr as the 2nd arg:
zispowerof2(ZVALUE z, FULL *log2).

Added qispowerof2(NUMBER *q, NUMBER **qlog2) to qfunc.c.

Change log2() builtin to use the new qispowerof2() internal interface.

Update LIBRARY to reflect the new zispowerof2() internal interface
and the new qispowerof2() internal interface.
2023-08-27 23:50:44 -07:00
Landon Curt Noll
4e5fcc8812 add log2(x [,eps]) builtin function
Added log2(x [,eps]) builtin function.  When x is an integer
power of 2, log2(x) will return an integer, otherwise it will
return the equivalent of ln(x)/ln(2).
2023-08-27 19:02:37 -07:00
Landon Curt Noll
56c568060a updated ver_calc command line
Removed `-R release_file` and `-r release_file` command
line options from `ver_calc`.  Add `-h` option.  Updated
comments in "README.RELEASE", which serves as the contents
of the calc command "help release".
2023-08-27 16:18:12 -07:00
Landon Curt Noll
61206172f1 add NULL pre firewall to ZVALUE code
The z*.c functions that take pointers that cannot be NULL are checked
for NULL pointers at the beginning of the function.

While calc is not known to pass bogus NULL pointers to ZVALUE related
code, libcalc could be called by external code that might do so by
mistake.  If that happens, math_error() is called with the name of
the function and the name of the arg that was NULL.
2023-08-23 15:46:46 -07:00
Landon Curt Noll
0bb66cff74 change int.h to check MAJOR_VER < 3 when CHK_C is undefined
The int.h will trigger an error when CHK_C is undefined and MAJOR_VER
>= 3.  Improved the int.h error message in this case.

Added some comments and C integers to int.h.
2023-08-23 14:53:15 -07:00
Landon Curt Noll
0353aba275 add int.h
Added int.h as a centeral place for calc integer types and integer macros.

Currently zmath.c includes int.h but does not yet use it.

Added missing ptr type checks to chk_c.c.
2023-08-22 22:37:08 -07:00
Landon Curt Noll
2d5339fc51 update make chk_c rule to form status.chk_c.h
The make chk_c file also forms status.chk_c.h which either
defines CHK_C when the C compiler and select include files
appear to meet calc requirements, or undefines CHK_C
when it does not.
2023-08-21 20:18:30 -07:00
Landon Curt Noll
6abdd8ef3f restore old fake boolean typedef when no <stdbool.h> 2023-08-21 04:05:24 -07:00
Landon Curt Noll
8c6d2b2e07 improve comment about use of += in Makefile.local 2023-08-21 03:59:03 -07:00
Landon Curt Noll
999ad61a78 fix bool.h dependency on have_stdbool.h, make depend 2023-08-21 03:51:28 -07:00
Landon Curt Noll
1cf05b660c add missing min and max checks to chk_c.c 2023-08-21 03:30:31 -07:00
Landon Curt Noll
4fddf82106 add C compiler and C include checks for calc
Fixed have_statfs optional executable file extension ${EXT{ in
the ${UTIL_PROGS} make variable.

Prevented the "fake boolean value" when <stdbool.h> is missing,
from complicating C compilers post c17 standard.

Test if <stdint.h> exists and set HAVE_STDINT_H accordingly
in have_stdint.h.  Added HAVE_STDINT_H to allow one to force
this value.

Test if <inttypes.h> exists and set HAVE_INTTYPES_H accordingly
in have_inttypes.h.  Added HAVE_INTTYPES_H to allow one to force
this value.

Added c_chk.c to check the compiler and C include for calc
requirements.  If you are unable to compile this program, or
if this program when compiles does not exit 0, then your C
compiler and/or C include fails to meet calc requirements.
Compilers that are at least c99 MUST be able to compile this
program such that when run will exit 0.

The "make hsrc" file will attempt to compile and run c_chk and
will warn if the C compiler and/or C include fails to meet
calc requirements.  The "make debug" system will run c_chk -c
to print information about the C compiler and C include.
Currently failure to compile cc_chk.c or c_chk exiting non-0
will just print "WARNING!!" strings to stderr.
2023-08-21 03:10:39 -07:00
Landon Curt Noll
b0aa949ad5 simplify booleans when <stdbool.h> header file is missing 2023-08-19 22:02:16 -07:00
Landon Curt Noll
3c18e6e25b changed C source to use C booleans with backward compatibility
Fix "Under source code control" date for new version.h file.

Sorted the order of symbols printed by "make env".

Test if <stdbool.h> exists and set HAVE_STDBOOL_H accordingly
in have_stdbool.h.  Added HAVE_STDBOOL_H to allow one to force
this value.

Added "bool.h" include file to support use of boolean symbols,
true and false for pre-c99 C compilers.  The "bool.h" include
file defines TRUE as true, FALSE as false, and BOOL as bool:
for backward compatibility.

The sign in a ZVALUE is now of type SIGN, whcih is either
SB32 when CALC2_COMPAT is defined, or a bool.

Replaced in C source, TRUE with true, FALSE with false, and
BOOL with bool.
2023-08-19 19:20:32 -07:00
Landon Curt Noll
e18b715f3f fix function decls for stringrel() and stringcaserel() 2023-08-19 18:20:15 -07:00
Landon Curt Noll
a0687079f4 fix MAXDATA for non-CALC2_COMPAT small pointer case 2023-08-19 17:34:55 -07:00
Landon Curt Noll
91c0c99a2c add CALC2_COMPAT and version.h
Moved calc version definition from version.c to version.h.
Added CALC2_COMPAT, that when defined attempts to maintain calc
version 2 compatibility.  When MAJOR_VER <= 2, CALC2_COMPAT is
defined.  This is anticipation for a future calc version 3 code.
2023-08-19 17:32:42 -07:00
Landon Curt Noll
a7597cdf6f improve use of fposval.h.def warning in Makefile
When `./fposval` fails to form `fposval.h` and
the fallback file `fposval.h.def` is used, issue
a suggestion for how to see the `./fposval` failure.
2023-08-19 16:22:07 -07:00
Landon Curt Noll
4b5c0e7574 fix format of examples in help/log2 and help/logn 2023-08-19 14:14:52 -07:00
Landon Curt Noll
f60a1d6bc5 add PTR_LEN and PTR_BITS to longbits.h
Added PTR_LEN (length of a pointer) and PTR_BITS (bit length
of a pointer) to longbits.h.
2023-08-19 12:53:31 -07:00
Landon Curt Noll
f2e4f638f6 change custom_compiled() to return BOOL
Also make slight improvements on error messages produced
when custom_compiled() returns an unexpected value.
2023-08-19 11:56:10 -07:00
Landon Curt Noll
c705b74e67 ignore built file: help/ilogn in .gitignore 2023-08-19 11:42:17 -07:00
Landon Curt Noll
5a117d542a add help in advance for new log2 and logn builtins
NOTE: The `log2(x [,eps])` and `logn(x, n [,eps])`
builtin functions are NOT yet implemented.
2023-08-19 11:23:02 -07:00
Landon Curt Noll
ea57d2f24f drop support for DJGPP and drop support for win32
Support for win32 and DJGPP has been dropped.  Calc version
2.14.3.5 was the last to make references to win32 and make
references to DJGPP.  Future versions of calc may work under
those systems, we just elected to remove the somewhat out of
date and awkward `win32.mkdef` and related win32 references.

If you are a win32 user, please feel free to create a win32
target in Makefile.target and submit as a pull request.
If you are a DJGPP user, please feel free to create a DJGPP
target in Makefile.target and submit as a pull request.
Until someone can test such systems, we prefer to wait
until someone is able to test and supply a pull request.
2023-08-18 17:05:49 -07:00
Landon Curt Noll
7ad1448a1a further clarify that Msys2 is a fork of Cygwin 2023-08-18 16:28:31 -07:00
Landon Curt Noll
96f925bede Merge pull request #96 from iahung2/master 2023-08-18 14:38:42 -07:00
iahung2
8055bf07c2 Update Makefile.config
Fix build on MSYS2 (MSYS)
2023-08-18 12:38:31 +07:00
Landon Curt Noll
28449fd187 Release v2.14.3.5
The following are the changes in this release:

    Under macOS, to reduce dependency chains, we remove functions
    and data that are unreachable by the entry point or exported
    symbols.  In particular, the macOS linker is used with both
    "-dead_strip" and "-dead_strip_dylibs".

    The libcalc shared library is now linked with libcustcalc.
prod-2.14.3.5 v2.14.3.5
2023-08-17 14:37:50 -07:00
Landon Curt Noll
d88b128b2d remove excess empty line from CHANGES 2023-08-17 14:30:30 -07:00
Landon Curt Noll
bc048bc029 prep CHANGES for the next release of calc 2023-08-17 14:28:52 -07:00
Landon Curt Noll
4d32b138ed change libcalc dynamic library to link with libcustcalc
Under macOS, to reduce dependency chains, we remove functions
and data that are unreachable by the entry point or exported
symbols.  In particular, the macOS linker is used with both
"-dead_strip" and "-dead_strip_dylibs".

The libcalc shared library is now linked with libcustcalc.
2023-08-17 14:23:29 -07:00
Landon Curt Noll
3cd8fd7053 Release v2.14.3.4
Fixed rpm spec file.

The following are the changes in this release:

    Fix typo in the `make debug` Makefile rule.

    Improved .gitignore to ignore .static, calc-static,
    sample_many-static and sample_rand-static.

    Improved error messages when trying to compile with
    with one calc type (when BLD_TYPE=calc-dynamic-only or
    BLD_TYPE=calc-static-only) and install with the other.

    When installing with BLD_TYPE=calc-static-only, the
    installed calc and calc-static are links to each other.
    Thanks to GitHub user @TurtleWilly for this suggestion.

    The dynamic shared libraries are not installed if they are not
    built.  So when installing with BLD_TYPE=calc-static-only, the
    install rule will not attempt to install dynamic shared libraries.
    Thanks to GitHub user @TurtleWilly for bringing to our attention,
    problems related to building a statically linked calc under macOS.

    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"

    Dropped support of Makefile.simple and custom/Makefile.simple.
    The calc version 2.14.3.0 is the last release that supported
    the Makefile.simple and custom/Makefile.simple files.
    Now, a make that supports makefile conditional syntax is required.
    The simple target, a target that only was used for Makefile.simple
    was removed.

    Moved makefile variables that configure calc and configure how to
    compile calc from Makefile into a new Makefile.config file.

    The Makeifle includes the Makefile.config file.
    The cal/Makeifle includes the Makefile.config file.
    The cscript/Makeifle includes the Makefile.config file.
    The custom/Makeifle includes the Makefile.config file.
    The help/Makeifle includes the Makefile.config file.

    Now, the Makefile.config file will consistently configure
    calc and how calc is compiled and built by all calc Makefiles.
    The custom/Makefile no longer includes Makefile.

    The platform target section from the old Makefile has been moved
    to a new file, Makefile.target.  Improved the format and comments
    in target information.

    The Makeifle includes the Makefile.target file.
    The cal/Makeifle includes the Makefile.target file.
    The cscript/Makeifle includes the Makefile.target file.
    The custom/Makeifle includes the Makefile.target file.
    The help/Makeifle includes the Makefile.target file.

    Now, the Makefile.target file will consistently set
    target information for all calc Makefiles.

    The cal/Makeifle includes the Makefile.local file.
    The cscript/Makeifle includes the Makefile.local file.
    The custom/Makeifle includes the Makefile.local file.
    The help/Makeifle includes the Makefile.local file.

    Thus, one may modify or append many Makefile variables
    in all calc Makefiles.

    Removed the ${CAL_PASSDOWN}, ${HELP_PASSDOWN}, ${HELP_PASSDOWN},
    ${CSCRIPT_PASSDOWN} Makefile variables as the new Makefile
    include files keep Makefile variables in sync.

    Fixed the ability of calc to compile when CUSTOM is undefined
    (i.e., -UCUSTOM).  The libcustcalc is always built, regardless
    of the $(ALLOW_CUSTOM} Makefile variable.  However when CUSTOM
    is undefined, the bulk of custom functions are not defined.

    Dropped the use of Makefile variable ${SET_INSTALL_NAME}.
    Under macOS it was always needed, elsewhere it was not.

    Added Makefile variable ${VER} to hold the calc major release version.
    The calc major release version is a 3 level version (x.y.z).

    Under macOS, the current version of both libcalc and libcustcalc
    shared libraries are set to the current calc major release version.

    Under macOS, to reduce dependency chains, we remove functions and
    data that are unreachable by the entry point or exported symbols.
    In particular, the macOS linker is used with "-dead_strip" by default.

    While calc on macOS will execute if linker used with "-dead_strip_dylibs"
    and CUSTOM is defined, other applications that use libcalc but not
    libcustcalc (such as sample_many and sample_rand) will fail to execute
    due to missile symbols.  Therefore "-dead_strip_dylibs" is not used
    by default when ALLOW_CUSTOM is "-DCUSTOM" under macOS.
    Thanks to GitHub user @TurtleWilly for bringing to our attention,
    problems related to use of  "-dead_strip_dylibs".

    When installing shared libraries, libcalc.x.y.z will be a link
    to the libcalc shared library and libcustcalc.x.y.z will be a link
    to the libcustcal shared library.
v2.14.3.4
2023-08-14 23:09:46 -07:00
Landon Curt Noll
b0f19c1011 Release v2.14.3.4
Fixed rpm spec file.

The following are the changes in this release:

    Fix typo in the `make debug` Makefile rule.

    Improved .gitignore to ignore .static, calc-static,
    sample_many-static and sample_rand-static.

    Improved error messages when trying to compile with
    with one calc type (when BLD_TYPE=calc-dynamic-only or
    BLD_TYPE=calc-static-only) and install with the other.

    When installing with BLD_TYPE=calc-static-only, the
    installed calc and calc-static are links to each other.
    Thanks to GitHub user @TurtleWilly for this suggestion.

    The dynamic shared libraries are not installed if they are not
    built.  So when installing with BLD_TYPE=calc-static-only, the
    install rule will not attempt to install dynamic shared libraries.
    Thanks to GitHub user @TurtleWilly for bringing to our attention,
    problems related to building a statically linked calc under macOS.

    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"

    Dropped support of Makefile.simple and custom/Makefile.simple.
    The calc version 2.14.3.0 is the last release that supported
    the Makefile.simple and custom/Makefile.simple files.
    Now, a make that supports makefile conditional syntax is required.
    The simple target, a target that only was used for Makefile.simple
    was removed.

    Moved makefile variables that configure calc and configure how to
    compile calc from Makefile into a new Makefile.config file.

    The Makeifle includes the Makefile.config file.
    The cal/Makeifle includes the Makefile.config file.
    The cscript/Makeifle includes the Makefile.config file.
    The custom/Makeifle includes the Makefile.config file.
    The help/Makeifle includes the Makefile.config file.

    Now, the Makefile.config file will consistently configure
    calc and how calc is compiled and built by all calc Makefiles.
    The custom/Makefile no longer includes Makefile.

    The platform target section from the old Makefile has been moved
    to a new file, Makefile.target.  Improved the format and comments
    in target information.

    The Makeifle includes the Makefile.target file.
    The cal/Makeifle includes the Makefile.target file.
    The cscript/Makeifle includes the Makefile.target file.
    The custom/Makeifle includes the Makefile.target file.
    The help/Makeifle includes the Makefile.target file.

    Now, the Makefile.target file will consistently set
    target information for all calc Makefiles.

    The cal/Makeifle includes the Makefile.local file.
    The cscript/Makeifle includes the Makefile.local file.
    The custom/Makeifle includes the Makefile.local file.
    The help/Makeifle includes the Makefile.local file.

    Thus, one may modify or append many Makefile variables
    in all calc Makefiles.

    Removed the ${CAL_PASSDOWN}, ${HELP_PASSDOWN}, ${HELP_PASSDOWN},
    ${CSCRIPT_PASSDOWN} Makefile variables as the new Makefile
    include files keep Makefile variables in sync.

    Fixed the ability of calc to compile when CUSTOM is undefined
    (i.e., -UCUSTOM).  The libcustcalc is always built, regardless
    of the $(ALLOW_CUSTOM} Makefile variable.  However when CUSTOM
    is undefined, the bulk of custom functions are not defined.

    Dropped the use of Makefile variable ${SET_INSTALL_NAME}.
    Under macOS it was always needed, elsewhere it was not.

    Added Makefile variable ${VER} to hold the calc major release version.
    The calc major release version is a 3 level version (x.y.z).

    Under macOS, the current version of both libcalc and libcustcalc
    shared libraries are set to the current calc major release version.

    Under macOS, to reduce dependency chains, we remove functions and
    data that are unreachable by the entry point or exported symbols.
    In particular, the macOS linker is used with "-dead_strip" by default.

    While calc on macOS will execute if linker used with "-dead_strip_dylibs"
    and CUSTOM is defined, other applications that use libcalc but not
    libcustcalc (such as sample_many and sample_rand) will fail to execute
    due to missile symbols.  Therefore "-dead_strip_dylibs" is not used
    by default when ALLOW_CUSTOM is "-DCUSTOM" under macOS.
    Thanks to GitHub user @TurtleWilly for bringing to our attention,
    problems related to use of  "-dead_strip_dylibs".

    When installing shared libraries, libcalc.x.y.z will be a link
    to the libcalc shared library and libcustcalc.x.y.z will be a link
    to the libcustcal shared library.
2023-08-14 23:07:51 -07:00
Landon Curt Noll
fe520975cf Release v2.14.3.3
The following are the changes in this release:

    Fix typo in the `make debug` Makefile rule.

    Improved .gitignore to ignore .static, calc-static,
    sample_many-static and sample_rand-static.

    Improved error messages when trying to compile with
    with one calc type (when BLD_TYPE=calc-dynamic-only or
    BLD_TYPE=calc-static-only) and install with the other.

    When installing with BLD_TYPE=calc-static-only, the
    installed calc and calc-static are links to each other.
    Thanks to GitHub user @TurtleWilly for this suggestion.

    The dynamic shared libraries are not installed if they are not
    built.  So when installing with BLD_TYPE=calc-static-only, the
    install rule will not attempt to install dynamic shared libraries.
    Thanks to GitHub user @TurtleWilly for bringing to our attention,
    problems related to building a statically linked calc under macOS.

    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"

    Dropped support of Makefile.simple and custom/Makefile.simple.
    The calc version 2.14.3.0 is the last release that supported
    the Makefile.simple and custom/Makefile.simple files.
    Now, a make that supports makefile conditional syntax is required.
    The simple target, a target that only was used for Makefile.simple
    was removed.

    Moved makefile variables that configure calc and configure how to
    compile calc from Makefile into a new Makefile.config file.

    The Makeifle includes the Makefile.config file.
    The cal/Makeifle includes the Makefile.config file.
    The cscript/Makeifle includes the Makefile.config file.
    The custom/Makeifle includes the Makefile.config file.
    The help/Makeifle includes the Makefile.config file.

    Now, the Makefile.config file will consistently configure
    calc and how calc is compiled and built by all calc Makefiles.
    The custom/Makefile no longer includes Makefile.

    The platform target section from the old Makefile has been moved
    to a new file, Makefile.target.  Improved the format and comments
    in target information.

    The Makeifle includes the Makefile.target file.
    The cal/Makeifle includes the Makefile.target file.
    The cscript/Makeifle includes the Makefile.target file.
    The custom/Makeifle includes the Makefile.target file.
    The help/Makeifle includes the Makefile.target file.

    Now, the Makefile.target file will consistently set
    target information for all calc Makefiles.

    The cal/Makeifle includes the Makefile.local file.
    The cscript/Makeifle includes the Makefile.local file.
    The custom/Makeifle includes the Makefile.local file.
    The help/Makeifle includes the Makefile.local file.

    Thus, one may modify or append many Makefile variables
    in all calc Makefiles.

    Removed the ${CAL_PASSDOWN}, ${HELP_PASSDOWN}, ${HELP_PASSDOWN},
    ${CSCRIPT_PASSDOWN} Makefile variables as the new Makefile
    include files keep Makefile variables in sync.

    Fixed the ability of calc to compile when CUSTOM is undefined
    (i.e., -UCUSTOM).  The libcustcalc is always built, regardless
    of the $(ALLOW_CUSTOM} Makefile variable.  However when CUSTOM
    is undefined, the bulk of custom functions are not defined.

    Dropped the use of Makefile variable ${SET_INSTALL_NAME}.
    Under macOS it was always needed, elsewhere it was not.

    Added Makefile variable ${VER} to hold the calc major release version.
    The calc major release version is a 3 level version (x.y.z).

    Under macOS, the current version of both libcalc and libcustcalc
    shared libraries are set to the current calc major release version.

    Under macOS, to reduce dependency chains, we remove functions and
    data that are unreachable by the entry point or exported symbols.
    In particular, the macOS linker is used with "-dead_strip" by default.

    While calc on macOS will execute if linker used with "-dead_strip_dylibs"
    and CUSTOM is defined, other applications that use libcalc but not
    libcustcalc (such as sample_many and sample_rand) will fail to execute
    due to missile symbols.  Therefore "-dead_strip_dylibs" is not used
    by default when ALLOW_CUSTOM is "-DCUSTOM" under macOS.
    Thanks to GitHub user @TurtleWilly for bringing to our attention,
    problems related to use of  "-dead_strip_dylibs".

    When installing shared libraries, libcalc.x.y.z will be a link
    to the libcalc shared library and libcustcalc.x.y.z will be a link
    to the libcustcal shared library.
2023-08-14 22:45:24 -07:00
Landon Curt Noll
f097dd7dc1 update calc rpm to relase 14
Sort .gitignore.  Add calc.spec to .gitignore.

Update format of header part of Makefiles.

Modify calc.spec.in to handle dynamic shared libraries with 3-digit
version numbers.
2023-08-14 22:39:40 -07:00
Landon Curt Noll
3a7e763b28 Release v2.14.3.2
The following are the changes in this release:

    Fix typo in the `make debug` Makefile rule.

    Improved .gitignore to ignore .static, calc-static,
    sample_many-static and sample_rand-static.

    Improved error messages when trying to compile with
    with one calc type (when BLD_TYPE=calc-dynamic-only or
    BLD_TYPE=calc-static-only) and install with the other.

    When installing with BLD_TYPE=calc-static-only, the
    installed calc and calc-static are links to each other.
    Thanks to GitHub user @TurtleWilly for this suggestion.

    The dynamic shared libraries are not installed if they are not
    built.  So when installing with BLD_TYPE=calc-static-only, the
    install rule will not attempt to install dynamic shared libraries.
    Thanks to GitHub user @TurtleWilly for bringing to our attention,
    problems related to building a statically linked calc under macOS.

    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"

    Dropped support of Makefile.simple and custom/Makefile.simple.
    The calc version 2.14.3.0 is the last release that supported
    the Makefile.simple and custom/Makefile.simple files.
    Now, a make that supports makefile conditional syntax is required.
    The simple target, a target that only was used for Makefile.simple
    was removed.

    Moved makefile variables that configure calc and configure how to
    compile calc from Makefile into a new Makefile.config file.

    The Makeifle includes the Makefile.config file.
    The cal/Makeifle includes the Makefile.config file.
    The cscript/Makeifle includes the Makefile.config file.
    The custom/Makeifle includes the Makefile.config file.
    The help/Makeifle includes the Makefile.config file.

    Now, the Makefile.config file will consistently configure
    calc and how calc is compiled and built by all calc Makefiles.
    The custom/Makefile no longer includes Makefile.

    The platform target section from the old Makefile has been moved
    to a new file, Makefile.target.  Improved the format and comments
    in target information.

    The Makeifle includes the Makefile.target file.
    The cal/Makeifle includes the Makefile.target file.
    The cscript/Makeifle includes the Makefile.target file.
    The custom/Makeifle includes the Makefile.target file.
    The help/Makeifle includes the Makefile.target file.

    Now, the Makefile.target file will consistently set
    target information for all calc Makefiles.

    The cal/Makeifle includes the Makefile.local file.
    The cscript/Makeifle includes the Makefile.local file.
    The custom/Makeifle includes the Makefile.local file.
    The help/Makeifle includes the Makefile.local file.

    Thus, one may modify or append many Makefile variables
    in all calc Makefiles.

    Removed the ${CAL_PASSDOWN}, ${HELP_PASSDOWN}, ${HELP_PASSDOWN},
    ${CSCRIPT_PASSDOWN} Makefile variables as the new Makefile
    include files keep Makefile variables in sync.

    Fixed the ability of calc to compile when CUSTOM is undefined
    (i.e., -UCUSTOM).  The libcustcalc is always built, regardless
    of the $(ALLOW_CUSTOM} Makefile variable.  However when CUSTOM
    is undefined, the bulk of custom functions are not defined.

    Dropped the use of Makefile variable ${SET_INSTALL_NAME}.
    Under macOS it was always needed, elsewhere it was not.

    Added Makefile variable ${VER} to hold the calc major release version.
    The calc major release version is a 3 level version (x.y.z).

    Under macOS, the current version of both libcalc and libcustcalc
    shared libraries are set to the current calc major release version.

    Under macOS, to reduce dependency chains, we remove functions and
    data that are unreachable by the entry point or exported symbols.
    In particular, the macOS linker is used with "-dead_strip" by default.

    While calc on macOS will execute if linker used with "-dead_strip_dylibs"
    and CUSTOM is defined, other applications that use libcalc but not
    libcustcalc (such as sample_many and sample_rand) will fail to execute
    due to missile symbols.  Therefore "-dead_strip_dylibs" is not used
    by default when ALLOW_CUSTOM is "-DCUSTOM" under macOS.
    Thanks to GitHub user @TurtleWilly for bringing to our attention,
    problems related to use of  "-dead_strip_dylibs".

    When installing shared libraries, libcalc.x.y.z will be a link
    to the libcalc shared library and libcustcalc.x.y.z will be a link
    to the libcustcal shared library.
2023-08-14 18:32:28 -07:00
Landon Curt Noll
661e99829e prep CHANGES for the next release of calc 2023-08-14 18:25:46 -07:00
Landon Curt Noll
faf3a4fab6 fix macOS use of -dead_strip_dylibs, install major version lib symlinks.
Under macOS, to reduce dependency chains, we remove functions and
data that are unreachable by the entry point or exported symbols.
In particular, the macOS linker is used with "-dead_strip" by default.

While calc on macOS will execute if linker used with "-dead_strip_dylibs"
and CUSTOM is defined, other applications that use libcalc but not
libcustcalc (such as sample_many and sample_rand) will fail to execute
due to missile symbols.  Therefore "-dead_strip_dylibs" is not used
by default when ALLOW_CUSTOM is "-DCUSTOM" under macOS.
Thanks to GitHub user @TurtleWilly for bringing to our attention,
problems related to use of  "-dead_strip_dylibs".

When installing shared libraries, libcalc.x.y.z will be a link
to the libcalc shared library and libcustcalc.x.y.z will be a link
to the libcustcal shared library.
2023-08-14 17:40:29 -07:00
Landon Curt Noll
7d8d4cb5ea change macOS to not use "-dead_strip_dylibs" when CUSTOM is defined
Under macOS, to reduce dependency chains, we remove functions and
data that are unreachable by the entry point or exported symbols.
In particular, the macOS linker is used with "-dead_strip".

While calc on macOS will execute if linker used with "-dead_strip_dylibs"
and CUSTOM is defined, other applications that use libcalc but not
libcustcalc (such as sample_many and sample_rand) will fail to execute
due to missile symbols.  Therefore "-dead_strip_dylibs" is not used
by default when ALLOW_CUSTOM is "-DCUSTOM" under macOS.
2023-08-14 17:08:28 -07:00
Landon Curt Noll
af9b052fe9 fixed -dead_strip_dylibs for macOS, fixed macOS lib version numbers
Added Makefile variable ${VER} to holdthe calc major release version.
The calc major release version is a 3 level version (x.y.z).

Under macOS, the current version of both libcalc and
libcustcalc are set to the current calc major release version.

Under macOS, to reduce dependency chains, we remove functions and
data that are unreachable by the entry point or exported symbols.
In particular, the linker is run with "-dead_strip" and with
"-dead_strip_dylibs".
2023-08-14 15:27:22 -07:00
Landon Curt Noll
40f8654aa4 fix use of -dead_strip_dylibs for macOS linker 2023-08-14 14:58:22 -07:00
Landon Curt Noll
92c8d89ed1 cleanup Makefile comments 2023-08-14 05:02:48 -07:00
Landon Curt Noll
1e2d02e449 changed macOS to not use "-dead_strip_dylibs"
The macOS ld documentation states that option should not be used
when linking against a dylib which is required at runtime for some
indirect reason such as the dylib has an important initializer.
The libcustcalc appears to have such an initializer.
2023-08-14 04:28:59 -07:00