.. _label13:
-ビルド関数とユーティリティ
+13. ビルド関数とユーティリティ
==================================
.. index::
single: .BUILD_FAILURE
.. _label13.1:
-ビルドイン .PHONY ターゲット
+13.1 ビルドイン .PHONY ターゲット
--------------------------------------
.. The complete set of builtin .PHONY targets include the following.
.. _label13.2:
-オプションとバージョン管理
+13.2 オプションとバージョン管理
--------------------------------------
.. index::
single: OMakeFlags()
.. _label13.2.1:
-OMakeFlags
+13.2.1 OMakeFlags
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
single: OMakeVersion()
.. _label13.2.2:
-OMakeVersion
+13.2.2 OMakeVersion
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
single: cmp-versions()
.. _label13.2.3:
-cmp-versions
+13.2.3 cmp-versions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
single: DefineCommandVars()
.. _label13.2.4:
-DefineCommandVars
+13.2.4 DefineCommandVars
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
.. _label13.3:
-依存関係グラフの調査
+13.3 依存関係グラフの調査
--------------------------------------
.. index::
single: dependencies-proper()
.. _label13.3.1:
-dependencies, dependencies-all, dependencies-proper
+13.3.1 dependencies, dependencies-all, dependencies-proper
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
single: target()
.. _label13.3.2:
-target
+13.3.2 target
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
single: find-build-targets()
.. _label13.3.3:
-find-build-targets
+13.3.3 find-build-targets
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
single: project-directories()
.. _label13.3.4:
-project-directories
+13.3.4 project-directories
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
single: rule()
.. _label13.3.5:
-rule
+13.3.5 rule
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. The rule function is called whenever a build rule is defined. It is unlikely that you will need to redefine this function, except in very exceptional cases.
single: build()
.. _label13.3.6:
-build
+13.3.6 build
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
.. _label13.4:
-OMakerootファイル
+13.4 OMakerootファイル
--------------------------------------
.. The standard OMakeroot file defines the functions are rules for building standard projects.
single: SCANNER_MODE
.. _label13.4.1:
-変数
+13.4.1 変数
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* **ROOT**
single: EXE
.. _label13.4.2:
-システム変数
+13.4.2 システム変数
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. The command to install a program (install on Unix, cp on Win32).
The normal path separator (: on Unix, ; on Win32).
.. _label13.5:
-C/C++コードのビルド
+13.5 C/C++コードのビルド
--------------------------------------
.. OMake provides extensive support for building C and C++ programs. In order to use the functions defined in this section, you need to make sure the line is present in your OMakeroot file.
.. _label13.5.1:
-自動設定変数(Autoconfiguration variables)
+13.5.1 自動設定変数(Autoconfiguration variables)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. These variables will get defined based on the “autoconf-style” static. tests executed when you run OMake for the first time. You can use them to configure your project accordingly, and you should not redefine them.
single: GXX_FOUND
.. _label13.5.1.1:
-Unixライクなシステム
+13.5.1.1 Unixライクなシステム
""""""""""""""""""""""""""""""""""""""
.. A boolean flag specifying whether the gcc binary was found in your path.
A boolean flag specifying whether the g++ binary was found in your path.
single: LIB_FOUND
.. _label13.5.1.2:
-Win32
+13.5.1.2 Win32
""""""""""""""""""""""""""""""""""""""
.. A boolean flag specifying whether the cl binary was found in your path.
A boolean flag specifying whether the lib binary was found in your path.
single: LEX
.. _label13.5.2:
-C/C++用の設定変数
+13.5.2 C/C++用の設定変数
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. The following variables can be redefined in your project.
.. _label13.5.3:
-Cファイルの生成
+13.5.3 Cファイルの生成
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. Because the C scanners do not normally know anything about generated source files (such as generated header files), these files may need to be created before running the scanner.
single: LocalCGeneratedFiles()
.. _label13.5.3.1:
-CGeneratedFiles, LocalCGeneratedFiles
+13.5.3.1 CGeneratedFiles, LocalCGeneratedFiles
""""""""""""""""""""""""""""""""""""""""""""""""""""
::
.. _label13.5.4:
-Cプログラムとライブラリをビルド
+13.5.4 Cプログラムとライブラリをビルド
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. index::
single: CDLL_IMPLIES_STATIC
.. _label13.5.4.1:
-StaticCLibrary, DynamicCLibrary
+13.5.4.1 StaticCLibrary, DynamicCLibrary
"""""""""""""""""""""""""""""""""""""""""""""""
.. The StaticCLibrary builds a static library and the DynamicCLibrary function builds a shared library (DLL).
single: DynamicCLibraryCopy()
.. _label13.5.4.2:
-StaticCLibraryCopy, DynamicCLibraryCopy
+13.5.4.2 StaticCLibraryCopy, DynamicCLibraryCopy
"""""""""""""""""""""""""""""""""""""""""""""""""""""
.. The StaticCLibraryCopy and DynamicCLibraryCopy functions copy a library to an install location.
single: DynamicCLibraryInstall()
.. _label13.5.4.3:
-StaticCLibraryInstall, DynamicCLibraryInstall
+13.5.4.3 StaticCLibraryInstall, DynamicCLibraryInstall
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.. The StaticCLibraryInstall and DynamicCLibraryInstall functions build a library, and set the install location in one step. Return the filename of the library in the target directory.
single: StaticCObjectInstall()
.. _label13.5.4.4:
-StaticCObject, StaticCObjectCopy, StaticCObjectInstall
+13.5.4.4 StaticCObject, StaticCObjectCopy, StaticCObjectInstall
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.. These functions mirror the StaticCLibrary, StaticCLibraryCopy, and StaticCLibraryInstall functions, but they build an object file (a .o file on Unix, and a .obj file on Win32).
single: LIBS
.. _label13.5.4.5:
-CProgram
+13.5.4.5 CProgram
"""""""""""""""""""""""""
.. The CProgram function builds a C program from a set of object files and libraries.
single: CProgramCopy()
.. _label13.5.4.6:
-CProgramCopy
+13.5.4.6 CProgramCopy
""""""""""""""""""""""""""""""""""""""
.. The CProgramCopy function copies a file to an install location.
single: CProgramInstall()
.. _label13.5.4.7:
-CProgramInstall
+13.5.4.7 CProgramInstall
""""""""""""""""""""""""""""""""""""""
.. The CProgramInstall function specifies a program to build, and a location to install, simultaneously.
single: CXXFLAGS
.. _label13.5.4.8:
-CXXProgram, CXXProgramInstall
+13.5.4.8 CXXProgram, CXXProgramInstall
""""""""""""""""""""""""""""""""""""""""""
.. The CXXProgram and CXXProgramInstall functions are equivalent to their C counterparts, except that would use $(CXX) and $(CXXFLAGS) for linking instead of $(CC) and $(CFLAGS).
single: DynamicCXXLibraryInstall()
.. _label13.5.4.9:
-StaticCXXLibrary, StaticCXXLibraryCopy, StaticCXXLibraryInstall, DynamicCXXLibrary, DynamicCXXLibraryCopy, DynamicCXXLibararyInstall
+13.5.4.9 StaticCXXLibrary, StaticCXXLibraryCopy, StaticCXXLibraryInstall, DynamicCXXLibrary, DynamicCXXLibraryCopy, DynamicCXXLibararyInstall
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.. Similarly, the six CXXLibrary functions the C++ equivalents of the corresponding CLibrary functions.
.. _label13.6:
-OCamlコードのビルド
+13.6 OCamlコードのビルド
--------------------------------------
.. OMake provides extensive support for building OCaml code, including support for tools like ocamlfind, ocamlyacc and menhir. In order to use the functions defined in this section, you need to make sure the line
single: MENHIR_AVAILABLE
.. _label13.6.1:
-OCamlコンパイルに用いる自動設定用の変数
+13.6.1 OCamlコンパイルに用いる自動設定用の変数
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. These variables will get defined based on the “autoconf-style” tests executed when you run OMake for the first time. You can use them to configure your project accordingly, and you should not redefine them.
single: MENHIR_ENABLED
.. _label13.6.2:
-OCamlコンパイルに用いる設定用の変数
+13.6.2 OCamlコンパイルに用いる設定用の変数
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. The following variables can be redefined in your project.
single: MENHIR_FLAGS
.. _label13.6.3:
-OCamlコマンドフラグ
+13.6.3 OCamlコマンドフラグ
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. The following variables specify additional options to be passed to the OCaml tools.
single: ABORT_ON_DEPENDENCY_ERRORS
.. _label13.6.4:
-ライブラリ変数
+13.6.4 ライブラリ変数
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. The following variables are used during linking.
.. _label13.6.5:
-OCamlファイルを生成
+13.6.5 OCamlファイルを生成
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. As of OCaml version 3.09.2, the standard ocamldep scanner is “broken”. The main issue is that it finds only those dependencies that already exist. If foo.ml contains a dependency on Bar,
single: LocalOCamlGeneratedFiles()
.. _label13.6.5.1:
-OCamlGeneratedFiles, LocalOCamlGeneratedFiles
+13.6.5.1 OCamlGeneratedFiles, LocalOCamlGeneratedFiles
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
::
.. _label13.6.5.2:
-依存関係の解析中に生成されるファイルを自動的に調査
+13.6.5.2 依存関係の解析中に生成されるファイルを自動的に調査
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.. Having to specify the generated files manualy when OMake could discover them automatically is obviously suboptimal. To address this, we tell ocamldep to only find the free module names in a file and then post-process the results internally.
single: Menhir
.. _label13.6.6:
-Menhirパーサジェネレータを使用
+13.6.6 Menhirパーサジェネレータを使用
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. Menhir is a parser generator that is mostly compatible with ocamlyacc, but with many improvements. A few of these are listed here (excerpted from the Menhir home page http://cristal.inria.fr/~fpottier/menhir/).
single: OCamlLibrary()
.. _label13.6.6.1:
-OCamlLibrary
+13.6.6.1 OCamlLibrary
""""""""""""""""""""""""""""""""""""""
.. The OCamlLibrary function builds an OCaml library.
single: OCamlPackage()
.. _label13.6.6.2:
-OCamlPackage
+13.6.6.2 OCamlPackage
""""""""""""""""""""""""""""""""""""""
.. The OCamlPackage function builds an OCaml package.
single: OCamlLibraryCopy()
.. _label13.6.6.3:
-OCamlLibraryCopy
+13.6.6.3 OCamlLibraryCopy
""""""""""""""""""""""""""""""""""""""
.. The OCamlLibraryCopy function copies a library to an install location.
single: OCamlLibraryInstall()
.. _label13.6.6.4:
-OCamlLibraryInstall
+13.6.6.4 OCamlLibraryInstall
""""""""""""""""""""""""""""""""""""""
.. The OCamlLibraryInstall function builds a library and copies it to an install location in one step.
single: OCAMLE_LINK_FLAGS
.. _label13.6.6.5:
-OCamlProgram
+13.6.6.5 OCamlProgram
""""""""""""""""""""""""""""""""""""""
.. The OCamlProgram function builds an OCaml program. It returns the array with all the targets for which it has defined the rules ($(name)$(EXE) and $(name).run and/or $(name).opt, depending on the NATIVE_ENABLED and BYTE_ENABLED variables).
single: NATIVE_ENABLED
.. _label13.6.6.6:
-OCamlProgramCopy
+13.6.6.6 OCamlProgramCopy
""""""""""""""""""""""""""""""""""""""
.. The OCamlProgramCopy function copies an OCaml program to an install location.
single: OCamlProgramInstall()
.. _label13.6.6.7:
-OCamlProgramInstall
+13.6.6.7 OCamlProgramInstall
""""""""""""""""""""""""""""""""""""""
.. The OCamlProgramInstall function builds a programs and copies it to an install location in one step.
.. _label13.7:
-LaTeXファイルのビルド
+13.7 LaTeXファイルのビルド
--------------------------------------
.. OMake provides support for building LATEX documents, including support for automatically running BiBTex and for producing PostScript and PDF files. In order to use the functions defined in this section, you need to make sure the line is present in your OMakeroot file.
single: USEPDFLATEX
.. _label13.7.1:
-設定用の変数
+13.7.1 設定用の変数
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. The following variables can be modified in your project.
.. _label13.7.2:
-LaTeXドキュメントのビルド
+13.7.2 LaTeXドキュメントのビルド
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. index::
single: TEXVARS
.. _label13.7.2.1:
-LaTeXDocument
+13.7.2.1 LaTeXDocument
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.. The LaTeXDocument produces a LATEX document.
single: LocalTeXGeneratedFiles()
.. _label13.7.2.2:
-TeXGeneratedFiles, LocalTeXGeneratedFiles
+13.7.2.2 TeXGeneratedFiles, LocalTeXGeneratedFiles
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
::
single: LaTeXDocumentCopy()
.. _label13.7.2.3:
-LaTeXDocumentCopy
+13.7.2.3 LaTeXDocumentCopy
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.. The LaTeXDocumentCopy copies the document to an install location.
single: LaTeXDocumentInstall()
.. _label13.7.2.4:
-LaTeXDocumentInstall
+13.7.2.4 LaTeXDocumentInstall
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.. The LaTeXDocumentInstall builds a document and copies it to an install location in one step.