Skip to content

Commit adaa9c6

Browse files
giuliobenettixhebox
authored andcommitted
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 <[email protected]>
1 parent 55a2119 commit adaa9c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,6 @@ $(DESTDIR)$(datadir)/%: %
8888
$(INSTALL) -D -m 644 $< $@
8989

9090
$(DESTDIR)$(acdir)/%: %
91-
$(INSTALL) -D -l ../$(subst $(datarootdir)/,,$(datadir))/$< $(subst m4/,,$@)
91+
$(INSTALL) -D -l ../$(subst $(datarootdir)/,,$(datadir))/$< $(patsubst %m4/,%,$(dir $@))/$(notdir $@)
9292

9393
.PHONY: all clean install

0 commit comments

Comments
 (0)