使い方: make [オプション] [ターゲット] ...
オプション:
-b, -m 互換性のためのもので, 無視される.
-B, --always-make 無条件に全ターゲットを make する.
-C DIRECTORY, --directory=DIRECTORY
make 開始前にディレクトリ DIRECTORY へ移動する.
-d デバッグ情報を大量に表示する.
--debug[=FLAGS] 様々なタイプのデバッグ情報を表示する.
-e, --environment-overrides
環境変数が makefile 中の記述に優先する
-f FILE, --file=FILE, --makefile=FILE
FILE を makefile として読み込む
-h, --help このメッセージを表示して終了する.
-i, --ignore-errors コマンドから返されたエラーを無視する.
-I DIRECTORY, --include-dir=DIRECTORY
Search DIRECTORY for included makefiles.
インクルードする makefile を探索する DIRECTORY.
-j [N], --jobs[=N] 一度に N 個までのジョブを許可; 無引数だとジョブ数制限なし.
-k, --keep-going あるターゲットが make できなくても実行を続ける.
-l [N], --load-average[=N], --max-load[=N]
負荷 が N 未満でない限り複数のジョブを開始しない.
-L, --check-symlink-times Use the latest mtime between symlinks and target.
-n, --just-print, --dry-run, --recon
コマンドを実際に実行しない; 表示するのみ.
-o FILE, --old-file=FILE, --assume-old=FILE
FILE をとても古いものと見なして, 再 make しない.
-p, --print-data-base make の内部データベースを表示する.
-q, --question コマンドを実行しない; 更新済であるかどうかを終了ステータスで通知.
-r, --no-builtin-rules ビルトインの暗黙ルールを無効にする.
-R, --no-builtin-variables ビルトインの変数設定を無効にする.
-s, --silent, --quiet コマンド表示をエコーしない.
-S, --no-keep-going, --stop
-k オプションをオフにする.
-t, --touch ターゲットを再 make する代わりにタッチする.
-v, --version make のバージョン番号を表示して終了する.
-w, --print-directory カレントディレクトリを表示する.
--no-print-directory -w をオフにする. 暗黙に有効な場合でもオフにする.
-W FILE, --what-if=FILE, --new-file=FILE, --assume-new=FILE
FILE をいつでも最新として見なす.
--warn-undefined-variables 未定義の変数が参照されたときに警告を発する.
このプログラムは x86_64-redhat-linux-gnu 用にビルドされました
バグレポートは
Usage: make [options] [target] ...
Options:
-b, -m Ignored for compatibility.
-B, --always-make Unconditionally make all targets.
-C DIRECTORY, --directory=DIRECTORY
Change to DIRECTORY before doing anything.
-d Print lots of debugging information.
--debug[=FLAGS] Print various types of debugging information.
-e, --environment-overrides
Environment variables override makefiles.
-f FILE, --file=FILE, --makefile=FILE
Read FILE as a makefile.
-h, --help Print this message and exit.
-i, --ignore-errors Ignore errors from commands.
-I DIRECTORY, --include-dir=DIRECTORY
Search DIRECTORY for included makefiles.
-j [N], --jobs[=N] Allow N jobs at once; infinite jobs with no arg.
-k, --keep-going Keep going when some targets can't be made.
-l [N], --load-average[=N], --max-load[=N]
Don't start multiple jobs unless load is below N.
-L, --check-symlink-times Use the latest mtime between symlinks and target.
-n, --just-print, --dry-run, --recon
Don't actually run any commands; just print them.
-o FILE, --old-file=FILE, --assume-old=FILE
Consider FILE to be very old and don't remake it.
-p, --print-data-base Print make's internal database.
-q, --question Run no commands; exit status says if up to date.
-r, --no-builtin-rules Disable the built-in implicit rules.
-R, --no-builtin-variables Disable the built-in variable settings.
-s, --silent, --quiet Don't echo commands.
-S, --no-keep-going, --stop
Turns off -k.
-t, --touch Touch targets instead of remaking them.
-v, --version Print the version number of make and exit.
-w, --print-directory Print the current directory.
--no-print-directory Turn off -w, even if it was turned on implicitly.
-W FILE, --what-if=FILE, --new-file=FILE, --assume-new=FILE
Consider FILE to be infinitely new.
--warn-undefined-variables Warn when an undefined variable is referenced.
This program built for x86_64-redhat-linux-gnu
Report bugs to
MAKE(1L) LOCAL USER COMMANDS MAKE(1L) 名前 make - プログラム群を管理するための GNU make ユーティリティ 書式 make [ -f makefile ] [ option ] ... target ... 注意 こ のオンラインマニュアルは、 GNU make のドキュメントの一部を抜粋したも のである。このファイルはあまり頻繁には更新されない。というのも、GNU プ ロジェクトでは nroff が使われていないからである。完全かつ最新の内容のド キュメントを見るには、info ファイル make.info を参照すること。 こ れ は texinfo のソースファイル make.texinfo から生成される。 説明 make ユーティリティの目的は、大きなプログラムの中の再コンパイルする必要 がある部分を自動的に決定し、再コンパイルのためのコマンドを実行するこ と で ある。このマニュアルでは、GNU が実装した make の説明を行っている。こ れは Richard Stallman と Roland McGrath が書いたものである。例として は C 言語のプログラムを用いているが、これは C 言語が最も一般的だからである 。 make は、シェルコマンドからコンパイラを起動できるどんなプログラミ ン グ 言語とでも組み合わせて使用できる。実際、 make の利用対象はプログラム だけに限られない。 make は、あるファイルを書き換えたら、その書き換え た フ ァイルを元にして別のファイルも自動的に更新しなければならないような任 意の作業で利用できる。 make を使う準備をするためには、まず makefile と呼ばれるファイルを書かな け ればならない。このファイルは、プログラムを構成するファイル間の関係と 各ファイルを更新するためのプログラムを記述したものである。プログラム の 場 合は普通、実行ファイルはオブジェクトファイルによって更新され、このオ ブジェクトファイルもまたソースファイルのコンパイルによって生成される。 適切な makefile さえあれば、ソースファイルを一部変更する度に make という簡単なシェルコマンドを実行するだけで、必要な再コンパイルが全て 行 われる。 make プログラムは、makefile データベースとファイルの最終更新時 刻を用いて、更新する必要があるファイルを見つける。このようなファイル に 対して、 make はデータベースに記録されているコマンドを実行する。 make は makefile 中のコマンドを実行して、1 つ以上のターゲット 名称を更 新する。この 名称は普通はプログラムである。 -f が無い場合 、 make は makefile として、 GNUmakefile, makefile, Makefile をこの順に参照する。 通常、ユーザが makefile として使うべきなのは、 makefile または Makefile である。 (筆者は Makefile を推奨する。なぜなら、この名前であれば常に デ ィ レクトリ表示の先頭近くに現われるし、 README のような他の重要ファイル のすぐ近くに来るからである。) 最初にチェックされる名前であ る GNUmake- file は、大抵の場合は好ましくない。この名前を使うべきなのは、GNU make に特化しており、他のバージョンの make では処理できない makefile を使 う 場合である。 makefile が ‘-’ ならば、標準入力が読み込まれる。 make がターゲットを更新するのは、ターゲットが依存している必要ファイルが ターゲットより後に変更された場合と、ターゲットが存在しない場合である。 オプション -b -m これらのオプションは無視される。これらは他のバージョンの make との 互換性のためのものである。 -C dir makefile を読み込むなどの動作の前に、ディレクトリ dir に移動する。 複数の -C オプションが指定されている場合、それぞれは前の指定に対す る相対パスと解釈される。例えば、 -C / -C etc は -C /etc と同じ意味 である。このオプションは通常、 make を再帰的に呼び出す時に使われる 。 -d 通常の処理情報に加えて、デバッグ情報を出力する。デバッグ情報に含ま れるのは、再構築の対象となっているファイル、比較されるファイル時間 とその結果、実際に再構築する必要があるファイル、候補になっていたり 実際に適用される暗黙のルールなど、 make が動作を決めるために必要な もの全てである。 -e 環境変数から与える変数を指定する。これは makefile の変数よりも優先 される。 -f file file を makefile として使用する。 -i ファイルの再構築時に実行したコマンドで起きたエラーを全て無視する。 -I dir イ ンクルードする makefile を検索するディレクトリ dir を指定する。 複数の -I オプションを使って複数のディレクトリを指定した場合、ディ レクトリの検索は指定した順で行われる。 make の他のフラグに対する引 き数と異なり、 -I に与える引き数は、フラグの直後に記述できる。つま り 、 -Idir という記述も -I dir と共に許される。この記法を許すのは 、C プリプロセッサの -I フラグとの互換性のためである。 -j jobs 同時に実行できるジョブ(コマンド)の数を指定する。 -j オプションが複 数個指定された場合は、最後の指定が有効になる。引き数無しで -j オプ ションが与えられた場合、 make は同時に実行できるジョブの数を制限し ない。 -k エラーが起きてもできる限り実行を継続しようとする。失敗したターゲッ トとそのターゲットに依存しているファイルは再生成されないものの、そ のターゲットに関する他の依存関係は処理することができる。 -l -l load 他 のジョブが動作しており、ロードアベレージが少なくとも load (浮動 小数)ならば、新しいジョブ(コマンド)を実行しないことを指定する。 引 き数無しの場合には、以前に指定した負荷の制限が取り除かれる。 -n 実行するコマンドの表示だけを行い、実際の実行を行わない。 -o file file が 依存先のファイルより古い場合であっても再構築を行わなず、 file が変更されても他のファイルの再構築を一切行わない。本質的に は 、そのファイルは非常に古いものとして扱われ、規則が無視される。 -p makefile を読み込んで得られたデータベース(規則と変数の値)を出力す る。特に指定しない限り、その後の動作は通常通りである。また、 -v オ プションで得られるバージョン情報も出力する。ファイルを全く再構築す ることなく、データベースの表示だけを行うには make -p -f/dev/nul を 用いること。 -q 「問い合わせモード」で動作する。コマンドを全く実行せず、何も表示し ない。ただ、指定されたターゲットが既に最新ならば終了ステータ ス 0 を返し、そうでなければ 0 でないステータスを返す。 -r 組み込みの暗黙的ルールを使用しない。また、添字規則で使うデフォルト の添字のリストも全て消去する。 -s 静かに動作する。コマンドを実行する際に、コマンドの表示を行わない。 -S -k オ プションの影響を打ち消す。このオプションが必要になるのは、 make を再帰的に用いているために -k オプションがトップレベルの make か ら MAKEFLAGS を通じて継承される場合や、環境変数 MAKEFLAGS で -k を設定している場合だけである。 -t コマンドを実行せずにファイルにタッチする(実際にはファイルを変更 せ ず 、最新の印を付ける)。このオプションを使うと見かけ上コマンドが実 行されたことになり、後で起動する make をだますことができる。 -v make プログラムのバージョンおよび著作権表示、作者のリスト、無保 証 であることの宣言を出力する。 -w 他の処理を行う前後に、作業ディレクトリを表示する。再帰的な make コ マンドが複雑な入れ子になっている状況でエラーを追跡する際に便利であ る。 -W file ターゲット file が変更されたばかりのものとして動作する。 -n フラグ を指定している場合、そのファイルを変更するとどうなるかが表示される 。 -n が指定されていない場合の動作は、 make の実行前に、指定された ファイルに対して touch を行った時とほぼ同じである。ただし、修正 時 刻が変更されるのは make の内部だけである点が異なる。 関連項目 The GNU Make Manual バグ The GNU Make Manual の「問題点とバグ(Problems and Bugs)」の章を参照する こと。 著者 このオンラインマニュアルはスタンフォード大学の Dennis Morse 氏が寄付 し たものである。その後 Roland McGrath が改訂している。 GNU 22 August 1989 MAKE(1L)
MAKE(1) LOCAL USER COMMANDS MAKE(1) NAME make - GNU make utility to maintain groups of programs SYNOPSIS make [ -f makefile ] [ options ] ... [ targets ] ... WARNING This man page is an extract of the documentation of GNU make. It is updated only occasionally, because the GNU project does not use nroff. For complete, current documentation, refer to the Info file make.info which is made from the Texinfo source file make.texi. DESCRIPTION The purpose of the make utility is to determine automatically which pieces of a large program need to be recompiled, and issue the commands to recompile them. The manual describes the GNU implementation of make, which was written by Richard Stallman and Roland McGrath, and is currently maintained by Paul Smith. Our examples show C programs, since they are most common, but you can use make with any programming language whose compiler can be run with a shell command. In fact, make is not limited to programs. You can use it to describe any task where some files must be updated automatically from others whenever the oth- ers change. To prepare to use make, you must write a file called the makefile that describes the relationships among files in your program, and the states the commands for updating each file. In a program, typically the exe- cutable file is updated from object files, which are in turn made by compiling source files. Once a suitable makefile exists, each time you change some source files, this simple shell command: make suffices to perform all necessary recompilations. The make program uses the makefile data base and the last-modification times of the files to decide which of the files need to be updated. For each of those files, it issues the commands recorded in the data base. make executes commands in the makefile to update one or more target names, where name is typically a program. If no -f option is present, make will look for the makefiles GNUmakefile, makefile, and Makefile, in that order. Normally you should call your makefile either makefile or Makefile. (We recommend Makefile because it appears prominently near the begin- ning of a directory listing, right near other important files such as README.) The first name checked, GNUmakefile, is not recommended for most makefiles. You should use this name if you have a makefile that is specific to GNU make, and will not be understood by other versions of make. If makefile is ‘-’, the standard input is read. make updates a target if it depends on prerequisite files that have been modified since the target was last modified, or if the target does not exist. OPTIONS -b, -m These options are ignored for compatibility with other versions of make. -B, --always-make Unconditionally make all targets. -C dir, --directory=dir Change to directory dir before reading the makefiles or doing any- thing else. If multiple -C options are specified, each is inter- preted relative to the previous one: -C / -C etc is equivalent to -C /etc. This is typically used with recursive invocations of make. -d Print debugging information in addition to normal processing. The debugging information says which files are being considered for remaking, which file-times are being compared and with what results, which files actually need to be remade, which implicit rules are considered and which are applied---everything interest- ing about how make decides what to do. --debug[=FLAGS] Print debugging information in addition to normal processing. If the FLAGS are omitted, then the behavior is the same as if -d was specified. FLAGS may be a for all debugging output (same as using -d), b for basic debugging, v for more verbose basic debugging, i for showing implicit rules, j for details on invocation of com- mands, and m for debugging while remaking makefiles. -e, --environment-overrides Give variables taken from the environment precedence over vari- ables from makefiles. +-f file, --file=file, --makefile=FILE Use file as a makefile. -i, --ignore-errors Ignore all errors in commands executed to remake files. -I dir, --include-dir=dir Specifies a directory dir to search for included makefiles. If several -I options are used to specify several directories, the directories are searched in the order specified. Unlike the argu- ments to other flags of make, directories given with -I flags may come directly after the flag: -Idir is allowed, as well as -I dir. This syntax is allowed for compatibility with the C preprocessor’s -I flag. -j [jobs], --jobs[=jobs] Specifies the number of jobs (commands) to run simultaneously. If there is more than one -j option, the last one is effective. If the -j option is given without an argument, make will not limit the number of jobs that can run simultaneously. -k, --keep-going Continue as much as possible after an error. While the target that failed, and those that depend on it, cannot be remade, the other dependencies of these targets can be processed all the same. -l [load], --load-average[=load] Specifies that no new jobs (commands) should be started if there are others jobs running and the load average is at least load (a floating-point number). With no argument, removes a previous load limit. -L, --check-symlink-times Use the latest mtime between symlinks and target. -n, --just-print, --dry-run, --recon Print the commands that would be executed, but do not execute them. -o file, --old-file=file, --assume-old=file Do not remake the file file even if it is older than its dependen- cies, and do not remake anything on account of changes in file. Essentially the file is treated as very old and its rules are ignored. -p, --print-data-base Print the data base (rules and variable values) that results from reading the makefiles; then execute as usual or as otherwise spec- ified. This also prints the version information given by the -v switch (see below). To print the data base without trying to remake any files, use make -p -f/dev/null. -q, --question ‘‘Question mode’’. Do not run any commands, or print anything; just return an exit status that is zero if the specified targets are already up to date, nonzero otherwise. -r, --no-builtin-rules Eliminate use of the built-in implicit rules. Also clear out the default list of suffixes for suffix rules. -R, --no-builtin-variables Don’t define any built-in variables. -s, --silent, --quiet Silent operation; do not print the commands as they are executed. -S, --no-keep-going, --stop Cancel the effect of the -k option. This is never necessary except in a recursive make where -k might be inherited from the top-level make via MAKEFLAGS or if you set -k in MAKEFLAGS in your environment. -t, --touch Touch files (mark them up to date without really changing them) instead of running their commands. This is used to pretend that the commands were done, in order to fool future invocations of make. -v, --version Print the version of the make program plus a copyright, a list of authors and a notice that there is no warranty. -w, --print-directory Print a message containing the working directory before and after other processing. This may be useful for tracking down errors from complicated nests of recursive make commands. --no-print-directory Turn off -w, even if it was turned on implicitly. -W file, --what-if=file, --new-file=file, --assume-new=file Pretend that the target file has just been modified. When used with the -n flag, this shows you what would happen if you were to modify that file. Without -n, it is almost the same as running a touch command on the given file before running make, except that the modification time is changed only in the imagination of make. --warn-undefined-variables Warn when an undefined variable is referenced. EXIT STATUS GNU make exits with a status of zero if all makefiles were successfully parsed and no targets that were built failed. A status of one will be returned if the -q flag was used and make determines that a target needs to be rebuilt. A status of two will be returned if any errors were encountered. SEE ALSO The GNU Make Manual BUGS See the chapter ‘Problems and Bugs’ in The GNU Make Manual. AUTHOR This manual page contributed by Dennis Morse of Stanford University. It has been reworked by Roland McGrath. Further updates contributed by Mike Frysinger. COPYRIGHT Copyright (C) 1992, 1993, 1996, 1999 Free Software Foundation, Inc. This file is part of GNU make. GNU make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU make is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU make; see the file COPYING. If not, write to the Free Soft- ware Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. GNU 22 August 1989 MAKE(1)
Copyright(C) linux-cmd.com All Rights Reserved. Author Takayuki Yukawa