我试图理解openwrt的构建过程。基本上我使用 $(warning)
添加跟踪,注释一些说明等等。
有时我运行make world
并遇到错误。我的问题是我忘记了我到底在哪些文件中进行了更改。
这是命令make -d world
之后的make错误输出:
Reading makefile `tp-link.mk' (search path) (no ~ expansion)...
Reading makefile `ubnt.mk' (search path) (no ~ expansion)...
Reading makefile `generic.mk' (search path) (no ~ expansion)...
Reading makefile `legacy.mk' (search path) (no ~ expansion)...
Makefile:102: *** commands commence before first target. Stop.
Reaping losing child 0x008a0f20 PID 3213
make[5]: *** [image-prereq] Error 2
Removing child 0x008a0f20 PID 3213 from chain.
Reaping losing child 0x0257c930 PID 3210
make[4]: *** [prereq] Error 2
Removing child 0x0257c930 PID 3210 from chain.
Reaping losing child 0x01196730 PID 3207
make[3]: *** [target/linux/prereq] Error 2
Removing child 0x01196730 PID 3207 from chain.
Reaping losing child 0x01432210 PID 3194
make[2]: *** [/home/user/Bureau/Workspace/arduino/openwrt-yun_2/openwrt/staging_dir/target-mips_34kc_musl-1.1.15/stamp/.target_prereq] Error 2
Removing child 0x01432210 PID 3194 from chain.
Reaping losing child 0x01cb58c0 PID 3189
make[1]: *** [prereq] Error 2
Removing child 0x01cb58c0 PID 3189 from chain.
Récupération du statut de sortie du processus fils 0x0167e4a0 PID 3074
make: *** [world] Erreur 2
Suppression du processus fils 0x0167e4a0 PID 3074 de la chaîne.
我从这个输出中不明白的是,当尝试读取 legacy.mk
时,make 提示第 102 行出现错误。我确信我没有对此文件进行任何更改。
我的问题:
我们如何使用 make debug 选项来知道问题来自哪个 Makefile?
最佳答案
问题已解决:我错误地在文件 image.mk
第 605 行中用制表符替换了 2 个空格。make 错误消息确实没有帮助。
我如何发现错误:最明显的解决方案 git checkout
,然后 meld
修改后的文件。
关于linux - 错误来自哪个Makefile,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41368355/