Thread View: gnu.utils.bug
1 messages
1 total messages
Started by wsd
Sat, 30 Sep 1989 01:49
new vpsearch fn
Author: wsd
Date: Sat, 30 Sep 1989 01:49
Date: Sat, 30 Sep 1989 01:49
49 lines
1720 bytes
1720 bytes
We in the Graphics Group at Brown have adopted GNUmake as part of our
software standards. In doing so, we made a few changes that others
might find useful:
1) . allowed in vpath (why was this explicitly excluded?)
just remove the lines
if (len == 1 && *v == '.')
continue;
from construct_vpath_list() in vpath.c. This is useful in conjunction
with vpsearch.
2) vpsearch function
This takes a bunch of filenames, finds them in the vpath, then
attaches the directory where each was found to each file. So, if
VPATH is ../include:. and ../include contains foo and . contains bar,
then $(vpsearch foo bar) returns "../include/foo ./bar". An example
of its use is:
wc:
wc $(vpsearch $(src))
here's the code (for expand_function() in function.c):
case function_vpsearch:
text = expand_argument(text, end);
i = strlen(text);
p3 = text;
while (p = find_next_token(&p3, NULL)) {
p2 = p;
if (vpath_search(&p2)) {
o = variable_buffer_output(o, p2, strlen(p2));
o = variable_buffer_output(o, " ", 1);
doneany = 1;
}
else error("vpsearch couldn't find file %s", p);
}
if (doneany) --o;
free(p2);
free(text);
break;
These contributions are from Paul Strauss, Mike Natkin, and Scott
Draves.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads