summaryrefslogtreecommitdiff
path: root/read.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2013-02-25 01:38:36 -0500
committerPaul Smith <psmith@gnu.org>2013-02-25 01:38:36 -0500
commit50ba7088f3fe2ef854acbfdc90bd93498f3f0f4c (patch)
treefa24d78c8f51c77371464d6c03b3aaf886c8f86a /read.c
parent103ecab8bf3395cfd3a690fe89f0a63653d83cf8 (diff)
downloadmake-50ba7088f3fe2ef854acbfdc90bd93498f3f0f4c.tar.gz
Expand the loadable object support.
Provide a simple API for loaded objects to interact with GNU make. I still won't guarantee that this API won't change but it's much closer to something that's supported and provides easy-to-use interfaces with a public header file.
Diffstat (limited to 'read.c')
-rw-r--r--read.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/read.c b/read.c
index 68287b73..af5cf01d 100644
--- a/read.c
+++ b/read.c
@@ -435,7 +435,7 @@ eval_makefile (const char *filename, int flags)
}
void
-eval_buffer (char *buffer)
+eval_buffer (char *buffer, const gmk_floc *floc)
{
struct ebuffer ebuf;
struct conditionals *saved;
@@ -448,7 +448,9 @@ eval_buffer (char *buffer)
ebuf.buffer = ebuf.bufnext = ebuf.bufstart = buffer;
ebuf.fp = NULL;
- if (reading_file)
+ if (floc)
+ ebuf.floc = *floc;
+ else if (reading_file)
ebuf.floc = *reading_file;
else
ebuf.floc.filenm = NULL;