diff options
author | Martin Quinson <martin.quinson@loria.fr> | 2012-01-01 20:38:51 +0100 |
---|---|---|
committer | Martin Quinson <martin.quinson@loria.fr> | 2012-01-01 20:38:51 +0100 |
commit | 5f17e6f29c22282a4bf2819ac7ee08c942e6e103 (patch) | |
tree | 9414eb44407d9b165a732523e421b51caadcd970 | |
parent | 5cec78b6c13d225c35cb73efd1fa297bd2419f9a (diff) | |
download | quilt-5f17e6f29c22282a4bf2819ac7ee08c942e6e103.tar.gz |
Fix auto-generation of quilt.1 to work with dash
The echo command of dash interprets \f as a special characer and
thus generates a bad manual page. bash's echo leaves them unchanged
(it needs -e to replace those special characters). Using printf
instead is a portable solution that work with both shells.
.
The code also uses a bashism ($'') but it's not really needed with
GNU sed at least (it understands \t and \n) so drop it and avoid some
painful double escaping.
.
This patch was written by Raphael Hertzog for the Debian package, and
updated by Martin Quinson so that it applies on lastest upstream
sources.
Author: Raphael Hertzog <hertzog@debian.org>
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/quilt/+bug/402237
Bug-Debian: http://bugs.debian.org/563517
-rw-r--r-- | Makefile.in | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Makefile.in b/Makefile.in index 797eced..89249dd 100644 --- a/Makefile.in +++ b/Makefile.in @@ -197,7 +197,7 @@ doc/README : doc/README.in $(QUILT:%=quilt/%) $(COMPAT) $(MAKE) -s reference \ ;; \ *) \ - echo $$line \ + printf "%s\n" "$$line" \ ;; \ esac ; \ done 2>&1 < $< > $@ @@ -209,15 +209,15 @@ doc/quilt.1: doc/quilt.1.in $(QUILT:%=quilt/%) $(COMPAT) '@REFERENCE''@') \ $(MAKE) -s reference | \ $(SED) -e 's/^quilt \([^ ]*\)\(.*\)/.IP "\\fB\1\\fP\2 " 4/' \ - -e $$'s/^ \\(-[^\t]*\\)\t\\?/.IP " \\1" 8\\\n/' \ - -e $$'s/^ \t\\?//' \ + -e 's/^ \(-[^\t]*\)\t\?/.IP " \1" 8\n/' \ + -e 's/^ \t\?//' \ ;; \ *@DOCSUBDIR@*) \ - echo "$$line" | \ + printf "%s\n" "$$line" | \ $(SED) -e 's:@DOCSUBDIR''@:$(docdir):g' \ ;; \ *) \ - echo "$$line" \ + printf "%s\n" "$$line" \ ;; \ esac; \ done < $< 2>&1 > $@ |