# 5. Conf를 통한 Build 단순화

지금까지 EDKII를 이용하여 빌드를 진행할 때 특정 모듈과 플랫폼을 지정하여 빌드를 진행했다.

<pre><code>$ . edk2setup.sh
$ build --platform=UefiLessonsPkg/UefiLessonsPkg.dsc \
        --module=UefiLessonsPkg/HelloWorld/HelloWorld.inf \
<strong>        --arch=X64 \
</strong>        --buildtarget=RELEASE \
        --tagname=GCC5
</code></pre>

이 때 `. edk2setup.sh` 스크립트를 실행할 때 `Conf/target.txt` 가 자동 생성되어진다.\
해당 파일의 주석을 제외하고 대상에 대한 정보를 살펴보면 다음과 같다.

```
ACTIVE_PLATFORM       = OvmfPkg/OvmfPkgX64.dsc
TARGET                = DEBUG
TARGET_ARCH           = X64
TOOL_CHAIN_CONF       = Conf/tools_def.txt
TOOL_CHAIN_TAG        = GCC5
BUILD_RULE_CONF = Conf/build_rule.txt
```

위 정보를 원하는 빌드 대상으로 지정한 뒤에는 단일 명령어로도 빌드를 진행할 수 있다.

```
$ vi Conf/target.txt
-----
ACTIVE_PLATFORM       = UefiLessonsPkg/UefiLessonsPkg.dsc
TARGET                = RELEASE
TARGET_ARCH           = X64
TOOL_CHAIN_CONF       = Conf/tools_def.txt
TOOL_CHAIN_TAG        = GCC5
BUILD_RULE_CONF = Conf/build_rule.txt

$ build
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bob-mcd-team.gitbook.io/uefi/uefi-development/uefi-start/5.conf-build.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
