remake [OPTION]... [TARGET]...
-c, --search-parent
-c
无需指定目录,选项-c
是很类似-C
的-! | –post-mortem
:–debugger –debugger-stop = error
-P, --profile
:--targets
--tasks
#:
开始描述#: This is the main target
all:
@echo all here
#: Test things
check:
@echo check here
#: Build distribution
dist:
@echo dist here
Running remake –tasks
gives:
all This is the main target
check Test things
dist Build distribution
x, --trace [=FLAGS]
: -X, --debugger [=TYPE]
:remake<<4>> help
Command Short Name Aliases
---------------------- ---------- ---------
break [TARGET|LINENUM] [all|run|prereq|end]* (b) L
cd DIR (C)改变工作目录
comment TEXT (#)调试器不会读取以这个开头的命令
continue [TARGET [all|run|prereq|end]*] (c)继续执行调试后的Makefile,直到另一个断点或停止点。
如果指定了目标,则在continue之前在该目标上设置一个断点。
并可以与break一样对目标的不同阶段设置断点
delete BREAKPOINT_NUMBERS... (d)删除断点
down [AMOUNT] (D)向下移动 AMOUNT 个栈区,AMOUNT默认为1
edit (e)在当前目标进行编辑
expand STRING (x)如果STRING中有变量,扩展变量
finish [AMOUNT] (F)运行到目标完成时(跳过依赖),类似单步调试,AMOUNT指额外运行的次数,默认为0
frame N (f) 从当前目标改变到指定目标上,栈区跳转,N默认为0
help [ command [ subcommand ] (h) ? 帮助信息
info [SUBCOMMAND] (i)
list [TARGET|LINE-NUMBER] (l)列出目标信息
load *file-glob* (M)读取指定的makefile
next [AMOUNT] (n)运行到下一个认为你感兴趣的目标,如目标的依赖
print {VARIABLE [attrs...]} (p)打印变量的值
pwd (P)打印当前工作目录
quit [exit-status] (q) exit, return 退出remake一层嵌套
run [ARGS] (R) restart 从头开始运行Makefile,没有参数时,使用最后指定的参数(运行时)
set OPTION {on|off|toggle} (=)修改调试器的设置相关环境变量
setq VARIABLE VALUE (")设置GNU Make变量,值内的变量定义时不扩展,使用时扩展
setqx VARIABLE VALUE (`)设置GNU Make变量,值内的变量定义在赋值发生之前展开。
shell STRING (!) !! 在debugger中执行shell命令
show [SUBCOMMAND] (S)显示调试器的设置相关环境变量
skip (k)跳过执行您当前目标的其余命令。
source *file-glob* (<)从文件(源文件)读取和运行调试器命令
step [AMOUNT] (s)逐步执行,直到遇到下一个目标。AMOUNT表示步数
target [TARGET-NAME] [info1 [info2...]] (t)
up [AMOUNT] (u) 向上移动 AMOUNT 个栈区,AMOUNT默认为1
where [count] (T) backtrace, bt 打印目标的栈,默认打印全部,可以指定count显示最近的几个栈
write [TARGET [FILENAME]] (w) 将目标需要执行的命令写入到文件中
Readline command line editing (emacs/vi mode) is available.
For more detailed help, type 'help COMAMND-NAME' or consult
the online-documentation.
Reading makefiles...
Updating makefiles...
Updating goal targets...
-> (/home/hide_liao/Project/openwrt/include/toplevel.mk:226) 位置信息
prereq: prepare-tmpinfo .config
remake<<0>>
->
,事件图标
(/home/hide_liao/Project/openwrt/include/toplevel.mk:226)
,位置信息
prereq: prepare-tmpinfo .config
,目标与依赖
remake<<0>>
,提示符<0>中的0是命令历史编号。如果支持GNU Readline历史,那在我们输入命令时会增加它,否则它将保持为零。对于每个要重新执行的递归调用,我们将在该数字周围添加另一对尖括号<>。
Here is a list of event icons:
Icon | Event |
---|---|
-> | Stopped before checking target prerequisites.暂停在检查目标条件的之前 |
.. | Stopped after checking target prerequisites. |
<- | Stopped after running target commands.暂停在运行完目标的命令的时候 |
rd | About to read a Makefile |
!! | Error encountered and --post-mortem flag given . In post-mortem debugging. 出现错误!! |
-- | Ran a debugger step of a Makefile target and it’s not one of the above. |
++ | Ran a debugger step in a POSIX command and it’s not one of the above. |
:o | A call to the debugger using the $(debugger) function in the Makefile |
|| | Finished making the goal target |
Examples:
break # list all breakpoints
break 10 # Break on line 10 of the Makefile we are
# currently stopped at
break tests # Break on the "tests" target
break tests prereq # Break on the "tests" target before dependency checking is done
必须在执行对应目标或行号之前设置断点。
对于目标来设置断点,有三个地方,你可能想停下来;这个名称可以作为最后一个选项提供。
prereq
run
end
delete [ bpnumber [bpnumber…] ]
参数为断点号,多个时使用空格分隔。不设置参数时,默认删除所有断点
print [variable]
变量无需带$
符号,并且大小写敏感
expand string
如
remake<0> expand MAKE
(origin default) MAKE := /tmp/remake/src/./make
/tmp/remake/src/Makefile:264: Makefile.in
remake<1> print MAKE # note the difference with the print
(origin default) MAKE = $(MAKE_COMMAND)
remake<2> expand $(MAKE) # Note using $( ) doesn't matter here...
/tmp/remake/src/./make # except in output format - no origin info
target [target-name] [info1 [info2…]]
target-name
是目标的名称,也可以是变量,如@(当前目标)或<(第一个依赖项)。如果省略了目标名称,则使用当前目标。
info
可以有下列的选项:
write [target [[filename|here]]]
该命令会将target
会执行的命令写入到filename
中,如果指定的是here
,则不写入文件中,直接在debugger中打印内容。
如:
$ remake -X -f tests/spec/example/simple.Makefile
Reading makefiles...
Updating makefiles....
Updating goal targets....
-> (/tmp/remake/tests/spec/example/simple.Makefile:2)
all:
remake<0> write
File "/tmp/all.sh" written.
remake<1> w all here
#!/bin/sh
## /src/external-vcs/github/rocky/remake/tests/spec/example/simple.Makefile:2
## all:
#cd /src/external-vcs/github/rocky/remake
echo all here
source file-glob
Read debugger commands from the glob expansion of file-glob
;
file-glob
should resolve after glob expansion to single file.
Examples:
source /home/rocky/remake-dbgr.cmds # absolute path
source ./remake-dbgr.cmds # relative path
source remake-dbgr.cmds # relative path - same as above
source ~/remake-dbgr.cmds # "~" is glob expanded
source ~/[r]emake-dbgr.cmds # Same as above
source ~/remake-dbgr.* # Includes the above, but is an error if not unique
list [ target ]
list line-number | -
列出目标依赖项和目标或行号的命令。
如果没有指定目标名称或行号,则使用当前目标。目标-
意思为,将使用目标堆栈上的父目标。
显示参数:
remake<1> show
show args -- Show the command-line invocation
show basename -- Show if we are to show short or long filenames is off.
show commands -- Show the history of commands you typed.
show debug -- Show the value of the GNU Make debug mask (set via `--debug` or `-d`) is 3361.
show ignore-errors -- Show the value of the GNU Make `--ignore-errors` (or `-i`) flag is off.
show keep-going -- Show the value of the GNU Make `--keep-going` (or `-k`) flag is off.
show silent -- Show the value of the GNU Make `--silent` (or `-s`) flag is off.
show version -- Show the remake version.
设置参数,最后的is off
表示当前这个选项的值:
remake<1> set
set basename -- Set if we are to show short or long filenames(是否只显示文件名,隐藏路径名) is off.
set debug -- Set GNU Make debug mask(设置make的debug掩码) (set via --debug or -d) is 3361.
set ignore-errors -- Set value of GNU Make --ignore-errors (or -i) flag is off.
set keep-going -- Set value of GNU Make --keep-going (or -k) flag is off.
set silent -- Set value of GNU Make --silent (or -s) flags. is off.
set variable -- Change a debugger setting