Files
reactos/reactos/tools/depends.c
Casper Hornstrup 3f69ca4cc4 Major update of the build system:
- Created helper makefile for all targets
- Made most makefiles simpler by using the helper makefile
- Moved build tools into ./tools

Updated installation instructions

svn path=/trunk/; revision=2185
2001-08-21 20:13:17 +00:00

56 lines
810 B
C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char* argv[])
{
char buf[512];
char ch;
unsigned int i;
char* dot;
char* prefix;
FILE* out;
if (argc != 3)
{
printf("Too few arguments\n");
return(1);
}
prefix = strdup(argv[1]);
out = fopen(argv[2], "wb");
if (out == NULL)
{
printf("Unable to open output file\n");
return(1);
}
i = 0;
while ((ch = fgetc(stdin)) != ':' && ch != EOF)
{
buf[i] = ch;
i++;
}
buf[i] = 0;
if (i == 0)
{
return(0);
}
dot = strrchr(buf, '.');
if (dot != NULL)
{
*dot = 0;
}
fprintf(out, "%s/.%s.d %s/%s.o:", prefix, buf, prefix,buf);
while ((ch = fgetc(stdin)) != EOF)
{
fputc(ch, out);
}
return(0);
}