2010-01-14 Juan Manuel Guerrero  <juan.guerrero@gmx.de>

	* Makefile.in: Added target to produce ps, pdf and html docs.

	* help2man.PL: set the SHELL environment variable to bash to avoid that
	COMMAND.COM is used.

	* help2man.texi: DJGPP specifc adjustment.




diff -aprNU5 help2man-1.37.1.orig/Makefile.in help2man-1.37.1/Makefile.in
--- help2man-1.37.1.orig/Makefile.in	2009-11-14 06:21:34 +0000
+++ help2man-1.37.1/Makefile.in	2010-01-14 23:42:42 +0000
@@ -27,10 +27,15 @@ INSTALL_DATA = @INSTALL_DATA@
 INSTALL_INFO = @INSTALL_INFO@
 MAKEINFO = @MAKEINFO@
 MSGFMT = @MSGFMT@
 MKINSTALLDIRS = $(srcdir)/mkinstalldirs
 
+DVIPS = dvips
+TEXI2DVI = texi2dvi
+TEXI2PDF = $(TEXI2DVI) --pdf --batch
+MAKEINFOHTML = $(MAKEINFO) --no-split --html --force
+
 target = help2man
 preload = bindtextdomain
 
 all: $(target) man info @extra_make_all@
 
@@ -106,21 +111,21 @@ $(preload).so: $(srcdir)/$(preload).c
 	$(CC) $(CFLAGS) -o $@ -fPIC -shared $? $(LIBS)
 
 man: $(target).1
 $(target).1: $(srcdir)/$(target).PL $(srcdir)/$(target).h2m
 	$(MAKE) $(target)
-	./$(target) --include=$(srcdir)/$(target).h2m \
+	$(PERL) ./$(target) --include=$(srcdir)/$(target).h2m \
 	    --output=$@ ./$(target)
 
 man_l10n: $(addprefix $(target).,$(addsuffix .1,$(LINGUAS)))
 $(target).%.1: $(srcdir)/$(target).PL $(srcdir)/$(target).%.h2m $(srcdir)/po/%.po
 	lang=$(patsubst $(target).%.1,%,$@); \
 	$(MAKE) $(target) $(preload).so po/$$lang.gmo && \
 	$(MKINSTALLDIRS) localetmp/$$lang/LC_MESSAGES && \
 	$(INSTALL_DATA) po/$$lang.gmo localetmp/$$lang/LC_MESSAGES/$(target).mo && \
 	LD_PRELOAD=./$(preload).so LOCALEDIR=localetmp TEXTDOMAIN=help2man \
-	    ./$(target) --include=$(srcdir)/$(target).$$lang.h2m \
+	    $(PERL) ./$(target) --include=$(srcdir)/$(target).$$lang.h2m \
 		--output=$@ ./$(target)
 
 po/%.gmo: $(srcdir)/po/%.po
 	test -d po || mkdir po
 	$(MSGFMT) -o $@ $?
@@ -131,10 +136,22 @@ $(target).info: $(srcdir)/$(target).texi
 
 dvi: $(target).dvi
 $(target).dvi: $(srcdir)/$(target).texi
 	$(TEXI2DVI) $?
 
+ps: $(target).ps
+$(target).ps: $(srcdir)/$(target).dvi
+	$(DVIPS) -o $@ $?
+
+pdf: $(target).pdf
+$(target).pdf: $(srcdir)/$(target).texi
+	$(TEXI2PDF) $?
+
+html: $(target).html
+$(target).html: $(srcdir)/$(target).texi
+	$(MAKEINFOHTML) $? -o $@
+
 Makefile: $(srcdir)/Makefile.in
 	./config.status
 
 update-po: $(srcdir)/po/$(target).pot
 	for lang in $(LINGUAS); \
diff -aprNU5 help2man-1.37.1.orig/help2man.PL help2man-1.37.1/help2man.PL
--- help2man-1.37.1.orig/help2man.PL	2009-12-19 09:26:36 +0000
+++ help2man-1.37.1/help2man.PL	2010-01-14 23:42:42 +0000
@@ -10,10 +10,20 @@
 #   -v, --version       Print version only*
 #
 # *script not created
 #
 
+BEGIN
+{
+  # Override SHELL.  On DJGPP SHELL may not be set to a shell
+  # that can handle redirection and quote arguments correctly,
+  # e.g.: COMMAND.COM.  For DJGPP always use the shell that configure
+  # has detected.
+  $ENV{'SHELL'} = '/dev/env/DJDIR/bin/bash.exe' if ($^O eq 'dos');
+}
+
+
 use 5.008;
 use Config;
 use Getopt::Long;
 
 my ($program, $version) = ('help2man', '1.37.1');
@@ -76,10 +86,20 @@ print OUT <<'!NO!SUBS!';
 # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
 # Written by Brendan O'Dea <bod@debian.org>
 # Available from ftp://ftp.gnu.org/gnu/help2man/
 
+BEGIN
+{
+  # Override SHELL.  On DJGPP SHELL may not be set to a shell
+  # that can handle redirection and quote arguments correctly,
+  # e.g.: COMMAND.COM.  For DJGPP always use the shell that configure
+  # has detected.
+  $ENV{'SHELL'} = '/dev/env/DJDIR/bin/bash.exe' if ($^O eq 'dos');
+}
+
+
 use 5.005;
 use strict;
 use Getopt::Long;
 use Text::Tabs qw(expand);
 use POSIX qw(strftime setlocale LC_ALL);
diff -aprNU5 help2man-1.37.1.orig/help2man.texi help2man-1.37.1/help2man.texi
--- help2man-1.37.1.orig/help2man.texi	2009-12-08 15:14:04 +0000
+++ help2man-1.37.1/help2man.texi	2010-01-14 23:42:42 +0000
@@ -105,11 +105,11 @@ output into something which resembles a 
 @chapter How to Run @command{help2man}
 
 The format for running the @command{help2man} program is:
 
 @example
-@command{help2man} [@var{option}]@dots{} @var{executable}
+@command{perl} @command{help2man} [@var{option}]@dots{} @var{executable}
 @end example
 
 @command{help2man} supports the following options:
 
 @table @samp
