From: Ulya Trofimovich Date: Tue, 1 Aug 2017 12:19:06 +0000 (+0100) Subject: Makefile.am: use portable POSIX primitive to get directory name. X-Git-Tag: 1.0~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cd48d98b34e39fd190b48b35ca371c708af4982b;p=re2c Makefile.am: use portable POSIX primitive to get directory name. Use '$(@D)' instead of '$(dir $@)', as the latter requires secondary expansion feature specific to GNU make; it causes build failures on bmake. '$(@D)', on the other hand, is a POSIX make feature documented e.g. in http://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html (section "Internal Macros"). --- diff --git a/re2c/Makefile.am b/re2c/Makefile.am index 68f115b0..83072396 100644 --- a/re2c/Makefile.am +++ b/re2c/Makefile.am @@ -228,7 +228,7 @@ CLEANFILES = \ $(DOC) $(AUTOGEN_PARSER): $(CUSTOM_PARSER) - $(AM_V_at)$(MKDIR_P) $(dir $@) + $(AM_V_at)$(MKDIR_P) $(@D) $(AM_V_GEN) if test $(BISON) = "no"; \ then \ cp $(top_srcdir)/$(BOOTSTRAP_PARSER) $@ && \ @@ -254,7 +254,7 @@ $(BOOTSTRAP_PARSER): $(CUSTOM_PARSER) $(top_srcdir)/$(CUSTOM_PARSER); .re.cc: - $(AM_V_at)$(MKDIR_P) $(dir $@) + $(AM_V_at)$(MKDIR_P) $(@D) $(AM_V_GEN) if test -x $(RE2C); \ then \ $(top_builddir)/$(RE2C) $(RE2CFLAGS) -o $@ $< && \ @@ -275,11 +275,11 @@ bootstrap: all if REBUILD_DOCS docs: $(DOC) $(AUTOGEN_HELP) $(DOC): $(SRC_DOC) - $(AM_V_at)$(MKDIR_P) $(dir $@) + $(AM_V_at)$(MKDIR_P) $(@D) $(RST2MAN) $(top_builddir)/$(SRC_DOC) > $@ cp $@ $(top_srcdir)/$(BOOTSTRAP_DOC) $(AUTOGEN_HELP): $(CUSTOM_HELP) - $(AM_V_at)$(MKDIR_P) $(dir $@) + $(AM_V_at)$(MKDIR_P) $(@D) $(RST2MAN) $(top_builddir)/$(CUSTOM_HELP) > $@.1 $(top_srcdir)/genhelp.sh $@.1 $@ cp $@ $(top_srcdir)/$(BOOTSTRAP_HELP) @@ -287,10 +287,10 @@ else docs: $(DOC) $(AUTOGEN_HELP) @echo "Reconfigure to rebuild docs: ./configure --enable-docs" $(DOC): $(BOOTSTRAP_DOC) - $(AM_V_at)$(MKDIR_P) $(dir $@) + $(AM_V_at)$(MKDIR_P) $(@D) cp $(top_srcdir)/$(BOOTSTRAP_DOC) $@ $(AUTOGEN_HELP): $(BOOTSTRAP_HELP) - $(AM_V_at)$(MKDIR_P) $(dir $@) + $(AM_V_at)$(MKDIR_P) $(@D) cp $(top_srcdir)/$(BOOTSTRAP_HELP) $@ endif