- Replaced the target extension with '.h.gch' if the source extension was '.h'

svn path=/trunk/; revision=10795
This commit is contained in:
Hartmut Birr 2004-09-07 08:14:30 +00:00
parent 78d5c83574
commit ff08835fad

View file

@ -5,9 +5,11 @@
int main(int argc, char* argv[])
{
char buf[512];
char buf2[512];
char ch;
unsigned int i;
unsigned int i, j;
char* dot;
char* ext;
char* prefix;
FILE* out;
@ -50,14 +52,53 @@ int main(int argc, char* argv[])
{
return(0);
}
i = 0;
while ((ch = fgetc(stdin)) == ' ' && ch != EOF)
{
buf2[i] = ch;
i++;
}
if (i == 0)
{
return 0;
}
if (ch != EOF)
{
buf2[i] = ch;
i++;
}
j = i;
while ((ch = fgetc(stdin)) != ' ' && ch != EOF)
{
buf2[j] = ch;
j++;
}
buf2[j] = 0;
if (i == j)
{
return 0;
}
ext = strrchr(buf2, '.');
if (ext != NULL)
{
if (0 == strcmp(ext, ".h"))
{
ext = "h.gch";
}
else
{
ext = NULL;
}
}
dot = strrchr(buf, '.');
if (dot != NULL)
{
*dot = 0;
}
fprintf(out, "%s/.%s.TAG %s/.%s.d %s/%s.o:", prefix, buf, prefix, buf,
prefix,buf);
fprintf(out, "%s/.%s.TAG %s/.%s.d %s/%s.%s:%s ", prefix, buf, prefix, buf,
prefix,buf,ext ? ext : "o" , buf2);
while ((ch = fgetc(stdin)) != EOF)
{