make/tests/scripts
Paul Smith 1748e66414 [SV 63219] Support an "unload" function for loaded objects
If a loaded object defines a symbol <object>_gmk_unload, assume it's
a function and invoke it whenever the loaded object is unloaded.
Original implementation by Dmitry Goncharov <dgoncharov@users.sf.net>

* NEWS: Announce the change.
* doc/make.texi: Describe the behavior.
* src/gnumake.h: Add information to the comments.
* src/makeint.h (unload_all): Declare a new function.
* src/main.c (die): Invoke unload_all().
* src/load.c (unload_func_t): Declare a new type for unload.
(struct load_list): Remember the unload symbol if it exists.
(load_object): Move the parsing of the object name from load_file.
Check for the _gmk_unload symbol and if found, remember it.
(load_file): Allow load_object to do object filename parsing.
(unload_file): Remove the load_list entry when unloading the object.
(unload_all): Unload all the loaded objects.
* tests/scripts/features/loadapi: Test the unload function.
2023-05-14 18:26:35 -04:00
..
features [SV 63219] Support an "unload" function for loaded objects 2023-05-14 18:26:35 -04:00
functions Adjust output strings to be aligned 2023-04-02 10:02:18 -04:00
misc tests: Run each file in a separate directory 2023-04-02 17:32:09 -04:00
options [SV 64115] Suppress warnings about undefined GNUMAKEFLAGS 2023-04-30 09:40:50 -04:00
targets * tests/scripts/targets/WAIT: Add whitespace to avoid W32 issues 2023-04-02 17:30:27 -04:00
variables [SV 64107] Disable builtins immediately on -R or -r 2023-04-30 09:40:50 -04:00
vms Convert references from "GNU make" to "GNU Make" 2023-01-01 17:05:12 -05:00
test_template Update the test template. A few fixes in run_make_test(). 2004-09-22 04:36:17 +00:00