Re: More Makefile Misery

Sam Ravnborg (sam@ravnborg.org)
Sun, 20 Oct 2002 10:08:51 +0200


On Sun, Oct 20, 2002 at 01:27:50AM +0100, Russell King wrote:
> 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
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/