Whatever happened to the explicit variants? The repo is still on v0.7.11.111 and not yet on v0.8, so I assume explicit variants are not merged yet?
Would explicit variants also help with creating a single build directory in the project root and putting the variants inside that directory? I'm not happy with the way *tup* clutters my project directory with directories for every build variant. I'm building for 10 different platforms and the number of output directories tup creates is really significant here. I would much rather have them all stuffed into a single build directory with respective variant directories in there. Thanks for any hints, -Guido On Monday, May 17, 2021 at 11:34:13 AM UTC-7 Mike Shal wrote: > On Sat, May 1, 2021 at 11:07 AM Mike Shal <[email protected]> wrote: > >> Hi all, >> >> A while back (2015!) the explicit-variant branch was published to test >> moving away from the model of variants using the FUSE filesystem overlay, >> to one where your Tupfiles need to be aware of variants in order to use >> them. Although it requires a bit more work to use variants in your project, >> it has several benefits: >> >> 1) Explicit variants work on Windows ( >> https://github.com/gittup/tup/issues/70 and >> https://github.com/gittup/tup/issues/334) >> >> 2) Paths stored in generated files with overlay variants can break >> external tools (eg: https://github.com/gittup/tup/issues/229). With >> explicit variants, tup isn't lying to other tools about paths. >> >> The main downside is that your Tupfiles may need to be updated to be >> aware of variants. With overlay variants, this was mostly transparent >> (outside of !tup_preserve), but with explicit variants, you may need to >> point things to the build directory, which is referenced by >> $(TUP_VARIANTDIR). >> >> For example, generating a header file and including it in a C file like >> so: >> >> : |> echo '#define FOO 3' > %o |> foo.h >> : foreach *.c | foo.h |> gcc -c %f -o %o |> %B.o >> >> would need to be updated to add -I$(TUP_VARIANTDIR) in order for gcc to >> find the generated header file: >> >> : |> echo '#define FOO 3' > %o |> foo.h >> : foreach *.c | foo.h |> gcc -I$(TUP_VARIANTDIR) -c %f -o %o |> %B.o >> >> With explicit variants, the subprocess runs in the src directory, and %o >> is a relative path pointing to the build directory (something like >> ../build/src/foo.o) >> >> I have an updated explicit-variant2 branch available: >> https://github.com/gittup/tup/tree/explicit-variant2 >> With a Windows test binary: >> http://gittup.org/tup/win32/tup-explicit-variant-v0.7.10-52-g6b2c469e.zip >> >> I'm planning to merge this in 2 weeks time. If you use variants in your >> project, any testing you could do before then would be appreciated. If you >> have difficulty figuring out how to update your Tupfiles, feel free to >> contact either the mailing list or me privately. >> >> > Explicit variants are now merged into master. If you are using variants in > your project, I recommend sticking with v0.7.11 until you have some time to > update your Tupfiles to be compatible with explicit variants. Write to the > mailing list with a small example if you are having issues converting > things. > > If you aren't using variants, upgrading to the latest master branch is > hopefully uneventful. > > 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/tup-users/28226fde-b905-4f37-9ffb-1f351bd0551en%40googlegroups.com.
