First, let me say that I'm a new tup user and I've been adding tup support 
to a large project (10M LOC in about 20 languages, 3300 directories, GNU 
auto tools or Cmake) and I'm thoroughly impressed with how easy it's been. 
Thanks!

Our configuration management system brings versions or configurations of 
tools (inc. compilers) into scope by adjusting PATH, MANPATH, etc. If we 
have multiple variants, perhaps many dozens during portability testing, how 
do we cause tup to export one PATH in one variant and another PATH in 
another variant (similar for other variables) so that each variant sees the 
correct versions of tools based on its PATH?

I could add a CONFIG_PATH=desired:path:foo:bar to the tup.config and then 
change *all* the rules by inserting the variable settings at the font like 
this:

    |> export PATH="@{PATH}"; original_script |>

But that seems error prone in a large project with many developers. Plus it 
doesn't change the fact that tup will still try to rerun commands if tup's 
PATH changes.

I could also tell all the developers to use --no-environ-check, but that 
would affect all environment variables, including some that we might want 
to export through tup. What I need is some finer granularity of control and 
in a way that doesn't put a burden on other developers that might need to 
write an occassional :-rule.

Assuming there's not an easy way to accomplish what we need, I have a 
feature request...

Feature request: Allow the "export" command to take an optional second 
parameter. If a second parameter is present, then export (and save in the 
database) the variable with that value rather than the value from tup's 
environment. Examples:
        export PAGER cat
        export PATH @{PATH}

Variation: instead of two parameters, use an '=' like in the shell:
        export PAGER=cat
        export PATH=@{PATH}
which allows empty values not possible in the first variation:
        export PAGER=         // exports an empty value
        export PAGER          // exports value from tup's environ

Thanks for a wonderful tool.

--Robb

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