powerpc: Fix make rules for dtc

Segher Boessenkool segher at kernel.crashing.org
Tue Oct 10 00:21:31 EST 2006


>>>  clean-files := $(zlib) $(zlibheader) $(zliblinuxheader) \
>>> -		$(obj)/empty.c
>>> +		$(obj)/empty.c *.dtb
>>
>> If this wildcard works at all, it will still do the wrong thing:
>> deleting all .dtb files (even the ones that the Makefile cannot
>> create again, e.g., the user put them in the tree manually) is
>> at best not very polite.
>
> It certainly works at all

My problem with it is the := which might be expanded at the wrong
time.  Or maybe that won't glob the *.dtb yet, who knows.  It's
not obviously "working" either way.

> (the preceding $(obj)/empty.c, however, is
> wrong, I've sent a separate patch for that).  One could say the same
> thing for *.o in clean targets,

Yes, and that's a very well-known problem.

> though I guess adding .dtb files is
> rather more likely.  However, I can't seen an obvious way of
> generating a list of the re-creatable dtbs, without an explicit
> listing of every file in arch/powerpc/boot/dts which sounds like a bit
> of a pain.  Suggestions?

You shouldn't clean _all_ dtb's that you could build, only the dtb's
that you _did_ build.  You already have a rule for what dtb's to
build I assume; just copy the logic from there.


Segher




More information about the Linuxppc-dev mailing list