summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiulio Benetti <giulio.benetti@benettiengineering.com>2020-01-19 05:22:17 +0100
committerxhe <xhebox@users.noreply.github.com>2020-01-19 12:22:17 +0800
commitadaa9c64921e80f2b8dd3610ffb508618b9204f3 (patch)
treeb7e6493c5e1f7ece7b31bc5e0ff6cb108c79b123
parent55a2119d06403e05808d89eedc9e94a20e87cbd3 (diff)
downloadgettext-tiny-adaa9c64921e80f2b8dd3610ffb508618b9204f3.tar.gz
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 <giulio.benetti@benettiengineering.com>
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
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