[ccache] Some Modification about CCACHE_BASEDIR
joel at rosdahl.net
Wed Apr 6 13:59:48 MDT 2011
On 2011-04-06 04:46, xiaoxiao wrote:
> After anaylsing the code of ccache, we find that if we set the
> environment variable of CCACHE_BASEDIR, ccache will translate the paths
> to the relative ones. However, if multiple users are developing in one
> machine, maintain the value of the variable could be a burden for them.
Just so I understand your use case: In what way is it a burden?
> Thus, I did some modification to the code, in order to get the base dir
> dynamically, I add another enviroment variable. Once this variable is
> set, the ccache would fetch the working directory, the value of PWD, as
> the base dir. After this modification, the problem I mentioned above
> seems to be settled.
I think that it would be better to make ccache understand variable
references in the existing CCACHE_BASEDIR variable so that you can set
it to '$PWD' and it will work as expected.
I'm currently working on introducing a configuration file for ccache,
and I'm actually planning to make such variable expansions for all
variables (both in the configuration file and in the environment) that
specify paths (CCACHE_DIR, CCACHE_BASEDIR, etc). So in ccache 3.2, you
will be able to do what you want. Please stay tuned!
More information about the ccache