Git development
 help / color / mirror / Atom feed
From: David Kastrup <dak@gnu.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [install info (using perl) 1/2] Add support for an info version of the user manual
Date: Thu, 09 Aug 2007 01:25:59 +0200	[thread overview]
Message-ID: <85k5s5pq0o.fsf@lola.goethe.zz> (raw)
In-Reply-To: <7vabt11vkj.fsf@assigned-by-dhcp.cox.net> (Junio C. Hamano's message of "Wed\, 08 Aug 2007 15\:59\:56 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> David Kastrup <dak@gnu.org> writes:
>
>> +git.info: user-manual.xml
>> +	$(RM) $@ $*.texi
>> +	$(DOCBOOK2X_TEXI) user-manual.xml --to-stdout | \
>> +	perl -ne 'if (/^\@setfilename/) {$$_="\@setfilename git.info\
>> +"} elsif (/^\@direntry/) {print "\@dircategory Development\
>> +\@direntry\
>> +* Git: (git).           A fast distributed revision control system\
>> +\@end direntry\
>> +"} print unless (/^\@direntry/ .. /^\@end direntry/)' > $*.texi
>> +	$(MAKEINFO) --no-split $*.texi
>> +	$(RM) $*.texi
>> +
>
> This part worries me.
>
> Historically (as you probably know, having suffered a lot more
> than me with this issue), multi-line command script in Makefile
> was hugely unportable.  Some "make" implementations stripped
> backslash linefeed at the end, some other implementations
> stripped only backslash, yet some other kept both backslash and
> linefeed.  It was a mess.
>
> Admittably we are already quite dependent on GNU make,

Yes, definitely.  That's why I did it that way in the first place.  It
is probably not inconceivable, however, that even then some
combination of make port and perl port to Windows would get into a
tizzy.

> so this is probably not a huge deal, but I have a vague recollection
> that even GNU make itself changed its behaviour over time with
> respect to this exact area, and I had to adjust a few Makefiles to
> accomodate both old and new GNU make.

I have to admit that I did not know in advance how this would work out
and adapted the code to the behavior.

> The standard workaround is of course to have this perl script
> part as a separate, "Documentation/fixup-texi.perl" script and
> invoke it from the Makefile.

I can code this as a single overlong line reasonably easy.  And it is
not actually necessary to do the @setfilename replacement: one can
just specify an override of the output file name.  That shortens the
Perl script.  I'll have to see whether I can get rid of it completely,
but the documentation for docbook2X is really bad (and the author did
not respond to Email yet).  And googling on the net showed that I am
not the only one who fixed up after docbook2X manually.

Don't expect a new patch in this area soon: I am messing with other
stuff right now and it does not make sense reworking this again when I
am not sure yet whether I can throw it out altogether.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

  parent reply	other threads:[~2007-08-08 23:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-06 10:22 [install info (using perl) 1/2] Add support for an info version of the user manual David Kastrup
2007-08-07 10:02 ` [install info (using perl) 2/2] INSTALL: explain info installation and dependencies David Kastrup
2007-08-08 22:59 ` [install info (using perl) 1/2] Add support for an info version of the user manual Junio C Hamano
2007-08-08 23:05   ` Junio C Hamano
2007-08-08 23:18     ` Junio C Hamano
2007-08-08 23:46       ` David Kastrup
2007-08-08 23:27     ` David Kastrup
2007-08-08 23:25   ` David Kastrup [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-08-06 10:22 David Kastrup
2007-08-07 10:49 ` David Kastrup

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=85k5s5pq0o.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox