More Makefile Misery
When running make clean on an ARM tree, I get:
make[1]: *** No rule to make target `arch/arm/mach-/Makefile'. Stop.
Seeing as we have many mach-* directories, and the relevant one is selected by the relevant .config file.
I see two options:
- recurse into the correct one somehow, given that the .config file may have changed since the kernel tree was built.
- recurse into all mach-* directories for make clean and not for the normal build
(Its late, I've not looked at the makefiles yet)
Comments?
Signature · 2 lines
Russell King ([email protected]) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html
Quoted 7 lines · Russell King
When running make clean on an ARM tree, I get:
make[1]: *** No rule to make target `arch/arm/mach-/Makefile'. Stop.
Seeing as we have many mach-* directories, and the relevant one is selected by the relevant .config file.
Quoted 6 lines
I see two options:
- recurse into the correct one somehow, given that the .config file may have changed since the kernel tree was built.
- recurse into all mach-* directories for make clean and not for the normal build
The cure is simple.
Make sure that MACHINE is always assined a sensible value.
MACHINE := sa1100 # Default value to avoid invalid pathnames with no .config
The recursion into the subdirectories does only take care of files listed with EXTRA_TARGETS, host-progs, and clean-files.
Only EXTRA_TARGETS are used in the mach- Makefile, and since this is a *.o file it will anyway be deleted by the find that searches the full tree when you do a make clean.
Make clean execute a find -name '*.[oas]' and remove all such files, and use the recursion only to take care of other generated files spread out over the kernel src tree.
Sam