... and i'll shut up and move on to something else to obsess about. so, in the spirit of how ccache is set up, it would seem to be worth checking if other (sufficiently new) host tools are already installed, and bypass configuring and installing them. not only sed, but perhaps pkg-config, genext2fs and others since, if someone has gone to the trouble of setting up a decent development environment, there's a good chance they may have some of that stuff already, and they may *prefer* to use the ones they set up. there is one remaining issue, though.
if you look at, say, tools/ccache/Makefile: ========== include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/target.mk PKG_NAME:=ccache PKG_VERSION:=2.4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://samba.org/ftp/ccache/ PKG_MD5SUM:=73c1ed1e767c1752dd0f548ec1e66ce7 PKG_CAT:=zcat include $(INCLUDE_DIR)/host-build.mk ifneq ($(strip $(shell which ccache >/dev/null && echo found)),found) define Build/Compile $(MAKE) CC="$(HOSTCC)" -C $(PKG_BUILD_DIR) endef define Build/Install $(MAKE) -C $(PKG_BUILD_DIR) \ DESTDIR="$(STAGING_DIR_HOST)" \ install endef define Build/Clean -$(MAKE) -C $(PKG_BUILD_DIR) uninstall -$(MAKE) -C $(PKG_BUILD_DIR) clean $(call Build/Clean/Default) endef else define Build/Prepare endef define Build/Configure endef define Build/Compile endef define Build/Clean endef endif $(eval $(call HostBuild)) =========== 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. rday p.s. have i beaten this to death by now? yes, i think i have. :-) -- ======================================================================== 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
