initial modifications for ccache to support SWIG
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10915 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
27e03f3f86
commit
59988d9474
6 changed files with 400 additions and 126 deletions
|
|
@ -36,6 +36,11 @@ int execute(char **argv,
|
|||
if (pid == 0) {
|
||||
int fd;
|
||||
|
||||
/* TODO: needs moving after possible exit() below, but before stdout is redirected */
|
||||
if (ccache_verbose) {
|
||||
display_execute_args(argv);
|
||||
}
|
||||
|
||||
unlink(path_stdout);
|
||||
fd = open(path_stdout, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL|O_BINARY, 0666);
|
||||
if (fd == -1) {
|
||||
|
|
@ -127,3 +132,16 @@ char *find_executable(const char *name, const char *exclude_name)
|
|||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void display_execute_args(char **argv)
|
||||
{
|
||||
if (argv) {
|
||||
printf("ccache executing: ");
|
||||
while (*argv) {
|
||||
printf("%s ", *argv);
|
||||
++argv;
|
||||
}
|
||||
printf("\n");
|
||||
fflush(stdout);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue