Hi all, For those who use variants, and/or are interested in variants in Windows, can you give the 'explicit-variant' branch on github a try?
Some background: The way variants were implemented has been a pain, because of the way it relied on the dependency checker to overlay the output directory with the source directory. This worked well with FUSE, but it's a pain to do in Windows and is preventing us from switching to LD_PRELOAD for OSX to avoid FUSE there. The reason for the overlay was so that you wouldn't have to make any changes to your Tupfiles in order to support variants - if it worked as an in-tree build, it would work as a variant. However, if we relax that condition, then all of the requirements on the dependency checker go away. The downside is you may need to give tup hints when things need to be found in the source directory. For example, if you previously had a Tupfile like so: sub/Tupfile: : foreach *.c |> gcc -c %f -o %o -Iinclude |> %B.o When gcc goes to open files in the 'include' directory, tup would use the overlay to pull files from the source directory. Now however, the '-Iinclude' only corresponds to the directory inside the variant. To tell tup that this is really in the source directory, use $(TUP_SRCDIR) - : foreach *.c |> gcc -c %f -o %o -I$(TUP_SRCDIR)/include |> %B.o This evaluates to a path like '../sub' inside a variant, or just '.' if no variants are used. Anything expanded with %-flags should work out of the box because tup knows if the file is a normal file (in the source directory), or a generated file (in the variant directory). So I'm curious if just peppering $(TUP_SRCDIR) in the right places is sufficient to get this style of variants working in your setup. I'm sure there are still bugs or other cases I'm not considering, but most of the tests seem to work so far with fairly minimal changes. I don't know how that will scale to a live setup, though. Please let me know! Thanks, -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.
