Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion support/setup_codes.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import os.path
import datetime
import stat
from copy import deepcopy
from os.path import abspath

from . import supportrc

Expand Down Expand Up @@ -847,11 +849,17 @@ def run_make_on_directory(self, codename, directory, target, environment):
output.write('\n')
output.flush()

if environment.get('AMUSE_USE_CCACHE', 0) != "1" or "CCACHE_BASEDIR" in environment:
build_environment = environment
else:
build_environment = deepcopy(environment)
build_environment["CCACHE_BASEDIR"] = abspath(directory)

with open(buildlog, "ab") as output:
result, resultcontent = self.call(
['make','-C', directory, target],
output,
env = environment
env = build_environment
)

with open(buildlog, "a") as output:
Expand Down