From: David Gibson <david@gibson.dropbear.id.au>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>
Subject: Re: powerpc: Fix make rules for dtc
Date: Tue, 10 Oct 2006 10:23:03 +1000 [thread overview]
Message-ID: <20061010002303.GB8209@localhost.localdomain> (raw)
In-Reply-To: <811124BA-A99B-46B9-9A16-4111D937468E@kernel.crashing.org>
On Mon, Oct 09, 2006 at 04:21:31PM +0200, Segher Boessenkool wrote:
> >>> 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.
*I* know, because I checked the Kbuild rules first, and verified that
globs are legal in the clean-files variable.
> 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.
No. clean rules never work this way, because if you change the config
between building and cleaning, things won't get cleaned (which is why
clean rules are just about the only place one uses globs in makefiles,
rather than expanding variables appropriately).
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
prev parent reply other threads:[~2006-10-10 0:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-04 3:37 powerpc: Fix make rules for dtc David Gibson
2006-10-04 3:41 ` powerpc: Fix clean target for empty.c David Gibson
2006-10-05 17:58 ` powerpc: Fix make rules for dtc Segher Boessenkool
2006-10-09 0:29 ` David Gibson
2006-10-09 14:21 ` Segher Boessenkool
2006-10-10 0:23 ` David Gibson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061010002303.GB8209@localhost.localdomain \
--to=david@gibson.dropbear.id.au \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
--cc=segher@kernel.crashing.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).