On Tue, Oct 23, 2018 at 9:22 PM sateesh vandavasi < [email protected]> wrote:
> What is rule syntax for creating a new directory and keep all object files > under obj-host. > > Sample tupfile: > > : |> mkdir -p obj-host |> obj-host > : | obj-host |> touch obj-host/1.out |> obj-host/1.out > > > tup error: Unable to output to a different directory because > 'binos/contrib/luajit/obj-host' is a generated file > * 0) [0.001s] binos/contrib/luajit > tup error: Failed to find directory ID for dir 'obj-host/1.out' relative > to 'binos/contrib/luajit' > tup error: Error parsing Tupfile line 4 > Line was: ': | obj-host |> touch obj-host/1.out |> obj-host/1.out' > [ ] 100% > > Hi Sateesh, You can just skip the rule for generating the directory, since output directories will be generated automatically: : |> touch obj-host/1.out |> obj-host/1.out $ tup [ tup ] [0.031s] Executing Commands... 0) [0.003s] touch obj-host/1.out And then if you remove the last rule that outputs in a generated directory, the directory is removed: $ rm Tupfile $ tup [ tup ] [0.021s] Deleting 1 command... 0) rm: obj-host/1.out (Both obj-host/1.out and obj-host are removed) Another option is to not create the outputs in other directories, and use a variant if you want outputs in a build tree that mirrors the source tree. -Mike -- -- 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.
