diff options
author | Karel Kočí <cynerd@email.cz> | 2015-08-17 16:25:11 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2015-08-17 16:25:11 +0200 |
commit | 256fe819eeaf93d7882f6b93372f6e2254beab13 (patch) | |
tree | 8927f8d456bfea8a21921f1aba17bb0b95ea8d9a | |
parent | 4a1e2cd1ce5ce44fdf4461e0ea51f4f362b23256 (diff) | |
download | linux-conf-perf-256fe819eeaf93d7882f6b93372f6e2254beab13.tar.gz linux-conf-perf-256fe819eeaf93d7882f6b93372f6e2254beab13.tar.bz2 linux-conf-perf-256fe819eeaf93d7882f6b93372f6e2254beab13.zip |
Fix relative path to .target file
.target file should load always from root folder of project to ensure,
that all tools in project are targeting same target.
-rw-r--r-- | conf.py | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -127,12 +127,15 @@ picosat = 'scripts/picosat-959/picosat' allconfig = 'scripts/allconfig/allconfig' ####################################### +absroot = os.path.dirname(os.path.realpath(__file__)) + +####################################### # Overlap configuration for specified target -if os.path.isfile('.target'): +if os.path.isfile(os.path.join(absroot, '.target')): target = None - with open('.target', 'r') as f: + with open(os.path.join(absroot, '.target'), 'r') as f: target = f.readline().rstrip() - conffile = os.path.join('targets', target, 'conf.py') + conffile = os.path.join(absroot, 'targets', target, 'conf.py') if os.path.isfile(conffile): ovconf = importlib.machinery.SourceFileLoader("module.name", conffile).load_module() for name in dir(ovconf): @@ -142,6 +145,3 @@ if os.path.isfile('.target'): print("W: No target specifier. Write target to .target file.") else: print("W: No target specifier. Write target to .target file.") - -####################################### -absroot = os.path.dirname(os.path.realpath(__file__)) |