summaryrefslogtreecommitdiff
path: root/NEWS
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2023-05-07 16:51:12 -0400
committerPaul Smith <psmith@gnu.org>2023-05-14 18:26:35 -0400
commit1748e6641419e8a48f830caad072ed5b298577af (patch)
treea0650a8ee54b5ec4020a5b1277bd70cd903d4ac2 /NEWS
parent8e0e6c678f3cf1199751e3b097745531ceed34ed (diff)
downloadmake-git-1748e6641419e8a48f830caad072ed5b298577af.tar.gz
[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.
Diffstat (limited to 'NEWS')
-rw-r--r--NEWS8
1 files changed, 7 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 159d228e..295a2a4e 100644
--- a/NEWS
+++ b/NEWS
@@ -29,6 +29,12 @@ https://sv.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=111&se
your initialization function can check the provided ABI version to verify
it's being loaded correctly.
+* New feature: Unload function for loaded objects
+ When a loaded object needs to be unloaded by GNU Make, it will invoke an
+ unload function (if one is defined) beforehand that allows the object to
+ perform cleanup operations.
+ Original idea and implementation: Dmitry Goncharov <dgoncharov@users.sf.net>
+
* New feature: Makefile warning reporting control
A new option "--warn" controls reporting of warnings for makefiles. Actions
can be set to "ignore", "warn", or "error". Two new warnings are reported:
@@ -38,7 +44,7 @@ https://sv.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=111&se
deprecated, and is translated to "--warn=undefined-vars" internally.
* New feature: Control warnings with the .WARNINGS variable
- In addition to --warn from the command line, which take effect for make
+ In addition to --warn from the command line, which takes effect for make
invoked recursively, warnings can be controlled only for the current
instance of make using the .WARNINGS variable.