Robert P. J. Day wrote: > ok, some general thoughts on taking advantage of already-installed > host tools so they don't have to be downloaded, configured, built and > installed in staging_dir/host/bin. (i'll just discuss "sed" here but, > obviously, this can apply to any of the other host tools that are > already on the build system, which could include ccache, pkg-config > and possibly others.) > > first, it obviously makes sense to not just check for that utility, > but to check that it's new enough, and that's easy enough to do in the > Makefile so that's not an issue. > > the other issue is to set the search path appropriately. as a first > guess, that could involve a change like the following in rules.mk: > > - SED:=$(STAGING_DIR_HOST)/bin/sed -i -e > + SED:=sed -i -e > > given that the PATH is set in rules.mk thusly: > > TARGET_PATH:=$(TOOLCHAIN_DIR)/bin:$(STAGING_DIR_HOST)/bin:$(STAGING_DIR)/usr/bin:$(PATH) > export PATH:=$(TARGET_PATH) > > that would seem to handle both the staged case and the pre-installed > case, since the staged case would take precedence. Yes, makes sense.
> hmmmmm ... actually, that could be a problem if "sed" is found in > one of those other directories in the search path. is there any > chance of that? if there is, a trivial solution is to just leave > rules.mk the way it is and create an appropriate symlink: > > $(STAGING_DIR_HOST)/bin/sed -> /bin/sed > > if the existing sed is acceptable. in any event, it seems like an > easy thing to do. I don't think the symlink is necessary. Just change the SED variable. - Felix _______________________________________________ openwrt-devel mailing list [email protected] http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
