make 4.1 命令詳解


make 是為 x86_64-pc-linux-gnu 構建的。

make 是 Linux 開發套件中的一個自動化編譯控製程序。

make 從 Makefile 中讀取指令, 調用 gcc ld 及相關依賴進行源代碼編譯。

make 所用的 Makefile 控製代碼, 由 configure 腳本根據給定的參數和係統環境生成。

另請參閱: CMake 文檔編製

基本用法     詳細用法

 
			

基本語法

make [options] [target] ...
			

Options 參數

參數 EN 解釋 中文翻譯 備注
-b, -m Ignored for compatibility 忽略兼容性
-B, --always-make Unconditionally make all targets 無條件製作所有目標
-C DIRECTORY, --directory=DIRECTORY Change to DIRECTORY before doing anything. 做任何前,更改到 DIRECTORY。
-d Print lots of debugging information. 打印很多調試信息。
--debug[=FLAGS] Print various types of debugging information. 打印各種類型的調試信息。
-e, --environment-overrides Environment variables override makefiles. 環境變量覆蓋 makefile。
--eval=STRING Evaluate STRING as a makefile statement. 把 STRING 估算成 makefile 語句。
-f FILE, --file=FILE, --makefile=FILE Read FILE as a makefile. 把 FILE 讀取成 makefile。
-h, --help Print this message and exit. 打印此消息並退齣。
-i, --ignore-errors Ignore errors from recipes. 忽略來自配方的錯誤。
-I DIRECTORY, --include-dir=DIRECTORY Search DIRECTORY for included makefiles. 搜索 DIRECTORY 中包括的 makefile。
-j [N], --jobs[=N]

Allow N jobs at once;

infinite jobs with no arg.

一次允許 N 個作業;

沒有 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. 不要啓動多個作業, 除非負載低於 N。
-L, --check-symlink-times Use the latest mtime between symlinks and target. 使用最新 mtime, 在符號鏈接和目標之間。
-n, --just-print, --dry-run, --recon

Don't actually run any recipe;

just print them.

不實際運行任何配方;

隻打印它們。

-o FILE, --old-file=FILE, --assume-old=FILE Consider FILE to be very old and don't remake it. 考慮 FILE 很舊,且不重新製作它。
-O[TYPE], --output-sync[=TYPE] Synchronize output of parallel jobs by TYPE. 按 TYPE 並行作業同步輸齣。
-p, --print-data-base Print make's internal database. 打印 make 的內部數據庫。
-q, --question

Run no recipe;

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 recipes. 不要迴顯配方。
-S, --no-keep-going, --stop Turns off -k. 關閉 -k。
-t, --touch Touch targets instead of remaking them. 接觸目標,而不是重新製作它們。
--trace Print tracing information. 打印跟蹤信息。
-v, --version Print the version number of make and exit. 打印 make 的版本號並退齣。
-w, --print-directory Print the current directory. 打印當前目錄。
--no-print-directory

Turn off -w,

even if it was turned on implicitly.

關閉 -w,

即使它已隱含打開。

-W FILE, --what-if=FILE, --new-file=FILE, --assume-new=FILE Consider FILE to be infinitely new. 考慮 FILE 是無限的新。
--warn-undefined-variables Warn when an undefined variable is referenced. 警告,當引用未定義的變量時。

基本用法

功能 命令 文字解釋 示例 示例解釋
版本 make -v 展示版本信息
make --version
幫助 make -h 展示幫助信息
make --help

 

版權聲明: 本文為獨傢原創稿件,版權歸 樂數軟件 ,未經許可不得轉載。