0d8efe3535b3ce9ecbc2c6482007edfc3ac492d0Dave Reisner "make", "-s", "print-%s" % varname]).decode().split()
0d8efe3535b3ce9ecbc2c6482007edfc3ac492d0Dave Reisner return list(itertools.chain.from_iterable(lists))
328b5bc96e452b67ae2eb3dee3a09ff3ce03f662Dave Reisner return os.path.dirname(os.path.abspath(__file__))
328b5bc96e452b67ae2eb3dee3a09ff3ce03f662Dave Reisnerdef MakeRelativePathsInFlagsAbsolute(flags, working_directory):
328b5bc96e452b67ae2eb3dee3a09ff3ce03f662Dave Reisner path_flags = [ '-isystem', '-I', '-iquote', '--sysroot=' ]
328b5bc96e452b67ae2eb3dee3a09ff3ce03f662Dave Reisner new_flag = os.path.join(working_directory, flag)
328b5bc96e452b67ae2eb3dee3a09ff3ce03f662Dave Reisner new_flag = path_flag + os.path.join(working_directory, path)
0d8efe3535b3ce9ecbc2c6482007edfc3ac492d0Dave Reisner 'flags': MakeRelativePathsInFlagsAbsolute(flags, relative_to),
0d8efe3535b3ce9ecbc2c6482007edfc3ac492d0Dave Reisner 'AM_CPPFLAGS',
0d8efe3535b3ce9ecbc2c6482007edfc3ac492d0Dave Reisner 'AM_CFLAGS',
0d8efe3535b3ce9ecbc2c6482007edfc3ac492d0Dave Reisner# these flags cause crashes in libclang, so remove them
0d8efe3535b3ce9ecbc2c6482007edfc3ac492d0Dave Reisner# vim: set et ts=2 sw=2: