[ccache] Single 'source' collection, multiple targets

2012-11-09 Thread Mathias De Maré

Hello,

I've set up ccache for our builds and it seems to be working fine. Now, 
we have a bit of a special setup, and I believe things could be even better.


Our directory structure is (simplified):

src/
output/
  target1
  target2
  ...

During compilation, the current working directory is 'src', and the 
objects (depending on the target being built) end up in output/targetX.


There is a lot of overlap between some of the targets (some builds are 
done for the same processors); but they build entirely separate (so you 
build all of the objects for target1 and all of the objects for target2).
Ideally, the makefile structure would be improved to take advantage of 
the overlap, but this is a very complex and time-consuming job.


Ccache is used right now, but there is no overlap between the targets.
What I would like to do is to be able to share ccache objects between 
the different targets.

This doesn't work, because the generated dependency files look like this:
 ../output/target1/somefile.o:
  (lots of files in src)

The dependency file contains the directory of the target. As a result, 
it's impossible to get any overlap between different targets.
I've tried to use CCACHE_BASEDIR to modify the path, but that only makes 
it relative to the current working directory (which it already is).


Is there any other way to achieve the desired effect?

Modifying the current working directory is not an option: the '__FILE__' 
now converts to a clean path. If I change the working directory to 
output/targetX, this will no longer be the case.


Greetings,
Mathias
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] [PATCH] Use bash for test.sh.

2012-11-09 Thread Eitan Adler
On 10 November 2012 00:41, Mike Frysinger vap...@gentoo.org wrote:
 ironic considering you're espousing a change to support crap systems that
 aren't relevant.

I won't comment on this.

 if the script is written in bash and is intended to be, then
 /bin/bash is the correct answer.

Absolutely false. /usr/local/bin or /opt/bin might be the correct location.

 if the script is intended to be POSIX shell,
 then /bin/sh is the correct answer.

Agreed.

 using env is just stupid.

only if you don't care about portability.

POSIX  env  absolute path


-- 
Eitan Adler
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] [PATCH] Use bash for test.sh.

2012-11-09 Thread Mike Frysinger
On Monday 05 November 2012 12:55:10 Andrew Stubbs wrote:
 The test script fails with shells other than bash. At least dash
 doesn't work.

could you post the exact errors you see ?  i see old style portable code in 
there that could easily be modernized to recent POSIX and plenty of quoting 
issues, but i don't see anything off hand that wouldn't work in a POSIX 
compliant shell.
-mike


signature.asc
Description: This is a digitally signed message part.
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache