Exemple #1
0
    def __fetch_includes(self, target_name, in_filename, include_dirs, compiler_flags):
        ui.debug("getting includes for " + in_filename)

        with ui.ident:
            cache_file = self.cache_directory(target_name) + in_filename + ".includes"
            includes = None
            if os.path.exists(cache_file) and fsutils.is_newer_than(cache_file, in_filename):
                includes = marshal.load(open(cache_file, "rb"))
            else:
                fsutils.mkdir_recursive(os.path.dirname(cache_file));
                includes = self.__scan_includes(in_filename, include_dirs, compiler_flags)
                marshal.dump(includes, open(cache_file, "wb"))

        return includes
Exemple #2
0
    def __fetch_includes(self, target_name, in_filename, include_dirs,
                         compiler_flags):
        ui.debug("getting includes for " + in_filename)

        with ui.ident:
            cache_file = self.cache_directory(
                target_name) + in_filename + ".includes"
            includes = None
            if os.path.exists(cache_file) and fsutils.is_newer_than(
                    cache_file, in_filename):
                includes = marshal.load(open(cache_file, "rb"))
            else:
                fsutils.mkdir_recursive(os.path.dirname(cache_file))
                includes = self.__scan_includes(in_filename, include_dirs,
                                                compiler_flags)
                marshal.dump(includes, open(cache_file, "wb"))

        return includes
Exemple #3
0
 def is_newer_than_target(filename):
     if os.path.exists(filename):
         # TODO: proper appname
         return fsutils.is_newer_than(filename, target)
Exemple #4
0
 def is_newer_than_target(filename):
     if os.path.exists(filename):
         # TODO: proper appname
         return fsutils.is_newer_than(filename, target)