コード例 #1
0
ファイル: compiler.py プロジェクト: podusowski/pake
    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
コード例 #2
0
ファイル: compiler.py プロジェクト: Quasek/pake
    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
コード例 #3
0
ファイル: compiler.py プロジェクト: Quasek/pake
 def is_newer_than_target(filename):
     if os.path.exists(filename):
         # TODO: proper appname
         return fsutils.is_newer_than(filename, target)
コード例 #4
0
ファイル: compiler.py プロジェクト: podusowski/pake
 def is_newer_than_target(filename):
     if os.path.exists(filename):
         # TODO: proper appname
         return fsutils.is_newer_than(filename, target)