12.6.3.1 최상위 구조(Structure of the top-level)

12.6.3.1 최상위 구조(Structure of the top-level)

최상위 노드는 <xml> 노드 안에 살며 다음이 될 수 있습니다:

  • set - "define"(일반 변수인)을 설정합니다.
<set name="name" value="1" />
  • setenv - hxcpp define과 자식 프로세스를 위한 환경 변수를 설정합니다.
<setenv name="name" value="1" />
  • unset - define을 해제합니다. if="name"은 더 이상 참이 아닙니다.
<unset name="name" />
  • setup - 내부적으로 SDK 등을 찾기 위한 커스텀 설정 코드를 호출하는 데 사용됩니다.
<setup name="androidNdk|blackberry|msvc|pdbserver|mingw|emscripten|nvcc" />
  • echo - 값을 콘솔에 출력합니다. 디버깅에 좋습니다.
<echo value="text" />
  • error - 값을 콘솔에 출력하고 오류를 강제합니다. 전제 조건을 확인하는 데 좋습니다.
<error value="error message" />
  • pleaseUpdateHxcppTool - git 버전을 업데이트하는 사람들에게 빌드 도구를 다시 컴파일해야 한다고 알리는 데 사용됩니다.
<pleaseUpdateHxcppTool version="1" />
  • path - exe 검색 경로에 디렉토리를 추가합니다.
<path name="directory_to_add" />
  • mkdir - 디렉토리를 만듭니다.
<mkdir name="directory" />
  • section - 요소 블록을 그룹화합니다 - 보통 모두 같은 if/unless 조건을 존중하는 것들.
<section name="id" />...
  • copy - 노드가 파싱될 때 파일을 복사합니다.
<copy to="destination" from="src" />
  • import/include - 다른 파일에서 XML을 읽습니다. import는 새 파일로 상대 기준(relative base)을 재설정하고, include는 그렇지 않습니다.
    • noerror - true일 때 파일이 없어도 허용합니다. (선택)
    • section - XML 파일에서 명명된 섹션만 읽습니다. hxcpp_config.xml에서 사용됩니다. (선택)
<import name="filename" section="filter" noerror="true" />
<include name="filename" section="filter" noerror="true" />
  • pragma - 여러 include 문이 있어도 빌드 파일을 한 번만 포함합니다.
<pragma once="true" />
  • nvccflag - 모든 nvcc 컴파일에 플래그를 추가합니다.
<nvccflag name="?name" value="-IincludePath" />
  • nvcclinkflag - nvcc 코드로 링크할 때 플래그를 추가합니다.
<nvcclinkflag name="?name" value="-arch=sm_30" />
  • files - 파일 그룹을 정의하고 기본 tags를 설정합니다.
    • dir - 그룹의 파일 이름이 상대적인 디렉토리.
    • tags - 쉼표로 구분된 tags 목록.
<files dir="dir" name="name" tags="tag1,tag2,tag3" >...</files>
  • target - 타깃을 정의하고 그 toolid(링크 모드)와 출력 이름을 설정합니다.
<target name="name" overwrite="true" append="true" tool="linker" toolid="${haxelink}" output="filename">...</target>
  • copyFile - 주어진 toolId가 실행된 후 파일을 타깃 출력 디렉토리로 복사합니다.
<copyFile name="destination" from="src" allowMissing="true" overwrite="true" toolId="filter" />
  • magiclib - DLL을 객체 파일로 대체하는 데 내부적으로 사용됩니다.
<magiclib name="libname" replace="old dll" />
  • compiler - 컴파일러를 정의합니다. 1개의 컴파일러만 활성이라고 가정합니다.
    • replace - true일 때 컴파일러가 재정의되고, 그렇지 않으면 이 노드의 내용이 같은 id를 가진 기존 컴파일러에 추가됩니다. (선택)
    • exe - 정의의 본문에서 재정의될 수 있습니다.
<compiler id="id" exe="command" replace="true">...</compiler>
  • stripper - gcc 실행 파일에서 릴리스용 디버그 정보를 제거하는 데 사용되는 stripper를 정의합니다.
    • replace - true일 때 덮어쓰고, 그렇지 않으면 추가합니다. (선택)
<stripper exe="command" replace="true">...</stripper>
  • linker - 링커를 정의합니다.
    • replace - true일 때 덮어쓰고, 그렇지 않으면 추가합니다. (선택)
    • id - static_link, dll 또는 exe일 수 있습니다. 보통 3개의 링커가 모두 정의됩니다.
    • exe - 정의의 본문에서 재정의될 수 있습니다.
<linker id="id" exe="command" replace="true">...</linker>
  • prelinker - prelinker를 정의합니다.
    • replace - true일 때 덮어쓰고, 그렇지 않으면 추가합니다.
<prelinker name="id" replace="true" />...

출처: Structure of the top-level

더 알아보기