In Ubuntu compiled Linux-xen encountered arch/i386/kernel/head-xen.o can not find the problem, and the directory has the head-xen.S file, indicating that the previous work of make has not put this. the S file is compiled. o. For the same Code, there is no problem in compiling after svncheckout on ArchLinux and Fedora. The final problem is that Ubuntu points/bin/sh to/bin/dash by default.
In Ubuntu compiled Linux-xen encountered arch/i386/kernel/head-xen.o can not find the problem, and the directory has the head-xen.S file, indicating that the previous work of make has not put this. the S file is compiled. o. For the same Code, there is no problem in compiling the code after svn checkout on ArchLinux and Fedora.
The final problem is that Ubuntu will point/bin/sh to/bin/dash by default, in scripts/Makefile. add a line of SHELL =/bin/bash in build to specify $ (shell) to use bash. Later, I also searched why Ubuntu uses dash instead of bash. The reason is that the execution efficiency of dash is higher, but it is undeniable that this change also caused some projects to fail compilation, although the reason for compilation failure may be that Makefile uses some bash features instead of those provided by POSIX shell.
In addition, some debugging Makefile skills have been found on the Internet during the debugging process:
Make-n can only print the command to be executed, instead of actually executing
Make-np can print more information (rules and variables used) and execute each command
Remake is also a good choice: "remake is a patched and modernized version of GNU make utility that adds improved error reporting, the ability to trace execution in a comprehensible way, and a debugger ."
When checking shell commands, you can use set-x to make all shell commands output before execution.