code: def lib(names, sources=[], requirements=[], default_build=[], usage_requirements=[]):
      
      assert is_iterable_typed(names, basestring)
      assert is_iterable_typed(sources, basestring)
      assert is_iterable_typed(requirements, basestring)
      assert is_iterable_typed(default_build, basestring)
      assert is_iterable_typed(usage_requirements, basestring)
      if len(names) > 1:
          if any(r.startswith('<name>') for r in requirements):
              get_manager().errors()("When several names are given to the 'lib' rule\n" +
                                     "it is not allowed to specify the <name> feature.")
  
          if sources:
              get_manager().errors()("When several names are given to the 'lib' rule\n" +
                                     "it is not allowed to specify sources.")
  
      project = get_manager().projects().current()
      result = []
  
      for name in names:
          r = requirements[:]
  
          # Support " lib a ; " and " lib a b c ; " syntax.
          if not sources and not any(r.startswith("<name>") for r in requirements) \
             and not any(r.startswith("<file") for r in requirements):
              r.append("<name>" + name)
  
          result.append(targets.create_typed_metatarget(name, "LIB", sources,
                                                        r,
                                                        default_build,
                                                        usage_requirements))
      return result
docs: The implementation of the 'lib' rule. Beyond standard syntax that rule allows
      simplified: 'lib a b c ;'.