[libclc] 38/92: configure: Fix handling of directories with compats only source lists

Andreas Boll aboll-guest at moszumanska.debian.org
Mon Nov 6 15:11:58 UTC 2017


This is an automated email from the git hooks/post-receive script.

aboll-guest pushed a commit to branch master
in repository libclc.

commit 8043f28d125250c1b97e7291966e091f31fa845f
Author: Jan Vesely <jan.vesely at rutgers.edu>
Date:   Thu Oct 5 20:16:28 2017 +0000

    configure: Fix handling of directories with compats only source lists
    
    Reviewer: Jeroen Ketema
    Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
    
    git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@315018 91177308-0d34-0410-b5e6-96231b3b80d8
---
 configure.py | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/configure.py b/configure.py
index 00d1ecb..26ac3d5 100755
--- a/configure.py
+++ b/configure.py
@@ -185,7 +185,8 @@ for target in targets:
 
   incdirs = filter(os.path.isdir,
                [os.path.join(srcdir, subdir, 'include') for subdir in subdirs])
-  libdirs = filter(lambda d: os.path.isfile(os.path.join(d, 'SOURCES')),
+  libdirs = filter(lambda d: os.path.isfile(os.path.join(d, 'SOURCES')) or
+                             os.path.isfile(os.path.join(d, 'SOURCES_' + llvm_string_version)),
                    [os.path.join(srcdir, subdir, 'lib') for subdir in subdirs])
 
   # The above are iterables in python3 but we might use them multiple times
@@ -218,7 +219,8 @@ for target in targets:
 
     for libdir in libdirs:
       subdir_list_file = os.path.join(libdir, 'SOURCES')
-      manifest_deps.add(subdir_list_file)
+      if os.path.exists(subdir_list_file):
+        manifest_deps.add(subdir_list_file)
       override_list_file = os.path.join(libdir, 'OVERRIDES')
       compat_list_file = os.path.join(libdir,
         'SOURCES_' + llvm_string_version)
@@ -227,6 +229,7 @@ for target in targets:
 
       # Build compat list
       if os.path.exists(compat_list_file):
+        manifest_deps.add(compat_list_file)
         for compat in open(compat_list_file).readlines():
           compat = compat.rstrip()
           compats.append(compat)
@@ -243,7 +246,8 @@ for target in targets:
           override = override.rstrip()
           sources_seen.add(override)
 
-      for src in open(subdir_list_file).readlines() + compats:
+      files = open(subdir_list_file).readlines() if os.path.exists(subdir_list_file) else []
+      for src in files + compats:
         src = src.rstrip()
         if src not in sources_seen:
           sources_seen.add(src)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/libclc.git



More information about the Pkg-opencl-commits mailing list