]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] tex, tags, install: make sure recipes don't end with '\' (backslash char)
authorStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 30 Dec 2014 11:22:07 +0000 (12:22 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 30 Dec 2014 12:37:20 +0000 (13:37 +0100)
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>
lib/am/lisp.am
lib/am/scripts.am
lib/am/tags.mk
lib/am/texinfos.mk

index 2c1a4466b96a9a6cc71a76b86723ad05e4bf58d2..eb7a011cc4a717f710bf913ed30cae68290b21f0 100644 (file)
@@ -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%
 
index 5211ab55e98bea1798542d880017c64cbd5ceaab..7f1169d85a2f3228a585170ea3216be66963aeff 100644 (file)
@@ -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
index 46205fd23d2b98308b164b580bd018e463eed35e..81adf876c48b56fafc4a24109f7d5272f4032858 100644 (file)
@@ -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
index ee925e8ef5a57409263bde904547ef964c9823e5..90f1eabc51f8a834c25f36453d1024ce69433f6b 100644 (file)
@@ -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)