Module Name: othersrc
Committed By: agc
Date: Thu May 19 16:48:16 UTC 2011
Modified Files:
othersrc/external/bsd/gensetlist: gensetlist.c
Log Message:
allow for multiple header files in an INCS makefile statement (as found in
libbluetooth, for example).
% pwd
/usr/src/lib/libbluetooth
% make setlist
...
[src/distrib/sets/lists/comp/mi]
./usr/include/bluetooth.h comp-c-include
./usr/include/sdp.h comp-c-include
./usr/share/man/cat3/bluetooth.0 comp-bluetooth-catman
.cat
...
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 othersrc/external/bsd/gensetlist/gensetlist.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: othersrc/external/bsd/gensetlist/gensetlist.c
diff -u othersrc/external/bsd/gensetlist/gensetlist.c:1.5 othersrc/external/bsd/gensetlist/gensetlist.c:1.6
--- othersrc/external/bsd/gensetlist/gensetlist.c:1.5 Tue May 17 00:22:44 2011
+++ othersrc/external/bsd/gensetlist/gensetlist.c Thu May 19 16:48:16 2011
@@ -151,8 +151,7 @@
REG_EXTENDED);
(void) regcomp(&mandir, "^[ \t]*MANDIR[ \t]*=[ \t]*([^ \t]+)",
REG_EXTENDED);
- (void) regcomp(&incs, "^[ \t]*INCS[ \t]*=[ \t]*([^ \t]+)",
- REG_EXTENDED);
+ (void) regcomp(&incs, "^[ \t]*INCS[ \t]*=", REG_EXTENDED);
(void) regcomp(&incsdir, "^[ \t]*INCSDIR[ \t]*=[ \t]*([^ \t]+)",
REG_EXTENDED);
(void) regcomp(&mlinks, "^[ \t]*MLINKS[ \t]*=",
@@ -230,10 +229,14 @@
return 1;
}
if (regexec(&incs, in, 10, matches, 0) == 0) {
- (void) asprintf(&vars->incs[vars->incc++],
- "%.*s",
- (int)(matches[1].rm_eo - matches[1].rm_so),
- &in[(int)matches[1].rm_so]);
+ for (cp = &in[(int)matches[0].rm_eo] ;
+ regexec(&subman, cp, 10, matches, 0) == 0 ;
+ cp += matches[0].rm_eo) {
+ (void) asprintf(&vars->incs[vars->incc++],
+ "%.*s",
+ (int)(matches[1].rm_eo - matches[1].rm_so),
+ &cp[(int)matches[1].rm_so]);
+ }
return 1;
}
if (regexec(&incsdir, in, 10, matches, 0) == 0) {