From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hans-Christian Egtvedt Date: Wed, 06 Aug 2008 08:31:54 +0200 Subject: [Buildroot] Makefile.autotools.in does not work wellwith projects In-Reply-To: <20080730101952.GB27907@mx.loc> References: <1216910589.29392.18.camel@localhost> <20080725001242.GB25141@cloud.net.au> <80DE307AE1CF4656A7072295EA2408F8@aeglos> <20080727013317.GA1706@cloud.net.au> <1217234557.7955.8.camel@localhost> <20080728085003.GA22274@cloud.net.au> <1217235161.7955.12.camel@localhost> <20080730101952.GB27907@mx.loc> Message-ID: <1218004314.29697.10.camel@localhost> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net On Wed, 2008-07-30 at 12:19 +0200, Bernhard Fischer wrote: > On Mon, Jul 28, 2008 at 10:52:41AM +0200, Hans-Christian Egtvedt wrote: > >On Mon, 2008-07-28 at 18:50 +1000, Hamish Moffatt wrote: > >> On Mon, Jul 28, 2008 at 10:42:37AM +0200, Hans-Christian Egtvedt wrote: > >> > On Sun, 2008-07-27 at 11:33 +1000, Hamish Moffatt wrote: > > > > > > > >> > And two minutes later I have a RFC for this solution, see attached > >> > patch. > >> [..] > >> > # Install to target dir > >> > -$(BUILD_DIR)/%/.stamp_target_installed: > >> > +$(TARGET_DIR)/%/$($($(PKG)_NAME)_TARGET_INSTALLED_TOUCH_FILE): > >> > $(call MESSAGE,"Installing to target") > >> > - $($(PKG)_MAKE_ENV) $(MAKE) $($(PKG)_INSTALL_TARGET_OPT) -C $(@D)/$($(PKG)_SUBDIR) > >> > + $($(PKG)_MAKE_ENV) $(MAKE) $($(PKG)_INSTALL_TARGET_OPT) -C $($(PKG)_DIR)/$($(PKG)_SUBDIR) > >> [..] > >> > # define sub-target stamps > >> > -$(2)_TARGET_INSTALL_TARGET = $$($(2)_DIR)/.stamp_target_installed > >> > +$(2)_TARGET_INSTALL_TARGET = $$(TARGET_DIR)/$$($(2)_TARGET_INSTALLED_TOUCH_FILE) > >> > >> Will every package that uses Makefile.autotools.in need to be modified > >> to define the target installed file? If so, would you like to prepare a > >> large patch? :) > > > >Not really, since I do not have knowledge about each package and what > >they will need to depend on installed on target. > > > >> Alternatively, perhaps $(2)_TARGET_INSTALL_TARGET could > >> be fall back to the old definition if the new variable is not supplied, > >> using some ifeq logic. > >> > > > >Yes, there should be a fallback when the variable is not supplied. The > >Makefile should print a warning message as well, demanding an update ;) > > > >I'll see what I can figure out. > > Let me suggest to rename that variable to $(2)_TARGET_FILES > and do > $(2)_TARGET_INSTALL_TARGET = $(firstword $($(2)_TARGET_FILES)) > > foo_tmp=$(firstword $($(2)_TARGET_FILES)) > or somthing like $(if $(foo_tmp),$(foo_tmp),$($(2).old_stamp_file)) > > Reasoning: > You really want to only have a few files in $(TARGET_DIR) as opposed to > $(STAGING_DIR). Those $(2)_TARGET_FILES should ideally be the only files > installed into the final image (think of a gazillion superfluous termcap > entries or other unneeded files). Then you need to overwrite the install rule anyway, my patch was intended to fix the general installation of applications. You seem to want a rule which will install only the binaries needed? Some applications and libraries are actually installed quite minimal and correct by using make DESTDIR install :) -- With kind regards, Hans-Christian Egtvedt, Applications Engineer