From adaa9c64921e80f2b8dd3610ffb508618b9204f3 Mon Sep 17 00:00:00 2001 From: Giulio Benetti Date: Sun, 19 Jan 2020 05:22:17 +0100 Subject: Makefile: fix install failure if path contains "m4/" string (#49) Actually Makefile install recipe substitutes every occurence of "m4/" in file name of the target of the rule($@), in an absolute path there could more than one "m4/" occurence, so install will fail. Let's change $(subst ...) with $(patsubst ...) substituting only last occurence of "m4/" pattern. Signed-off-by: Giulio Benetti --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4a3c3f6..2e13403 100644 --- a/Makefile +++ b/Makefile @@ -88,6 +88,6 @@ $(DESTDIR)$(datadir)/%: % $(INSTALL) -D -m 644 $< $@ $(DESTDIR)$(acdir)/%: % - $(INSTALL) -D -l ../$(subst $(datarootdir)/,,$(datadir))/$< $(subst m4/,,$@) + $(INSTALL) -D -l ../$(subst $(datarootdir)/,,$(datadir))/$< $(patsubst %m4/,%,$(dir $@))/$(notdir $@) .PHONY: all clean install -- cgit v1.2.1