Add support for spaces in filenames (3/x)
This takes care of dependencies. GNU Make is required for this to work.
This commit is contained in:
parent
48e004bb22
commit
569bed6399
@ -2974,17 +2974,20 @@ static int _makefile_is_phony(Makefile * makefile, char const * target)
|
|||||||
/* makefile_expand */
|
/* makefile_expand */
|
||||||
static int _makefile_expand(Makefile * makefile, char const * field)
|
static int _makefile_expand(Makefile * makefile, char const * field)
|
||||||
{
|
{
|
||||||
String * q;
|
|
||||||
int res;
|
int res;
|
||||||
|
char c;
|
||||||
|
|
||||||
if((q = string_new(field)) == NULL
|
if(field == NULL)
|
||||||
|| string_replace(&q, ",", " ") != 0)
|
|
||||||
{
|
|
||||||
string_delete(q);
|
|
||||||
return -1;
|
return -1;
|
||||||
|
res = _makefile_print(makefile, " ");
|
||||||
|
while((c = *(field++)) != '\0')
|
||||||
|
{
|
||||||
|
if(c == ' ' || c == '\t')
|
||||||
|
res |= _makefile_print(makefile, "\\");
|
||||||
|
else if(c == ',')
|
||||||
|
c = ' ';
|
||||||
|
res |= _makefile_print(makefile, "%c", c);
|
||||||
}
|
}
|
||||||
res = _makefile_print(makefile, " %s", q);
|
|
||||||
string_delete(q);
|
|
||||||
return (res >= 0) ? 0 : -1;
|
return (res >= 0) ? 0 : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user