The short answer is that tup wants to know about all build artifacts, and
thus, every output file must be specified. I don't know much about clang's
side effects, but I guess on Windows it leaves this tmp file around. You'll
need to account for that with your build command.

The easiest way is probably a flag to tell clang to not write it. If that
doesn't exist, you can try removing it after the command runs (rm -f
*.o.tmp in shell, but I don't know a good cross platform command that
operates silently if the file is missing).

If neither of those works, then more information about what you want to do
would be useful.

Hope that helps!
Erik

On Sat, Aug 11, 2018, 01:47 <[email protected]> wrote:

> I'm excited to use tup for a new project but I'm having trouble getting it
> to work in a simple situation on Windows.  I'm trying to compile a single
> "hello world" C file with clang and there seems to be a problem with tup
> not understanding some of clang's temporary files.
>
> Here's the C file:
>
> #include <stdio.h>
>
> int main(int argc, char** argv) {
>     printf("hello\n");
>     return 0;
> }
>
>
> Here's the Tupfile:
>
> : main.c |> clang -c %f -o %o |> main.o
> : main.o |> clang -o %o %f |> main.exe
>
>
> Here's the output:
>
>
> * 1) clang -c main.c -o main.o
>  *** tup errors ***
> tup error: File 'C:\test\main-645c19a0.o.tmp' was written to, but is not
> in .tup/db. You probably should specify it as an output
>  -- Delete: C:\test\main-645c19a0.o.tmp
> tup error: Expected to write to file 'main.o' from cmd 20 but didn't
>  *** Command failed due to errors processing the output dependencies.
>  [  ]  50%
>  *** tup: 1 job failed.
>
>
> However, there is a main.o file in the directory after tup exits.  I've
> tried running the commands on the command line and they work okay.  I've
> observed the issue when using both 32 bit and 64 bit clang.  This is all
> on tup v0.7.6-33-g221ae9a on Windows 10.  Everything works fine on a unix
> based system.  Any help or workarounds would be appreciated!
>
> --
> --
> tup-users mailing list
> email: [email protected]
> unsubscribe: [email protected]
> options: http://groups.google.com/group/tup-users?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "tup-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
tup-users mailing list
email: [email protected]
unsubscribe: [email protected]
options: http://groups.google.com/group/tup-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"tup-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to