2014-07-26 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.h2m.PL: set the SHELL environment variable to bash to avoid
	that COMMAND.COM is used.

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

	* help2man.texi: DJGPP specifc adjustment.




diff -aprNU5 help2man-1.46.1.orig/Makefile.in help2man-1.46.1/Makefile.in
--- help2man-1.46.1.orig/Makefile.in	2014-07-26 13:12:04 +0200
+++ help2man-1.46.1/Makefile.in	2014-07-27 14:13:48 +0200
@@ -45,10 +45,15 @@ MSGFMT = @MSGFMT@
 XGETTEXT = @XGETTEXT@
 MSGMERGE = @MSGMERGE@
 PO4A_UPDATEPO = @PO4A_UPDATEPO@
 PO4A_TRANSLATE = @PO4A_TRANSLATE@
 
+DVIPS = dvips
+TEXI2DVI = texi2dvi
+TEXI2PDF = $(TEXI2DVI) --pdf --batch
+MAKEINFOHTML = $(MAKEINFO) --no-split --html --force
+
 # Tweaks to extracted texinfo catalog, and generated output.
 FIXUP_TEXI_POT = @PERL@ $(auxdir)/fixup-texi-pot
 FIXUP_TEXI_TRANS = @PERL@ $(auxdir)/fixup-texi-trans
 
 target = help2man
@@ -147,11 +152,11 @@ $(preload).so: $(srcdir)/$(preload).c
 	$(CC) $(CFLAGS) -o $@ -fPIC -shared $? $(LIBS)
 
 man: $(target).1
 $(target).1: $(srcdir)/$(target).PL $(srcdir)/$(target).h2m.PL
 	$(MAKE) $(target) $(target).h2m
-	./$(target) --include=$(target).h2m --output=$@ ./$(target)
+	$(PERL) ./$(target) --include=$(target).h2m --output=$@ ./$(target)
 
 msg_l10n: $(addprefix po/,$(addsuffix .gmo,$(LINGUAS)))
 po/%.gmo: $(srcdir)/po/%.po
 	test -d po || mkdir po
 	$(MSGFMT) -o $@ $?
@@ -166,11 +171,11 @@ $(target).%.1: $(srcdir)/$(target).PL $(
     $(srcdir)/po/%.po
 	lang=$(patsubst $(target).%.1,%,$@); \
 	$(MAKE) $(target) $(preload).so \
 	    localetmp/$$lang/LC_MESSAGES/$(target).mo $(target).$$lang.h2m; \
 	LD_PRELOAD=./$(preload).so LOCALEDIR=localetmp TEXTDOMAIN=help2man \
-	    ./$(target) --include=$$($(FIND_VPATH) $(target).$$lang.h2m) \
+	    $(PERL) ./$(target) --include=$$($(FIND_VPATH) $(target).$$lang.h2m) \
 		--output=$@ ./$(target)
 
 $(target).%.h2m: $(srcdir)/$(target).h2m.PL $(srcdir)/po/%.po
 	set -e; \
 	lang=$(patsubst $(target).%.h2m,%,$@); \
@@ -196,10 +201,22 @@ $(target)-%.texi: $(srcdir)/po-texi/%.po
 
 dvi: $(target).dvi
 $(target).dvi: $(srcdir)/$(target).texi
 	$(TEXI2DVI) $?
 
+ps: $(target).ps
+$(target).ps: $(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 $(srcdir)/po-texi/$(target)-texi.pot
 	set -e; \
diff -aprNU5 help2man-1.46.1.orig/help2man.PL help2man-1.46.1/help2man.PL
--- help2man-1.46.1.orig/help2man.PL	2014-07-26 15:13:24 +0200
+++ help2man-1.46.1/help2man.PL	2014-07-27 14:17:08 +0200
@@ -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.46.1');
@@ -78,10 +88,20 @@ print OUT <<'!NO!SUBS!';
 # along with this program; if not, see <http://www.gnu.org/licenses/>.
 
 # 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.008;
 use strict;
 use Getopt::Long;
 use Text::ParseWords qw(shellwords);
 use Text::Tabs qw(expand);
diff -aprNU5 help2man-1.46.1.orig/help2man.h2m.PL help2man-1.46.1/help2man.h2m.PL
--- help2man-1.46.1.orig/help2man.h2m.PL	2014-02-02 02:24:46 +0100
+++ help2man-1.46.1/help2man.h2m.PL	2014-07-27 14:17:08 +0200
@@ -15,10 +15,20 @@
 # notice and this notice are preserved.  This file is offered as-is,
 # without any warranty.
 
 # Written by Brendan O'Dea <bod@debian.org>
 
+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;
 use POSIX qw(setlocale LC_ALL);
 
diff -aprNU5 help2man-1.46.1.orig/help2man.html.PL help2man-1.46.1/help2man.html.PL
--- help2man-1.46.1.orig/help2man.html.PL	2012-12-29 23:27:22 +0100
+++ help2man-1.46.1/help2man.html.PL	2014-07-27 14:17:08 +0200
@@ -9,10 +9,19 @@
 # notice and this notice are preserved.  This file is offered as-is,
 # without any warranty.
 
 # Written by Brendan O'Dea <bod@debian.org>
 
+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 strict;
 use warnings;
 use File::Temp;
 use Getopt::Long;
 
diff -aprNU5 help2man-1.46.1.orig/help2man.texi help2man-1.46.1/help2man.texi
--- help2man-1.46.1.orig/help2man.texi	2014-07-06 12:03:04 +0200
+++ help2man-1.46.1/help2man.texi	2014-07-27 14:17:08 +0200
@@ -107,11 +107,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
