[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Quilt-dev] 0.50 in Debian + Simple patch for inclusion: Fix manpage
From: |
Jean Delvare |
Subject: |
Re: [Quilt-dev] 0.50 in Debian + Simple patch for inclusion: Fix manpage generation under dash |
Date: |
Mon, 9 Jan 2012 14:34:07 +0100 |
User-agent: |
KMail/1.12.4 (Linux/2.6.32.49-0.3-pae; KDE/4.3.5; i686; ; ) |
On Friday 23 December 2011 04:23:19 pm Martin Quinson wrote:
>@@ -208,11 +208,11 @@ doc/quilt.1: doc/quilt.1.in $(QUILT:%=qu
> '@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\?//' \
> ;; \
> *) \
Actually we have a problem here: the sed tool in FreeBSD (and I suspect
other BSDs as well) doesn't recognize \n. So you've solved a
compatibility problem by introducing a different one.
I'd like to make sure I understand your problem so that we can come up
with a solution. You're using dash as your /bin/sh implementation. What
is the reason for this? Is it a performance issue? Or is bash really not
available at build time?
As you said yourself, portable shell scripting can be very difficult.
What makes it viable for quilt is that we know the shell is bash so it
offers some facilities and we don't rely too much on external binaries.
Of course if we can no longer count on bash, even if it is only at build
time, things become a lot more difficult for us.
I couldn't come up with an alternative for the shell code above. If you
have bash available (and I believe you do, otherwise configure would
complain) then I think the best option is to move the documentation
generation code out of the Makefile to an external bash script.
--
Jean Delvare
Suse L3