Exemplo n.º 1
0
 def Action(self):
     """
     """
     Target.Action(self)
     self.builder = Builder.LibBuilder(self.outfile,
                                       self.objects, self.libs, 'ar',
                                       self.env.Workspace())
Exemplo n.º 2
0
    def test_LibBiilder(self):
        """
        test LibBuilder
        """
        obj = 'broc_out/a/b/c/test'
        dep_objs = ['a/b/c/fun.o', 'a/b/c/util.o']
        dep_libs = [
            'broc_out/a/b/d/output/lib/libfun.a',
            'broc_out/a/b/d/output/lib/libutil.a'
        ]
        compiler = 'ar'
        right_cmd = "mkdir -p broc_out/a/b/c && ar \\\n\trcs \\\n\tbroc_out/a/b/c/test \
\\\n\ta/b/c/fun.o \\\n\ta/b/c/util.o \\\n\tbroc_out/a/b/d/output/lib/libfun.a \
\\\n\tbroc_out/a/b/d/output/lib/libutil.a"

        builder = Builder.LibBuilder(obj, dep_objs, dep_libs, compiler, '.')

        self.assertEqual(right_cmd, builder.GetBuildCmd())