0001-Makefile-fix-install-failure-if-path-contains-m4-str.patch 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. From 2ad9d66d733396b655f05b477a5e91592378fb21 Mon Sep 17 00:00:00 2001
  2. From: Giulio Benetti <giulio.benetti@benettiengineering.com>
  3. Date: Fri, 17 Jan 2020 18:34:42 +0100
  4. Subject: [PATCH] Makefile: fix install failure if path contains "m4/" string
  5. Actually Makefile install recipe substitutes every occurence of "m4/" in
  6. file name of the target of the rule($@), in an absolute path there could
  7. more than one "m4/" occurence, so install will fail. Let's change
  8. $(subst ...) with $(patsubst ...) substituting only last occurence of
  9. "m4/" pattern.
  10. Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
  11. ---
  12. Makefile | 2 +-
  13. 1 file changed, 1 insertion(+), 1 deletion(-)
  14. diff --git a/Makefile b/Makefile
  15. index 4a3c3f6..2e13403 100644
  16. --- a/Makefile
  17. +++ b/Makefile
  18. @@ -88,6 +88,6 @@ $(DESTDIR)$(datadir)/%: %
  19. $(INSTALL) -D -m 644 $< $@
  20. $(DESTDIR)$(acdir)/%: %
  21. - $(INSTALL) -D -l ../$(subst $(datarootdir)/,,$(datadir))/$< $(subst m4/,,$@)
  22. + $(INSTALL) -D -l ../$(subst $(datarootdir)/,,$(datadir))/$< $(patsubst %m4/,%,$(dir $@))/$(notdir $@)
  23. .PHONY: all clean install
  24. --
  25. 2.20.1