depot_tools는 git, gn, python, ninja 등 빌드에 필요한 도구들의 집합이다.

gclient

gclient는 여러 원격 저장소들로부터 소스코드의 modular checkout을 관리하는 도구이다.
gclient는 distributing tree updates, status command, 그리고 체크아웃된 working directroy들에서의 변경사항 기능을 제공하기 위한 소스코드 관리 명령어를 제공한다.

gclient script는 여러 저장소로부터 받은 소스코드들이 있는 최상위 디렉토리에 존재하는 .gclient 파일에 의해 제어된다.
이 파일은 list 형태의 solutions이 정의된 Python script이다.

    solutions = [
      { "name"        : "src",
        "url"         : "svn://svnserver/component/trunk/src",
        "custom_deps" : {
          # To use the trunk of a component instead of what's in DEPS:
          #"component": "https://svnserver/component/trunk/",
          # To exclude a component from your working copy:
          #"data/really_large_component": None,
        }
      },
    ]

solution이란 하나의 디렉토리에 체크아웃되어 같이 빌드될 software의 component 조각들의 모음(collection)이다.

solution 리스트의 각 entry는 다음과 같은 Python dictionary 형태로 정의된다.

  • name solution이 체크아웃되어 저장될 디렉토리 이름
  • url solution은 이 URL로부터 체크아웃된다. gclient는 checked-out solution은 DEPS라는 이름의 파일을 가질 것이라고 예상한다.
    DEPS 파일은 현재 개발중인 소프트웨어의 solution을 빌드하기 위한 working directory를 생성하기 위해 체크아웃 되어야 하는 piece들을 명시한다.

references

Comments