diff options
Diffstat (limited to 'src/gnumake.h')
-rw-r--r-- | src/gnumake.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gnumake.h b/src/gnumake.h index b437db75..3ebe6621 100644 --- a/src/gnumake.h +++ b/src/gnumake.h @@ -1,5 +1,4 @@ /* External interfaces usable by dynamic objects loaded into GNU Make. - --THIS API IS A "TECHNOLOGY PREVIEW" ONLY. IT IS NOT A STABLE INTERFACE-- Copyright (C) 2013-2023 Free Software Foundation, Inc. This file is part of GNU Make. @@ -19,6 +18,8 @@ this program. If not, see <https://www.gnu.org/licenses/>. */ #ifndef _GNUMAKE_H_ #define _GNUMAKE_H_ +#define GMK_ABI_VERSION 1 + /* Specify the location of elements read from makefiles. */ typedef struct { @@ -28,6 +29,14 @@ typedef struct typedef char *(*gmk_func_ptr)(const char *nm, unsigned int argc, char **argv); +/* When an object is loaded by GNU Make, a setup method will be invoked. + The name of the method is either derived from the filename of the object, + or specified explicitly in the makefile. It has the signature: + + int <setup_fn> (unsigned int abi_version, const gmk_floc *flocp); + + The abi_version will be set to GMK_ABI_VERSION. */ + #ifdef _WIN32 # ifdef GMK_BUILDING_MAKE # define GMK_EXPORT __declspec(dllexport) @@ -38,7 +47,7 @@ typedef char *(*gmk_func_ptr)(const char *nm, unsigned int argc, char **argv); # define GMK_EXPORT #endif -/* Free memory returned by the gmk_expand() function. */ +/* Free memory returned by the gmk_expand() and gmk_free() functions. */ GMK_EXPORT void gmk_free (char *str); /* Allocate memory in GNU Make's context. */ |