On 09/25/2014 12:21 PM, Laurence McGlashan wrote:
> How do I get tup to recognise this file as an output?

If in your case this line:

: foreach *.cpp |> bear -- clang++ -g -O0 -Wall -std=c++11 -c %f -o %o |> %B.o

produces two outputs - main.o and your_another_file.json, then you need to rework it like this:

: foreach *.cpp |> bear -- clang++ -g -O0 -Wall -std=c++11 -c %f -o %o |> %B.o | your_another_file.json

If this created file's name has any relationship to the input or output file name, you could use some of %-flags.

If your command creates only ONE output file - compile_commands.json - then you just need to state that instead of your current %B.o.

If you have multiple sources and each call to 'bear' appends to your compile_commands.json file, then this will not work in tup - each tup's command must create a new, unique file, so your only option in that case would be to create unique %B.json files, and finally concatenate them in a single one.

Regards,
FCh

--
--
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