linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] firmware: fix directory creation rule matching with make 3.82
@ 2012-08-08 17:14 Mark Asselstine
  2012-08-30 14:27 ` Michal Marek
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Asselstine @ 2012-08-08 17:14 UTC (permalink / raw)
  To: mmarek; +Cc: linux-kernel, linux-kbuild, mark.asselstine

Attempting to run 'firmware_install' with CONFIG_USB_SERIAL_TI=y when
using make 3.82 results in an error

make[2]: *** No rule to make target `/lib/firmware/./', needed by
`/lib/firmware/ti_3410.fw'.  Stop.

It turns out make 3.82 is picky when matching directory names with
trailing slashes as a result, where make 3.81 would handle this
correctly make 3.82 does not find the rule needed to create the
directory.

The './' seen in the error is added by $(dir) for firmware which
resides in the base firmware src directory, such as
ti_3410.fw.ihex. By performing $(dir) after we prepend the
$(INSTALL_FW_PATH) we can ensure we don't end up with a './' in the
middle of the path and the directory will be properly created.

This change works with make 3.81 and should work with previous
versions as well.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
---
 scripts/Makefile.fwinst |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/Makefile.fwinst b/scripts/Makefile.fwinst
index 6bf8e87..c3f69ae 100644
--- a/scripts/Makefile.fwinst
+++ b/scripts/Makefile.fwinst
@@ -42,7 +42,7 @@ quiet_cmd_install = INSTALL $(subst $(srctree)/,,$@)
 $(installed-fw-dirs):
 	$(call cmd,mkdir)
 
-$(installed-fw): $(INSTALL_FW_PATH)/%: $(obj)/% | $(INSTALL_FW_PATH)/$$(dir %)
+$(installed-fw): $(INSTALL_FW_PATH)/%: $(obj)/% | $$(dir $(INSTALL_FW_PATH)/%)
 	$(call cmd,install)
 
 PHONY +=  __fw_install __fw_modinst FORCE
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] firmware: fix directory creation rule matching with make 3.82
  2012-08-08 17:14 [PATCH] firmware: fix directory creation rule matching with make 3.82 Mark Asselstine
@ 2012-08-30 14:27 ` Michal Marek
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Marek @ 2012-08-30 14:27 UTC (permalink / raw)
  To: Mark Asselstine; +Cc: linux-kernel, linux-kbuild

On Wed, Aug 08, 2012 at 01:14:36PM -0400, Mark Asselstine wrote:
> Attempting to run 'firmware_install' with CONFIG_USB_SERIAL_TI=y when
> using make 3.82 results in an error
> 
> make[2]: *** No rule to make target `/lib/firmware/./', needed by
> `/lib/firmware/ti_3410.fw'.  Stop.
> 
> It turns out make 3.82 is picky when matching directory names with
> trailing slashes as a result, where make 3.81 would handle this
> correctly make 3.82 does not find the rule needed to create the
> directory.
> 
> The './' seen in the error is added by $(dir) for firmware which
> resides in the base firmware src directory, such as
> ti_3410.fw.ihex. By performing $(dir) after we prepend the
> $(INSTALL_FW_PATH) we can ensure we don't end up with a './' in the
> middle of the path and the directory will be properly created.
> 
> This change works with make 3.81 and should work with previous
> versions as well.
> 
> Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>

Thanks a lot and sorry for the delay. I applied the patch to
kbuild.git#rc-fixes.

Michal

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-08-30 14:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-08 17:14 [PATCH] firmware: fix directory creation rule matching with make 3.82 Mark Asselstine
2012-08-30 14:27 ` Michal Marek

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).