Running remake –tasks gives:
all This is the main target check Test things dist Build distribution x, --trace [=FLAGS]: 除正常处理外,还打印调试信息。 如果省略标志,则行为与指定–trace = normal时的行为相同 flags can be one of: normal: basic tracing and shell tracing; this is the defaultread: for tracing all Makefiles read in,noshell: which is like `normal but shell tracing is disabledfull: for maximum tracing -X, --debugger [=TYPE]: 进入调试器 If type is given it may be one of: normal: basic tracing and shell tracing; this is the defaultgoal: for all tracing Makefiles readpreaction like normal but shell tracing is disabledfull: for maximum tracing.fatal: for entering the debugger on a fatal error. The –post-mortem option sets thiserror: for entering the debugger on an error.->,事件图标 (/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:
IconEvent->Stopped before checking target prerequisites.暂停在检查目标条件的之前..Stopped after checking target prerequisites.<-Stopped after running target commands.暂停在运行完目标的命令的时候rdAbout 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.:oA call to the debugger using the $(debugger) function in the Makefile||Finished making the goal targetExamples:
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必须在执行对应目标或行号之前设置断点。 对于目标来设置断点,有三个地方,你可能想停下来;这个名称可以作为最后一个选项提供。
before target prerequisite checking(目标判断是否运行之前): prereqafter target prerequisite checking but before running commands(目标判断是否运行之后,命令运行之前,默认为该项): runafter target is complete(目标命令执行完毕之后): end参数为断点号,多个时使用空格分隔。不设置参数时,默认删除所有断点
变量无需带$符号,并且大小写敏感
如
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 infotarget-name是目标的名称,也可以是变量,如@(当前目标)或<(第一个依赖项)。如果省略了目标名称,则使用当前目标。 info可以有下列的选项:
attributes: rule attributesprecious,rule search,and pattern stem commands: 显示要更新目标所需执行的命令depends: 显示目标的依赖,包括order 和 non-order的依赖expand: 类似"commands",但是makefile的变量将会被扩展nonorder: non-order dependenciesorder: “order dependencies”previous:有多个双冒号时的前一个目标名称state: 目标的状态: successully updatedneeds to be updatedfailed to be udatedinvalid, an error of some sort occurred time: 最后修改时间和文件是否被更新。如果目标不是最新的,将会打印“File is very old.”。如果目标是伪目标,则会打印 “File does not exist.”,而不是时间。在某些情况下,您可能会看到“Modification time never checked.”variables: automatically set variables such as @ or <该命令会将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 hereRead 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列出目标依赖项和目标或行号的命令。 如果没有指定目标名称或行号,则使用当前目标。目标-意思为,将使用目标堆栈上的父目标。
显示参数:
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 settinghttps://remake.readthedocs.io/en/latest/