On Tue, 25 Dec 2007, Felix Fietkau wrote:

> Robert P. J. Day wrote:
>
> >   it's obvious that, even if ccache is determined to be already
> > installed, that Makefile is still going to cause the ccache source
> > tarball to be downloaded, after which it's just going to be
> > ignored. wouldn't it make more sense to check *immediately* if a
> > particular (and, again, sufficiently recent) host tool is already
> > on the system, at which point that entire Makefile could just be
> > no-opped out of the way?  that is, the basic call to "HostBuild"
> > can just be avoided at that point, no?  since you effectively have
> > *nothing* to do.

> I agree. But simply adding some more code for preventing the
> download is not the right solution. I'm thinking about writing some
> generic code for handling that kind of packages, so the whole check
> can be simplified a lot. I'll do it when I find the time for it.

i probably don't know enough advanced make to be sure of this, but it
would seem that this could be done with *less* code, not more.  if you
look at the number of build targets in tools/ccache/Makefile that need
to be undefined when you realize you already have ccache:

...
else
  define Build/Prepare
  endef
  define Build/Configure
  endef
  define Build/Compile
  endef
  define Build/Clean
  endef
endif
...

i would have thought a simpler solution would be to simply no-op the
entire Makefile if you realize you already have an acceptable version
of the tool installed.  effectively, you'd end up just avoiding
calling:

$(eval $(call HostBuild))

just a thought, i'll look at this more closely myself.

rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca
========================================================================
_______________________________________________
openwrt-devel mailing list
[email protected]
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to