Commit Graph

17 Commits

Author SHA1 Message Date
Landon Curt Noll
969e72b5c6 add .lldbinit improve debug comment in Makefile.local 2023-08-31 00:05:49 -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
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
92c8d89ed1 cleanup Makefile comments 2023-08-14 05:02:48 -07:00
Landon Curt Noll
ee900ec6ec improve macOS shared library building and use by calc
Dropped the use of Makefile variable ${SET_INSTALL_NAME}.
Under macOS it was always needed, elsewhere it was not.

Under macOS, the current version of both libcalc and
libcustcalc are set to the current calc 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".
2023-08-14 03:27:17 -07:00
Landon Curt Noll
77405e1d84 fix macOS comment to reduce dependency chains under macOS 2023-08-12 16:18:15 -07:00
Landon Curt Noll
da623e13cb add Makefile.local comments for macOS reduce dependency chains 2023-08-12 16:14:11 -07:00
Landon Curt Noll
f025dcf0d8 update comments in Makefile.local about using -fsanitize 2023-08-12 16:02:31 -07:00
Landon Curt Noll
d89ea78104 prep for calc version 2.14.1.4
Updated COPYING file to indicate that these files are now
covered under "The Unlicense" (see https://unlicense.org):

	sha1.c
	sha1.h
	cal/dotest.cal
	cal/screen.cal

Updated help/credit to match the above changes to COPYING.

Updated CONTRIB-CODE and calc.man to refer to using GitHub pull requests
for contributing to calc (instead of using Email).

Updated BUGS and calc.man to refer to using GitHub issues
for reporting calc bugs (instead of using Email).

Updated QUESTIONS and calc.man to refer to using GitHub issues
for asking calc questions (instead of using Email).

Fixed Makefile.local command example to refer to overriding the
Makefile variable DEBUG (instead of CDEBUG).

Fixed all make chk ASAN warnings under macOS 13.2.1 when calc is compiled
with the following uncommented lines in Makefile.local:

    DEBUG:= -O0 -g
    CFLAGS+= -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined
    LDFLAGS+= -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined
    CALC_ENV+= ASAN_OPTIONS=detect_stack_use_after_return=1

Improved how pointers to functions are declared for the builtins
array in func.c to avoid function declarations without a prototype
that is now deprecated in C.

Improved how pointers to functions are declared for the opcodes
array in opcodes.c to avoid function declarations without a prototype

Replaced use of egrep with grep -E in Makefiles.

Fixed cases where variables were set but not used in symbol.c, calc.c,
and the main function in func.c as used by funclist.c.

Added rule name to "DO NOT EDIT -- generated by the Makefile" lines
in constructed files.

Test if <sys/vfs.h> exists and set HAVE_SYS_VFS_H accordingly
in have_sys_vfs.h.  Added HAVE_SYS_VFS_H to allow one to force
this value.

Test if <sys/param.h> exists and set HAVE_SYS_PARAM_H accordingly
in have_sys_param.h.  Added HAVE_SYS_PARAM_H to allow one to force
this value.

Test if <sys/mount.h> exists and set HAVE_SYS_MOUNT_H accordingly
in have_sys_mount.h.  Added HAVE_SYS_MOUNT_H to allow one to force
this value.

Test if the system as the statfs() system call and set HAVE_STATFS
accordingly in have_statfs.h.  Added HAVE_STATFS to allow one
to force this value.

The pseudo_seed() function will also try to call statfs() if
possible and permitted by the HAVE_STATFS value.
2023-03-06 02:17:40 -08:00
Landon Curt Noll
644b348bcb minor Makefile changes
Changes #! lines in Makefiles to "#!/usr/bin/env make".

Set SHELL in Makefiles to the basename of the shell.
2023-02-16 16:47:01 -08:00
Landon Curt Noll
dcd5a987af Added better examples of asan debugging use with gcc and clang 2022-01-13 11:11:32 -08:00
Landon Curt Noll
cb77888045 Expand certain table sizes, add comments to Makefile.local
Expanded the globalsymbol string table size: from 1024 to 65536.

    Expanded the how often to reallocate string table is performed:
    from 100 to 1024.

    Expanded the number env_pool elements to allocate at a time:
    from 10 to 256.

    Improve comments on Makefile.local and add a few more examples
    of how it might be used.
2022-01-02 18:01:21 -08:00
Landon Curt Noll
3fa34dabfe Fixed typo in comment for Makefile.local 2021-12-13 22:12:03 -08:00
Landon Curt Noll
862dbd6777 Improve the calc build and release process
We apologize for the calc v2.14.0.12 source tarball that was missing
critical files.  While the executable was well tested, our release
process was deficient.

We are improved our release process and added tests during the release
procedure to help verify that we are not regressing in to the "v2.14.0.12
source tarball" issue, among other things.

Depending on how things do, you might is several releases come out over
a short period of time.  The core of calc isn't changing, so the calc
executable will be the same as we focus on the Makefiles, our release
procedure, and related documentation / help files.

We made several changes to the Makefiles.  We also added a new
README.RELEASE document (see "help release") that is a work in
progress. Along the way we discovered a few things that needed to be
updated in documentation.

See the CHANGES file for details.
2021-12-13 12:17:51 -08:00
Landon Curt Noll
8f449ba6d2 Revert local test mistake in Makefile.local 2021-11-27 00:23:54 -08:00
Landon Curt Noll
f4d754b47d Checkpoint in valgrind work 2021-11-27 00:05:28 -08:00
Landon Curt Noll
f7f110b686 Added make include of Makefile.local
Added Makefile.local, a file with a single comment.  The main
    Makefile includes Makefile.local just before the first all rule.
    One may overtide any Makefile setting by modifying Makefile.local.
    For example, Makefile.local could force BLD_TYPE:

        HAVE_STRING_H:= YES
        HAVE_TIMES_H:= YES
        SED:= /usr/local/bin/nsed

    Added ${LOC_MKF} to specify the make of the file that is
    included just before the all file.  So one could place
    the above override lines into a different file and call
    make changing the ${LOC_MKF} value.  For example:

        make LOC_MKF=Makefile.private clobber all chk
2021-04-11 03:43:37 -07:00