.. A. OMake command-line options .. _labelA: A. OMake コマンドラインオプション ====================================== ``omake [-j ] [-k] [-p] [-P] [-n] [-s] [-S] [-w] [-t] [-u] [-U] [-R] [--verbose] [--project] [--depend] [--progress] [--print-status] [--print-exit] [--print-dependencies] [--show-dependencies ] [--all-dependencies] [--verbose-dependencies] [--force-dotomake] [--dotomake ] [--flush-includes] [--configure] [--save-interval ] [--install] [--install-all] [--install-force] [--version] [--absname] [--output-normal] [--output-postpone] [--output-only-errors] [--output-at-end] filename... [var-definition...]`` .. _labelA.1: A.1 一般的な使い方 ---------------------------------- .. For Boolean options (for example, -s, --progress, etc.) the option can include a prefix --no, which inverts the usual sense of the option. For example, the option --progress means “print a progress bar,” while the option --no--progress means “do not print a progress bar.” ブーリアンオプション(例えば ``-s`` , ``--progress`` など…)は意味を逆転させる接頭辞 ``--no`` を付与することができます。例えば、オプション ``--progress`` は『プログレスバーを表示する』ことを示していますが、オプション ``--no--progress`` は『プログレスバーを表示しない』ことを示しています。 .. If multiple instances of an option are specified, the final option determines the behavior of OMake. In the following command line, the final --no-S cancels the earlier -S. 複数の重複するオプションが指定されていた場合、最後のオプションがOMakeでのふるまいを決定します。以下のコマンドラインでは、最後の ``--no-S`` が前の ``-S`` オプションを打ち消します。 :: % omake -S --progress --no-S .. _labelA.2: A.2 出力のコントロール ---------------------------------- .. index:: single: -s .. _labelA.2.1: A.2.1 -s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``-s`` .. Never not print commands as they are executed (be “silent”). コマンドが実行された場合でも、決してコマンドの内容を表示しません("silent")。 .. index:: single: -S .. _labelA.2.2: A.2.2 -S ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``-S`` .. Do not print commands as they are executed unless they produce output and/or fail. This is the default. コマンドが出力を生成したり、失敗したりするまでは、コマンドの内容を表示しません。このオプションはデフォルトで有効です。 .. index:: single: -w .. _labelA.2.3: A.2.3 -w ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``-w`` .. Print directory information in make format as commands are executed. This is mainly useful for editors that expect make-style directory information for determining the location of errors. コマンドが実行される時点でのディレクトリの情報を ``make`` フォーマットで表示します。これはエラー場所を特定するため、makeスタイルのディレクトリの情報を切望しているエディターにとって、とても有用なオプションです。 .. index:: single: --progress .. _labelA.2.4: A.2.4 -progress ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``--progress`` .. Print a progress indicator. This option is enabled by default when the OMake's output (stdout) is on a terminal and disabled by default (except on Windows) when the OMake's output is redirected. 進捗状況(プログレスバー)を表示します。このオプションは、OMakeの出力先( ``stdout`` )がターミナルとなっている場合はデフォルトで有効となり、OMakeの出力先がリダイレクトされている場合はデフォルトで無効となります(Windowsを除く)。 .. index:: single: --print-status .. _labelA.2.5: A.2.5 -print-status ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``--print-status`` .. Print status lines (the + and - lines). ステータスライン( ``+`` と ``-`` ライン)を表示します。 .. index:: single: --print-exit .. _labelA.2.6: A.2.6 -print-exit ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``--print-exit`` .. Print termination codes when commands complete. コマンドが成功した場合には終了コードを表示します。 .. index:: single: --verbose .. _labelA.2.7: A.2.7 -verbose ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``--verbose`` .. Make OMake very verbose. This option is equivalent to --no-S --print-status --print-exit VERBOSE=true OMakeの出力を詳細に表示します。このオプションは ``--no-S --print-status --print-exit VERBOSE=true`` と等価です。 .. index:: single: --output-normal .. _labelA.2.8: A.2.8 -output-normal ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``--output-normal`` .. As rule commands are executed, relay their output to the OMake output right away. This is enabled by default, unless --output-postpone or --output-only-errors is enabled. ルールコマンドを実行した時点で、コマンドの出力をOMakeの出力へと即座に受け渡します。これは ``--output-postpone`` か ``--output-only-errors`` が有効になっていない限りデフォルトで有効です。 .. index:: single: --output-postpone .. _labelA.2.9: A.2.9 -output-postpone ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``--output-postpone`` .. When a rule finishes, print the output as a single block. This is useful in combination -j option (see Section A.3.12), where the output of multiple subprocesses can be garbled. The diversion is printed as a single coherent unit. ルールが完了した際に、出力を一つのブロックとして一気に表示します。これは複数のサブプロセスの出力をまとめてくれる(garbled) ``-j`` オプション( :ref:`labelA.3.12` を参照)と一緒に使うと有用です。コマンドの出力は一つにまとめられて表示します。 .. Note that enabling --output-postpone will by default disable the --output-normal option. This might be problematic if you have a command that decides to ask for interactive input. If the --output-postpone is enabled, but the --output-normal is not, the prompt of such a command will not be visible and it may be hard to figure out why the build appears “stuck”. You might also consider using the --progress flag (see Section A.2.4) so that you can see when the build is active. .. note:: ``--output-postpone`` を有効にした際、デフォルトで ``--output-normal`` オプションが無効になります。この仕様は、インタラクティブな入力を要請するコマンドを使いたいような場合に問題となるでしょう。 ``--output-postpone`` が有効になって、さらに ``--output-normal`` が無効になっているような場合、このようなコマンドのプロンプトを表示することはなくなるので、ビルドがなぜ『固まって』いるのか理解することは殆ど困難となります。このような状況に直面した際、あなたは ``--process`` フラグ( :ref:`labelA.2.4` を参照)を用いて、ビルドが実行されているのかどうか確認すべきです。 .. index:: single: --output-only-errors .. _labelA.2.10: A.2.10 -output-only-errors ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``--output-only-errors`` .. Similar to --output-postpone, except that the postponed output from commands that were successful will be discarded. This can be useful in reducing unwanted output so that you can concentrate on any errors. ``--output-postpone`` と似ていますが、このオプションは成功したコマンドの出力を表示しません。つまりユーザが望んでいない出力を減らすことができるので、あなたは任意のエラーが出た箇所のみに集中できます。 .. index:: single: --output-at-end .. _labelA.2.11: A.2.11 -output-at-end ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``--output-at-end`` .. If any rules/commands fail, re-print the output of the failed commands when OMake finishes the build. This is especially useful when any of the -k, -p, or -P options are enabled. 任意のルールやコマンドが失敗した場合、失敗したコマンドの出力をOMakeのビルドが終了した際に表示します。これは ``-k`` , ``-p`` , ``-P`` オプションのうち一つでも有効としている場合に、特に有用となります。 .. This option is off by default. However, when -k is enabled — either explicitly or via one of the -p/-P options — --output-at-end will be enabled by default. このオプションはデフォルトで無効となっています。しかしながら、 ``-k`` オプションが有効となっているような場合ー明示的、あるいは ``-p``/``-P`` オプションを経由した場合ー ``--output-at-end`` オプションはデフォルトで有効となります。 .. index:: single: -o .. _labelA.2.12: A.2.12 -o ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``-o [01jwWpPxXsS]`` .. For brevity, the -o option is also provided to duplicate the above output options. The -o option takes a argument consisting of a sequence of characters. The characters are read from left-to-right; each specifies a set of output options. In general, an uppercase character turns the option on; a lowercase character turns the option off. 上記の出力オプションを簡単に指定するために、 ``-o`` オプションが出力オプションの代替手段として提供されています。 ``-o`` オプションは文字のシーケンスで構成された引数が必要となります。文字は左から右へ読み込まれ、各々の文字は出力オプションの集合を指定しています。一般的に、大文字はオプションを有効にして、小文字はオプションを無効化します。 * **0** .. Equivalent to -s --output-only-errors --no-progress ``-s --output-only-errors --no-progress`` と等価です。 .. This option specifies that omake should be as quiet as possible. If any errors occur during the build, the output is delayed until the build terminates. Output from successful commands is discarded. このオプションは ``omake`` の出力ができるだけサイレントとなるように指定します。任意のエラーがビルド中に生じた場合、出力はビルドが終了するまで延期されます。成功したコマンドの出力は表示されません。 * **1** .. Equivalent to -S --progress --output-only-errors ``-S --progress --output-only-errors`` と等価です。 .. This is a slightly more relaxed version of “quiet” output. The output from successful commands is discarded. The output from failed commands is printed immediately after the command complete. The output from failed commands is displayed twice: once immediately after the command completes, and again when the build completes. A progress bar is displayed so that you know when the build is active. Include the `p' option if you want to turn off the progress bar (for example omake -o 1p). このオプションは上の『サイレント』なバージョンよりも、もう少し寛容な形になっています。成功したコマンドの出力は表示しません。失敗したコマンドの出力はコマンドが完了した後で、即座に表示します。失敗したコマンドの出力は2回表示します。まず1回目はコマンドが完了した際に表示し、2回目はビルドが完了した際に表示します。また、プログレスバーも表示するので、あなたはビルドが実行されているのかどうか確認することができます。もしプログレスバーを表示したくないのであれば、 ``p`` オプションを含めてください(例: ``omake -o 1p`` )。 * **2** .. Equivalent to --progress --output-postpone ``--progress --output-postpone`` と等価です。 .. The is even more relaxed, output from successful commands is printed. This is often useful for deinterleaving the output when using -j. このオプションはさらに寛容な形となっており、成功したコマンドの出力も表示します。これは ``-j`` オプションを用いて出力を重ね合わせたくない(deinterleaving)ような場合にしばしば有用となります。 * **W** ``-w`` と等価です。 * **w** ``--no-w`` と等価です。 * **P** ``-progress`` と等価です。 * **p** ``--no--progress`` と等価です。 * **X** ``--print-exit`` と等価です。 * **x** ``--no-print-exit`` と等価です。 * **S** ``-S`` と等価です。 * **s** ``--no-S`` と等価です。 .. _labelA.3: A.3 ビルドオプション ---------------------------------- .. index:: single: -k .. _labelA.3.1: A.3.1 -k ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``-k`` .. Do not abort when a build command fails; continue to build as much of the project as possible. This option is implied by both -p and -P options. In turn, this option would imply the --output-at-end option. ビルドコマンドが失敗したとしても中断せず、可能な限りプロジェクトのビルドを続けます。このオプションは ``-p`` あるいは ``-P`` オプションを指定した場合、暗黙的に有効となります。さらに、このオプションは暗黙的に ``--output-at-end`` オプションを有効にします。 .. index:: single: -n .. _labelA.3.2: A.3.2 -n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``-n`` .. This can be used to see what would happen if the project were to be built. このオプションによって、プロジェクトがビルドされる場合にどのような手順が踏まれるのか、実際に確認することができます。 .. index:: single: -p .. _labelA.3.3: A.3.3 -p ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``-p`` .. Watch the filesystem for changes, and continue the build until it succeeds. If this option is specified, omake will restart the build whenever source files are modified. Implies -k. ファイルシステムの変化を監視し、ビルドが成功するまで実行し続けます。このオプションを指定した場合、 ``omake`` はソースファイルが変更された際にはいつでもビルドを開始します。また、暗黙的に ``-k`` オプションを有効にします。 .. index:: single: -P .. _labelA.3.4: A.3.4 -P ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``-P`` .. Watch the filesystem for changes forever. If this option is specified, omake will restart the build whenever source files are modified. Implies -k. ファイルシステムの変更点を永久に監視します。このオプションを指定した場合、 ``omake`` はソースファイルが変更された際にはいつでもビルドを開始します。また、暗黙的に ``-k`` オプションを有効にします。 .. index:: single: -R .. _labelA.3.5: A.3.5 -R ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``-R`` .. Ignore the current directory and build the project from its root directory. When omake is run in a subdirectory of a project and no explicit targets are given on the command line, it would normally only build files within the current directory and its subdirectories (more precisely, it builds all the .DEFAULT targets in the current directory and its subdirectories). If the -R option is specified, the build is performed as if omake were run in the project root. カレントディレクトリを無視し、ルートディレクトリからプロジェクトをビルドします。 ``omake`` をプロジェクトのサブディレクトリから実行し、さらに明示的なターゲットをコマンドライン上から与えていないような場合、OMakeは通常カレントディレクトリとそのサブディレクトリ内にあるファイルのみをビルドします(正確には、すべてのカレントディレクトリ内の ``.DEFAULT`` ターゲットをビルドします)。 ``-R`` オプションを指定した場合、まるで ``omake`` がプロジェクトのルート上から実行しているかのようにビルドを行います。 .. In other words, with the -R option, all the relative targets specified on the command line will be taken relative to the project root (instead of relative to the current directory). When no targets are given on the command line, all the .DEFAULT targets in the project will be built (regardless of the current directory). 言い換えると、 ``-R`` オプションを用いることで、コマンドライン上から指定したすべての関連するターゲットを、(カレントディレクトリに関連付ける代わりに)プロジェクトのルートに関連付けます。なんのターゲットもコマンドライン上に指定していない場合には、プロジェクト上のすべての ``.DEFAULT`` ターゲットが(カレントディレクトリに関係なく)ビルドされます。 .. index:: single: -t .. _labelA.3.6: A.3.6 -t ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``-t`` .. Update the omake database to force the project to be considered up-to-date. 強制的に ``omake`` のデータベースを更新します。 .. index:: single: -U .. _labelA.3.7: A.3.7 -U ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``-U`` .. Do not trust cached build information. This will force the entire project to be rebuilt. キャッシュされたビルド情報を用いません。このオプションを指定した場合、強制的にプロジェクト全体をリビルドします。 .. index:: single: --depend .. _labelA.3.8: A.3.8 -depend ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``--depend`` .. Do not trust cached dependency information. This will force files to be rescanned for dependency information. キャッシュされた依存関係の情報を用いません。このオプションを指定した場合、強制的にファイルの依存関係を再スキャンします。 .. index:: single: --configure .. _labelA.3.9: A.3.9 -configure ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``--configure`` .. Re-run static. sections of the included omake files, instead of trusting the cached results. OMakeファイルに含まれている ``static.`` セクションを、キャッシュされた結果を用いる代わりに再実行します。 .. index:: single: --force-dotomake .. _labelA.3.10: A.3.10 -force-dotomake ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``--force-dotomake`` .. Always use the $HOME/.omake for the .omc cache files. 常に ``$HOME/.omake`` の ``.omc`` キャッシュファイルを用います。 .. index:: single: --dotomake .. _labelA.3.11: A.3.11 -dotomake ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``--dotomake `` .. Use the specified directory instead of the $HOME/.omake for the placement of the .omc cache files. ``$HOME/.omake`` を用いる代わりに、指定したディレクトリに置かれた ``.omc`` キャッシュファイルを用います。 .. index:: single: -j single: 並列ビルド .. _labelA.3.12: A.3.12 -j ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``-j `` .. Run multiple build commands in parallel. The count specifies a bound on the number of commands to run simultaneously. In addition, the count may specify servers for remote execution of commands in the form server=count. For example, the option -j 2:small.host.org=1:large.host.org=4 would specify that up to 2 jobs can be executed locally, 1 on the server small.host.org and 4 on large.host.org. Each remote server must use the same filesystem location for the project. 平行して複数のビルドコマンドを実行します。 ``count`` では同時に実行するコマンドの限界数を指定します。加えて、 ``server=count`` の形でリモートサーバのコマンドを実行することもできます。例えば、オプション ``-j 2:small.host.org=1:large.host.org=4`` は2つのジョブをローカルで実行し、さらに1つをサーバ ``small.host.org`` 上、4つを ``large.host.org`` 上で実行します。それぞれのリモートサーバはプロジェクト上の同一の場所で実行しなければなりません。 .. Remote execution is currently an experimental feature. Remote filesystems like NFS do not provide adequate file consistency for this to work. リモートサーバでの実行は現在実験的な機能として搭載しています。NFSのようなリモートファイルシステムでは、十分なファイルの整合性を保つことはできません。 .. index:: single: --print-dependencies .. _labelA.3.13: A.3.13 -print-dependencies ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``--print-dependencies`` .. Print dependency information for the targets on the command line. コマンドライン上でのターゲットの、依存関係に関する情報を表示します。 .. index:: single: --show-dependencies .. _labelA.3.14: A.3.14 -show-dependencies ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``--show-dependencies `` .. Print dependency information if the target is built. ``target`` をビルドする場合、依存関係に関する情報を表示します。 .. index:: single: --all-dependencies .. _labelA.3.15: A.3.15 -all-dependencies ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``--all-dependencies`` .. If either of the options --print-dependencies or --show-dependencies is in effect, print transitive dependencies. That is, print all dependencies recursively. If neither option --print-dependencies, --show-dependencies is specified, this option has no effect. オプション ``--print-dependencies`` あるいは ``--show-dependencies`` が指定されている場合、動的な依存関係も表示します。これは、すべての依存関係を再帰的に表示することを表しています。オプション ``--print-dependencies`` , ``--show-dependencies`` のどちらも指定していない場合、このオプションはなんの影響も与えません。 .. index:: single: --verbose-dependencies .. _labelA.3.16: A.3.16 -verbose-dependencies ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``--verbose-dependencies`` .. If either of the options --print-dependencies or --show-dependencies is in effect, also print listings for each dependency. The output is very verbose, consider redirecting to a file. If neither option --print-dependencies, --show-dependencies is specified, this option has no effect. オプション ``--print-dependencies`` あるいは ``--show-dependencies`` が指定されている場合、各々の依存関係のリストを表示します。出力はとても冗長となり、ファイルへのリダイレクトも考慮されるようになります。オプション ``--print-dependencies`` , ``--show-dependencies`` のどちらも指定していない場合、このオプションはなんの影響も与えません。 .. index:: single: --install .. _labelA.3.17: A.3.17 -install ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``--install`` .. Install default files OMakefile and OMakeroot into the current directory. You would typically do this to start a project in the current directory. デフォルトのファイル ``OMakefile`` と ``OMakeroot`` をカレントディレクトリにインストールします。典型的な使い方としては、カレントディレクトリ内でOMakeのプロジェクトを開始しようとする際に、このオプションを用います。 .. index:: single: --install-all .. _labelA.3.18: A.3.18 -install-all ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``--install-all`` .. In addition to installing files OMakefile and OMakeroot, install default OMakefiles into each subdirectory of the current directory. cvs(1) rules are used for filtering the subdirectory list. For example, OMakefiles are not copied into directories called CVS, RCCS, etc. ``OMakefile`` と ``OMakeroot`` をインストールし、さらにデフォルトの ``OMakefile`` をカレントディレクトリ内のサブディレクトリにインストールします。その際に、サブディレクトリのリストをフィルタリングするため ``cvs(1)`` のルールが用いられます。例えば、 ``OMakefile`` は ``CVS`` , ``RCCS`` などのディレクトリ内にはコピーされません。 .. index:: single: --install-force .. _labelA.3.19: A.3.19 -install-force ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``--install-force`` .. Normally, omake will prompt before it overwrites any existing OMakefile. If this option is given, all files are forcibly overwritten without prompting. 通常、 ``omake`` は既存の ``OMakefile`` を上書きする前に警告を行います。このオプションが与えられている場合、すべてのファイルは強制的に警告を発することなく上書きされます。 .. index:: single: --absname .. _labelA.3.20: A.3.20 -absname ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``--absname`` .. Filenames should expand to absolute pathnames. ファイル名は絶対パスとして展開されるようになります。 .. N.B. This is an experimental option. It may become deprecated. .. note:: これは実験的なオプションで、廃止される恐れがあります。 .. _labelA.3.21: A.3.21 変数の定義 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``name=[value]`` .. omake variables can also be defined on the command line in the form name=value. For example, the CFLAGS variable might be defined on the command line with the argument CFLAGS="-Wall -g". ``omake`` の変数は ``name=value`` の形で、コマンドライン上から指定することもできます。例えば、 ``CFLAGS`` 変数はコマンドライン上から、引数に ``CFLAGS="-Wall -g"`` を指定することで定義することもできます。 .. _labelA.4: A.4 さらなるオプション ---------------------------------- .. In addition, omake supports a number of debugging flags on the command line. Run omake --help to get a summary of these flags. これらのオプションに加えて、 ``omake`` ではコマンドライン上で利用できる、数多くのデバッグフラグをサポートしています。これらのフラグの概要について知りたい方は、 ``omake --help`` を実行してください。 .. index:: single: 環境変数 .. _labelA.5: A.5 環境変数 ---------------------------------- .. index:: single: OMAKEFLAGS .. _labelA.5.1: A.5.1 OMAKEFLAGS ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. If defines, the OMAKEFLAGS should specify a set of options exactly as they are specified on the command line. ``OMAKEFLAGS`` 変数が定義されている場合、 ``OMAKEFLAGS`` で指定したオプションの集合が、コマンドライン上から指定したものと同様に扱われます。 .. index:: single: OMAKELIB .. _labelA.5.2: A.5.2 OMAKELIB ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. If defined, the OMAKELIB environment variable should refer to the installed location of the OMake standard library. This is the directory that contains Pervasives.om etc. On a Unix system, this is often /usr/lib/omake or /usr/local/lib/omake, and on Win32 systems it is often c:\Program Files\OMake\lib. ``OMAKELIB`` が定義されている場合、 ``OMAKELIB`` の環境変数はOMakeでの標準ライブラリの場所を表しています。これは ``Pervasives.om`` などを含んだディレクトリとなっています。Unixシステム上では、これは大まかに ``/usr/lib/omake`` か ``/usr/local/lib/omake`` へ関連付けられ、Win32システム上では ``c:\Program Files\OMake\lib`` へ関連付けられます。 .. If not defined, omake uses the default configured location. You should normally leave this unset. この環境変数が定義されていない場合、 ``omake`` は設定されたデフォルトのパスを用います。通常はこの環境変数を未定義のままにしておいて構いません。 .. _labelA.6: A.6 関数 ---------------------------------- .. index:: single: OMakeFlags() .. _labelA.6.1: A.6.1 OMakeFlags ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. The OMakeFlags function can be used within an OMakefile to modify the set of options. The options should be specified exactly as they are on the command line. For example, if you want some specific project to be silent and display a progress bar, you can add the following line to your OMakefile. ``OMakeFlags`` 関数はオプションの集合を ``OMakefile`` の内部で修正するために用いられます。このオプションはコマンドライン上で指定するのと同様にして指定する必要があります。例えば、ある特定のプロジェクト内で出力をサイレント、かつプログレスバーを表示したい場合、あなたは ``OMakefile`` 上に以下の行を追加します。 :: OMakeFlags(-S --progress) .. For options where it makes sense, the options are scoped like variables. For example, if you want OMake to be silent for a single rule (instead of for the entire project), you can use scoping the restrict the range of the option. この関数によって指定したオプションは、まるで変数のようにスコープ化されます。例えば、OMakeでの出力を(プロジェクト全体で有効にする代わりに)一つのルール上でサイレントにしたい場合は、オプションを適用させる範囲をそのままスコープ化します。 :: section # fooが生成される際に、コマンドラインの出力を表示しません OMakeFlags(-S) foo: fee echo "This is a generated file" > foo cat fee >> foo chmod 555 foo .. _labelA.7: A.7 オプションの処理過程 ---------------------------------- .. When omake is invoked, the options are processed in the following order. ``omake`` が実行された際、オプションは以下の順に処理されます。 .. 1. All options specified by the OMAKEFLAGS environment variable are defined globally. 2. All options from the command line are defined globally. 3. Any individual calls the the OMakeFlags function modify the options locally. 1. ``OMAKEFLAGS`` 環境変数によって指定したすべてのオプションが、プロジェクト全体に作用します。 2. コマンドラインによって指定したすべてのオプションが、プロジェクト全体に作用します。 3. ``OMakeFlags`` 関数によって呼び出された任意のオプションが、プロジェクトの一部分に作用します。 .. index:: single: .omakerc .. _labelA.8: A.8 .omakerc ---------------------------------- .. If the $(HOME)/.omakerc exists, it is read before any of the OMakefiles in your project. The .omakerc file is frequently used for user-specific customization. For example, instead of defining the OMAKEFLAGS environment variable, you could add a line to your .omakerc. ``$(HOME)/.omakerc`` が存在する場合、任意の ``OMakefiles`` が読み込まれる前にまず ``$(HOME)/.omakerc`` が読み込まれます。このファイルは、ユーザが自由にOMakeをカスタマイズする用途として頻繁に用いられます。例えば、 ``OMAKEFLAGS`` 環境変数を定義する代わりに、以下の行を ``.omakerc`` に加えることもできます。 :: $(HOME)/.omakerc: # プライベートなオプションを記述 OMakeFlags(-S --progress)