# Path: dependency/SyntaxTag.py
# class TagVector(object):
# class TagScalar(object):
# class TagINCLUDE(TagVector):
# class TagCPPFLAGS(TagVector):
# class TagCFLAGS(TagVector):
# class TagCXXFLAGS(TagVector):
# class TagLDFLAGS(TagVector):
# class TagInclude(TagVector):
# class TagCppFlags(TagVector):
# class TagCxxFlags(TagVector):
# class TagCFlags(TagVector):
# class TagLDFlags(TagVector):
# class TagProtoFlags(TagVector):
# class TagLibs(TagVector):
# class TagSources(TagVector):
# class TagUTArgs(TagVector):
#     def __init__(self):
#     def __str__(self):
#     def AddV(self, v):
#     def AddVs(self, vs):
#     def AddSV(self, v):
#     def AddSVs(self, vs):
#     def V(self):
#     def __add__(self, other):
#     def __sub__(self, other):
#     def __init__(self):
#     def __str__(self):
#     def SetV(self, v):
#     def V(self):
#     def __init__(self):
#     def __init__(self):
#     def __init__(self):
#     def __init__(self):
#     def __init__(self):
#     def __init__(self):
#     def __init__(self):
#     def __init__(self):
#     def __init__(self):
#     def __init__(self):
#     def __init__(self):
#     def __init__(self):
#     def __init__(self):
#     def __init__(self):
# 
# Path: dependency/Builder.py
# class Builder(object):
#     """
#     base class for splicing the compile command
#     """
#     def __init__(self, obj, compiler, workspace):
#         """
#         init function
#         Args:
#             obj : the cvs path of object file
#             compiler : the path of compiler
#             workspace : the workspace path
#         """
#         self.obj = obj
#         self.obj_dir = os.path.dirname(obj)
#         self.compiler = compiler
#         self.workspace = workspace
#         self.build_cmd = None      # build cmd
#         self.error = "OK"
# 
#     def __str__(self):
#         """
#         """
#         return self.build_cmd
#     
#     def GetBuildCmd(self):
#         """
#         return the build cmd
#         """
#         return self.build_cmd
# 
#     def Error(self):
#         """
#         return the error message
#         """
#         return self.error


import os
import sys
import copy
from dependency import SyntaxTag
from dependency import Builder
        cvs_dir = os.path.dirname(self.infile)
        root, _ = os.path.splitext(os.path.basename(self.infile))
        obj_file = os.path.join(cvs_dir,
                                "%s_%s_%s.o" % (self.target.TYPE, self.target.Name(), root))
        if not obj_file.startswith('broc_out'):
            self.outfile = os.path.join("broc_out", obj_file)
        else:
            self.outfile = obj_file

    def Action(self):
        """
        parser compile flags including include path, preprocess flags, 
        c compile flags and cxx compile flags
        """
        incpaths_flag = False
        cppflags_flag = False
        cflags_flag = False
        cxxflags_flag = False
        # parse all args and take arg as local flag
        for args in self.args:
            for arg in args:
                if isinstance(arg, SyntaxTag.TagInclude):
                    incpaths_flag = True
                    self.includes.extend(arg.V())
                elif isinstance(arg, SyntaxTag.TagCppFlags):
                    cppflags_flag = True 
                    self.cppflags.extend(arg.V())
                elif isinstance(arg, SyntaxTag.TagCFlags):
                    cflags_flag = True 
                    self.cflags.extend(arg.V())

# Path: dependency/SyntaxTag.py
# class TagVector(object):
# class TagScalar(object):
# class TagINCLUDE(TagVector):
# class TagCPPFLAGS(TagVector):
# class TagCFLAGS(TagVector):
# class TagCXXFLAGS(TagVector):
# class TagLDFLAGS(TagVector):
# class TagInclude(TagVector):
# class TagCppFlags(TagVector):
# class TagCxxFlags(TagVector):
# class TagCFlags(TagVector):
# class TagLDFlags(TagVector):
# class TagProtoFlags(TagVector):
# class TagLibs(TagVector):
# class TagSources(TagVector):
# class TagUTArgs(TagVector):
#     def __init__(self):
#     def __str__(self):
#     def AddV(self, v):
#     def AddVs(self, vs):
#     def AddSV(self, v):
#     def AddSVs(self, vs):
#     def V(self):
#     def __add__(self, other):
#     def __sub__(self, other):
#     def __init__(self):
#     def __str__(self):
#     def SetV(self, v):
#     def V(self):
#     def __init__(self):
#     def __init__(self):
#     def __init__(self):
#     def __init__(self):
#     def __init__(self):
#     def __init__(self):
#     def __init__(self):
#     def __init__(self):
#     def __init__(self):
#     def __init__(self):
#     def __init__(self):
#     def __init__(self):
#     def __init__(self):
#     def __init__(self):
# 
# Path: dependency/Builder.py
# class Builder(object):
#     """
#     base class for splicing the compile command
#     """
#     def __init__(self, obj, compiler, workspace):
#         """
#         init function
#         Args:
#             obj : the cvs path of object file
#             compiler : the path of compiler
#             workspace : the workspace path
#         """
#         self.obj = obj
#         self.obj_dir = os.path.dirname(obj)
#         self.compiler = compiler
#         self.workspace = workspace
#         self.build_cmd = None      # build cmd
#         self.error = "OK"
# 
#     def __str__(self):
#         """
#         """
#         return self.build_cmd
#     
#     def GetBuildCmd(self):
#         """
#         return the build cmd
#         """
#         return self.build_cmd
# 
#     def Error(self):
#         """
#         return the error message
#         """
#         return self.error


# Path: dependency/Source.py
import os
import sys
import copy
from dependency import SyntaxTag
from dependency import Builder

        cvs_dir = os.path.dirname(self.infile)
        root, _ = os.path.splitext(os.path.basename(self.infile))
        obj_file = os.path.join(cvs_dir,
                                "%s_%s_%s.o" % (self.target.TYPE, self.target.Name(), root))
        if not obj_file.startswith('broc_out'):
            self.outfile = os.path.join("broc_out", obj_file)
        else:
            self.outfile = obj_file

    def Action(self):
        """
        parser compile flags including include path, preprocess flags, 
        c compile flags and cxx compile flags
        """
        incpaths_flag = False
        cppflags_flag = False
        cflags_flag = False
        cxxflags_flag = False
        # parse all args and take arg as local flag
        for args in self.args:
            for arg in args:
                if isinstance(arg, SyntaxTag.TagInclude):
                    incpaths_flag = True
                    self.includes.extend(arg.V())
                elif isinstance(arg, SyntaxTag.TagCppFlags):
                    cppflags_flag = True 
                    self.cppflags.extend(arg.V())
                elif isinstance(arg, SyntaxTag.TagCFlags):
                    cflags_flag = True 
                    self.cflags.extend(arg.V())

                elif isinstance(arg, SyntaxTag.TagCxxFlags):