summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2014-12-30 12:22:07 +0100
committerStefano Lattarini <stefano.lattarini@gmail.com>2014-12-30 13:37:20 +0100
commit5a2ae66d8a190d80e8d132ad569c08fd207bb9bd (patch)
treef45ed2b79040ea376685fbbdc3efedb2e43e7241
parent8e29fa6bb50d9ab4a8a263c96c51efaa98b169e3 (diff)
downloadautomake-5a2ae66d8a190d80e8d132ad569c08fd207bb9bd.tar.gz
[ng] tex, tags, install: make sure recipes don't end with '\' (backslash char)
Some shells are unable to handle that. Issue revealed by failures of the "check-no-trailing-backslash-in-recipes" rule. * lib/am/texinfos.mk, lib/am/tags.mk, lib/am/scripts.am: Adjust. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
-rw-r--r--lib/am/lisp.am2
-rw-r--r--lib/am/scripts.am5
-rw-r--r--lib/am/tags.mk8
-rw-r--r--lib/am/texinfos.mk6
4 files changed, 14 insertions, 7 deletions
diff --git a/lib/am/lisp.am b/lib/am/lisp.am
index 2c1a4466b..eb7a011cc 100644
--- a/lib/am/lisp.am
+++ b/lib/am/lisp.am
@@ -93,7 +93,7 @@ uninstall-%DIR%LISP:
$(foreach i,\
?BASE? $(notdir $(%DIR%_LISP)), \
?!BASE? $(patsubst $(srcdir)/%,%,$(%DIR%_LISP)), \
-## Also remove the '.elc' byte-compiled versions (if any).
+## Also remove the '.elc' byte-compiled versions, if any.
$(i) $(i)c))
endif %?INSTALL%
diff --git a/lib/am/scripts.am b/lib/am/scripts.am
index 5211ab55e..7f1169d85 100644
--- a/lib/am/scripts.am
+++ b/lib/am/scripts.am
@@ -28,7 +28,10 @@ install-%DIR%SCRIPTS: $(%DIR%_SCRIPTS)
@test -n '$(and $(%DIR%_SCRIPTS),$(%NDIR%dir))' || exit 0; \
echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
- $(foreach i,$(%DIR%_SCRIPTS), \
+## Ending a recipe with a backslash cause some shells to choke,
+## so add a dummy ':' command to make sure the rest of the command
+## is not empty.
+ :; $(foreach i,$(%DIR%_SCRIPTS), \
p=$(call am.vpath.rewrite,$i); \
## If the _SCRIPTS variable has an entry like foo/bar, install it as
## $(destdir)/bar, not $(destdir)/foo/bar. The user can make a new dir
diff --git a/lib/am/tags.mk b/lib/am/tags.mk
index 46205fd23..81adf876c 100644
--- a/lib/am/tags.mk
+++ b/lib/am/tags.mk
@@ -89,14 +89,18 @@ ifneq ($(or $(ETAGS_ARGS),$(am.tags.subfiles),$(am.tags.files.unique)),)
$(ETAGS) \
$(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$(foreach f,$(am.tags.subfiles),'$(am.tags.include-option)=$(CURDIR)/$f') \
- $(am.tags.files.unique)
+## Some shells choke when a recipe ends with a backslash. So make sure the
+## next line is not an empty string.
+ $(or $(am.tags.files.unique),;)
endif
ctags-am: $(TAGS_DEPENDENCIES) $(am.tags.files)
ifneq ($(or $(CTAGS_ARGS),$(am.tags.files.unique)),)
$(CTAGS) \
$(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $(am.tags.files.unique)
+## Some shells choke when a recipe ends with a backslash. So make sure the
+## next line is not an empty string.
+ $(or $(am.tags.files.unique),;)
endif
am.clean.dist.f += TAGS tags
diff --git a/lib/am/texinfos.mk b/lib/am/texinfos.mk
index ee925e8ef..90f1eabc5 100644
--- a/lib/am/texinfos.mk
+++ b/lib/am/texinfos.mk
@@ -169,14 +169,14 @@ install-html-am: .am/install-html
rellist='$(notdir $(and $(infodir),$^))'; \
test -n "$$rellist" || exit 0; \
for relfile in $$rellist; do \
- echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
+ echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'"; \
## Run ":" after install-info in case install-info fails. We really
## don't care about failures here, because they can be spurious. For
## instance if you don't have a dir file, install-info will fail. I
## think instead it should create a new dir file for you. This bug
## causes the "make distcheck" target to fail reliably.
- install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
- done; \
+ install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :; \
+ done
.am/install-dvi: $(DVIS)
@$(NORMAL_INSTALL)