diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644
index 7e19e4e..0000000
--- a/ChangeLog
+++ /dev/null
@@ -1,212 +0,0 @@
-Sat Sep 7 02:13:05 2002 Brendan O'Dea <bod@debian.org>
-
- * help2man.texi: Change @dircategory to "GNU programming support"
- (Karl Berry). Change @setchapternewpage to "on" (Peter Moulder).
-
- * Makefile.in: Added some more GNU standard targets (Peter
- Moulder).
-
- * Makefile.in, help2man.h2m: Rename help2man.aux to .h2m to avoid
- clashing with tex.
-
- * help2man.PL: version bump
-
-Tue Jun 4 00:53:18 2002 Brendan O'Dea <bod@odea.dropbear.id.au>
-
- * help2man.PL: Expand copyright years (Paul Eggert). Provide
- --info-page option (Bonzini).
-
- * README.sh: hrm, different awk...
-
-Tue Mar 19 23:52:37 2002 Brendan O'Dea <bod@debian.org>
-
- * help2man.PL: Allow short and long options to be separated by
- multiple spaces (Paul Eggert).
-
-Sat Mar 9 23:54:01 2002 Brendan O'Dea <bod@debian.org>
-
- * help2man.PL: version bump for doc changes
- * help2man.texi: Add --help recommendations from Karl Berry (& co.)
-
-Mon Dec 3 19:02:26 2001 Brendan O'Dea <bod@debian.org>
-
- * README.sh: Change email address
- * configure.in: Require perl 5.005
- * help2man.PL, help2man.texi: Add --source, --manual, --help-option
- and --version-option; change email address; update copyright
-
-Fri Dec 22 23:17:11 2000 Brendan O'Dea <bod@compusol.com.au>
-
- * help2man.PL: Process options given in the block before the first
- section of an include file (suggested by Akim Demaille).
-
- * help2man.aux: Document option parsing of initial include file
- segment.
-
- * help2man.texi: Use @pxref rather than @xref (Karl Berry).
- Document option parsing of initial include file segment.
-
-Tue Oct 31 17:07:30 2000 Brendan O'Dea <bod@compusol.com.au>
-
- * help2man.PL: Add protection for leading apostrophes (reported by
- Matt Kraai). Don't zero-pad version.
-
-Fri Jul 7 16:16:18 2000 Brendan O'Dea <bod@compusol.com.au>
-
- * README.sh: Add GNU prefix
- * aclocal.m4: (add) autoconf support
- * configure.in: Use AC_PROG_PERL from aclocal.m4 to find perl
- (checks for perl and perl5)
-
- * help2man.PL: Add GNU prefix, bug reporting address
- * help2man.aux: Remove ozemail URL
- * help2man.texi: Add GNU prefix, bug reporting address. Remove
- ozemail URL
-
-Sun Apr 16 00:18:41 2000 Brendan O'Dea <bod@compusol.com.au>
-
- * Makefile.in: Add mkinstalldirs (as reqested by Dave Morrison,
- Patrick Tullmann and Mo DeJong)
-
- * help2man.PL: Version bump
-
-Thu Dec 30 01:29:12 1999 Brendan O'Dea <bod@compusol.com.au>
-
- * help2man.texi: Correct typo
-
-Thu Nov 11 03:16:25 1999 Brendan O'Dea <bod@compusol.com.au>
-
- * help2man.PL: Remove directories from synopsis
-
-Wed Nov 3 17:39:50 1999 Brendan O'Dea <bod@compusol.com.au>
-
- * help2man.PL: Revise tagged paragraph matching *again*
-
-Mon Nov 1 21:50:36 1999 Brendan O'Dea <bod@compusol.com.au>
-
- * help2man.PL: Allow multiple synopsis entries (w/- `or:'). Single
- options may have argument w/- `='.
-
- * help2man.texi: Add /pattern/
- * configure.in: Add MAKEINFO/INSTALL_INFO
- * Makefile.in: Install help2man.info
-
-Wed Oct 27 16:02:00 1999 Brendan O'Dea <bod@compusol.com.au>
-
- * help2man.PL: Allow --include to be specified multiple times. Add
- /pattern/.
-
- * help2man.aux: Document /pattern/ syntax
-
-Mon Oct 25 22:36:16 1999 Brendan O'Dea <bod@compusol.com.au>
-
- * help2man.PL: Fix odd /^x|^y/ pre-5.005 perl bug. Split tagged
- paragraph logic into option/other. Protect leading periods in
- continuation lines.
-
- * THANKS to Roland Huebner for extensive bug report.
- * Add NEWS file
-
-Tue Oct 12 16:25:23 1999 Brendan O'Dea <bod@compusol.com.au>
-
- * help2man.PL: Protect leading dots (1.14: not released)
-
- * README.sh, help2man.aux: Add ftp.gnu.org URL
- * help2man.PL: Allow fixed-pitch examples where prefixed by $,
- % or > (for Akim)
-
-Thu Sep 2 19:43:02 1999 Brendan O'Dea <bod@compusol.com.au>
-
- * help2man.PL: Fix typo in --help (Jim Meyering)
- Escape backslashes (Andreas Schwab/Peter Moulder)
-
- * help2man.texi: (add) Texinfo docs for help2man
-
-Thu Jun 24 12:17:50 1999 Brendan O'Dea <bod@compusol.com.au>
-
- * help2man.PL: Add --section option (from Okuji Yoshinori). Fixes
- to option handling and inter-paragraph breaks.
-
-Thu Jun 17 19:45:08 1999 Brendan O'Dea <bod@compusol.com.au>
-
- * help2man.PL: Defer option formatting until after paragraph
- continuation handling
-
- * Makefile.in, configure.in: (add) autoconf support
- * configure, makefile.dist: (remove) autoconf support
- * README.in: Rename to README.sh (so as not to be confused with
- autoconf files)
-
-Wed Mar 24 21:47:18 1999 Brendan O'Dea <bod@compusol.com.au>
-
- * help2man.PL: Improved tagged paragraph/continuation handling
-
-Thu Feb 25 15:58:30 1999 Brendan O'Dea <bod@compusol.com.au>
-
- * README.in, help2man.aux: Add URL for distribution
- * help2man.PL: Increment revision (changes to help2man.aux)
-
-Thu Jan 21 14:46:48 1999 Brendan O'Dea <bod@compusol.com.au>
-
- * help2man.PL: Update copyright
- * makefile.dist: Add help2man.1 to `all' target
-
-Mon Jan 11 10:42:04 1999 Brendan O'Dea <bod@compusol.com.au>
-
- * help2man.PL: Handle version output with `Free' as well as `GNU'.
- Missing backslash in initial comment (from Andreas Schwab)
-
-Thu Dec 10 12:50:10 1998 Brendan O'Dea <bod@compusol.com.au>
-
- * help2man.PL: Experimental NLS version on main trunk (1.6-1.8)
- pruned, rejoined branch 1.5.1.4 as 1.6
-
- Cleaned up version format and removed François' name from
- the code (at his suggestion).
-
- * README.in: (add) Description for help2man
- * configure: (add) Dodgy configure script for help2man
- * help2man.aux: (add) Include file for help2man man page
- * makefile.dist: (add) Dodgy makefile for help2man
-
-Wed Nov 25 11:31:09 1998 Brendan O'Dea <bod@compusol.com.au>
-
- * help2man.PL: Join hyphenated lines in --version output
-
-Tue Oct 20 20:44:46 1998 Brendan O'Dea <bod@compusol.com.au>
-
- * help2man.PL: Fix strftime locale (from Akim Demaille), add
- --no-info option
-
-Tue Oct 6 10:05:20 1998 Brendan O'Dea <bod@compusol.com.au>
-
- * help2man.PL: Remove --manhelp/oneliner mechanism
-
-Sat Aug 29 04:50:02 1998 Brendan O'Dea <bod@compusol.com.au>
-
- * help2man.PL: Add --include/--opt-include options and Clark
- Morgan's --manhelp/oneliner parsing. Merged changes from Karl
- Berry.
-
-Thu Feb 26 10:38:34 1998 Brendan O'Dea <bod@compusol.com.au>
-
- * help2man.PL: Fix synopsis and revert `use version' to `require
- version' as perl5.003 doesn't grok the former
-
-Mon Feb 23 11:54:13 1998 Brendan O'Dea <bod@compusol.com.au>
-
- * help2man.PL: Add --output
-
-Fri Feb 20 15:14:22 1998 Brendan O'Dea <bod@compusol.com.au>
-
- * help2man.PL: Made self-extracting .PL for portability; Some
- enhancements to work with a2ps for Akim
-
-Thu Feb 19 10:16:58 1998 Brendan O'Dea <bod@compusol.com.au>
-
- * help2man.PL: Fix DESCRIPTION mis-spell (from Akim Demaille)
-
-Thu Jan 22 16:53:32 1998 Brendan O'Dea <bod@compusol.com.au>
-
- * help2man.PL: (add) Generate man page from a program's --version
- and --help output
diff --git a/ChangeLog b/ChangeLog
new file mode 120000
index 0000000..d526672
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1 @@
+debian/changelog
\ No newline at end of file
diff --git a/Makefile.in b/Makefile.in
index 5e2b872..b89c765 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,5 +1,5 @@
# Makefile for help2man
-# $Id: Makefile.in,v 1.5 2002/09/06 16:13:05 bod Exp $
+# $Id: Makefile.in,v 1.11 2003/07/09 11:05:40 bod Exp $
SHELL = @SHELL@
@@ -8,36 +8,52 @@ prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
+libdir = @libdir@
mandir = @mandir@
+datadir = @datadir@
infodir = @infodir@
man1dir = $(mandir)/man1
-manext = .1
+man1dir_fr = $(mandir)/fr/man1
+localedir = $(datadir)/locale
DESTDIR =
+CC = @CC@
+PERL = @PERL@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_INFO = @INSTALL_INFO@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = $(srcdir)/mkinstalldirs
-PERL = @PERL@
+MSGFMT = msgfmt
target = help2man
+hack = hacklocaledir
-all: $(target)
+basic: $(target)
+check: $(target).1
+all: basic check $(target).fr.1 info
install-strip: install
# No binaries to strip.
-install: $(target) $(target)$(manext) $(target).info
+install: $(target) $(hack).so $(target).1 $(target).fr.1 $(target).info \
+ po/fr.gmo
$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
- $(INSTALL_PROGRAM) $(target) $(DESTDIR)$(bindir)/$(target)
+ $(MKINSTALLDIRS) $(DESTDIR)$(libdir)
$(MKINSTALLDIRS) $(DESTDIR)$(man1dir)
- $(INSTALL_DATA) $(target)$(manext) \
- $(DESTDIR)$(man1dir)/$(target)$(manext)
-
+ $(MKINSTALLDIRS) $(DESTDIR)$(man1dir_fr)
+ $(MKINSTALLDIRS) $(DESTDIR)$(localedir)/fr/LC_MESSAGES
$(MKINSTALLDIRS) $(DESTDIR)$(infodir)
+
+ $(INSTALL_PROGRAM) $(target) $(DESTDIR)$(bindir)
+ $(INSTALL_PROGRAM) $(hack).so $(DESTDIR)$(libdir)
+ $(INSTALL_DATA) $(target).1 $(DESTDIR)$(man1dir)
+ $(INSTALL_DATA) $(target).fr.1 $(DESTDIR)$(man1dir_fr)/$(target).1
+ $(INSTALL_DATA) po/fr.gmo \
+ $(DESTDIR)$(localedir)/fr/LC_MESSAGES/$(target).mo
+
$(INSTALL_DATA) $(target).info $(DESTDIR)$(infodir)/$(target).info
if test -f $(DESTDIR)$(infodir)/dir; \
then \
@@ -46,7 +62,10 @@ install: $(target) $(target)$(manext) $(target).info
uninstall:
rm -f $(DESTDIR)$(bindir)/$(target) \
- $(DESTDIR)$(man1dir)/$(target)$(manext) \
+ $(DESTDIR)$(libdir)/$(hack).so \
+ $(DESTDIR)$(man1dir)/$(target).1 \
+ $(DESTDIR)$(man1dir_fr)/$(target).1 \
+ $(DESTDIR)$(localedir)/fr/LC_MESSAGES/$(target).mo \
$(DESTDIR)$(infodir)/$(target).info
if test -f $(DESTDIR)$(infodir)/dir; \
@@ -55,30 +74,45 @@ uninstall:
$(target).info; \
fi
+clean:
+ -rm -f $(target) $(hack).so
-check: $(target)$(manext)
-
-clean mostlyclean realclean:
- -rm -f $(target) $(target)$(manext)
+mostlyclean: clean
rm -f $(target).dvi $(target).aux $(target).cp $(target).cps \
$(target).fn $(target).ky $(target).log $(target).pg \
$(target).toc $(target).tp $(target).vr
-distclean: realclean
+distclean: mostlyclean
-rm -f config.cache config.log config.status Makefile
-maintainer-clean: distclean
- rm -f help2man.info
+realclean: distclean
+ -rm -f $(target).info $(target).1 $(target).fr.1 po/*.gmo
+
+maintainer-clean: realclean
+ rm -f configure
$(target): $(srcdir)/$(target).PL
-rm -f $@
$(PERL) $? --stdout >$@
chmod 555 $@
-$(target)$(manext): $(target) $(srcdir)/$(target).h2m
+$(hack).so: $(srcdir)/$(hack).c
+ $(CC) -o $@ -shared $?
+
+$(target).1: $(target) $(srcdir)/$(target).h2m
./$(target) --include=$(srcdir)/$(target).h2m \
--output=$@ ./$(target)
+$(target).fr.1: $(hack).so po/fr.gmo $(target) $(srcdir)/$(target).fr.h2m
+ LD_PRELOAD="./$(hack).so preloadable_libintl.so" \
+ TEXTDOMAIN=help2man \
+ ./$(target) --include=$(srcdir)/$(target).fr.h2m \
+ --output=$@ --locale=fr_FR@euro ./$(target)
+
+po/fr.gmo: $(srcdir)/po/fr.po
+ test -d po || mkdir po
+ $(MSGFMT) -o $@ $?
+
info: $(target).info
$(target).info: $(srcdir)/$(target).texi
$(MAKEINFO) $? -o $@
@@ -90,7 +124,7 @@ $(target).dvi: $(srcdir)/$(target).texi
Makefile: $(srcdir)/Makefile.in
./config.status
-.PHONY: all check clean distclean dvi info install mostlyclean \
+.PHONY: basic all check clean distclean dvi info install mostlyclean \
realclean uninstall
.SUFFIXES:
diff --git a/NEWS b/NEWS
index 005d4d7..4bf35a7 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+Version 1.30 July 9, 2003
+
+ * Support for localised manual pages has been added (--locale option).
+
Version 1.29 September 7, 2002
* Change info category to "GNU programming support".
diff --git a/README b/README
index f977f66..6ecc354 100644
--- a/README
+++ b/README
@@ -1,15 +1,10 @@
- README for GNU help2man
-
- version 1.29
-
- September 7, 2002
-
+ README for GNU help2man version 1.31
help2man is a script to create simple man pages from the --help and
--version output of programs.
http://www.gnu.org/software/help2man/
- ftp://ftp.gnu.org/gnu/help2man/help2man-1.29.tar.gz
+ ftp://ftp.gnu.org/gnu/help2man/help2man-help2man (1.31.1) unstable; urgency=low.tar.gz
Since most GNU documentation is now in info format, this provides a
way to generate a placeholder man page pointing to that resource while
diff --git a/THANKS b/THANKS
index 64173f4..eacec11 100644
--- a/THANKS
+++ b/THANKS
@@ -2,6 +2,7 @@ A list of people who have contributed to the development of `help2man'
by reporting problems, suggesting various improvements or submitting
actual code follows.
+Denis Barbier <barbier@debian.org>
Karl Berry <karl@freefriends.org>
Paolo Bonzini <bonzini@gnu.org>
Mo DeJong <mdejong@cygnus.com>
@@ -9,7 +10,7 @@ Akim Demaille <demaille@inf.enst.fr>
Paul Eggert <eggert@twinsun.com>
Roland Huebner <rh@pelikan.cologne.de>
Matt Kraai <kraai@alumni.carnegiemellon.edu>
-Jim Meyering <meyering@ascend.com>
+Jim Meyering <jim@meyering.net>
Dave Morrison <dave@bnl.gov>
Peter Moulder <reiter@netspace.net.au>
François Pinard <pinard@iro.umontreal.ca>
diff --git a/configure b/configure
index bf78fde..c83fd0a 100755
--- a/configure
+++ b/configure
@@ -551,6 +551,228 @@ else
fi
test -z "$PERL" && { echo "configure: error: perl 5.005 required" 1>&2; exit 1; }
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:558: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="gcc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:588: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_prog_rejected=no
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# -gt 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ set dummy "$ac_dir/$ac_word" "$@"
+ shift
+ ac_cv_prog_CC="$@"
+ fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test -z "$CC"; then
+ case "`uname -s`" in
+ *win32* | *WIN32*)
+ # Extract the first word of "cl", so it can be a program name with args.
+set dummy cl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:639: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="cl"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+ ;;
+ esac
+ fi
+ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:671: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 682 "configure"
+#include "confdefs.h"
+
+main(){return(0);}
+EOF
+if { (eval echo configure:687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ ac_cv_prog_cc_works=yes
+ # If we can't run a trivial program, we are probably using a cross compiler.
+ if (./conftest; exit) 2>/dev/null; then
+ ac_cv_prog_cc_cross=no
+ else
+ ac_cv_prog_cc_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:713: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:718: checking whether we are using GNU C" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gcc=yes
+else
+ ac_cv_prog_gcc=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+
+ac_test_CFLAGS="${CFLAGS+set}"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=
+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:746: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_g=yes
+else
+ ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
if test -f $ac_dir/install-sh; then
@@ -582,7 +804,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:586: checking for a BSD compatible install" >&5
+echo "configure:808: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -637,7 +859,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
# Extract the first word of "makeinfo", so it can be a program name with args.
set dummy makeinfo; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:641: checking for $ac_word" >&5
+echo "configure:863: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MAKEINFO'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -672,7 +894,7 @@ fi
# Extract the first word of "install-info", so it can be a program name with args.
set dummy install-info; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:676: checking for $ac_word" >&5
+echo "configure:898: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_INSTALL_INFO'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -852,6 +1074,7 @@ s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
s%@PERL@%$PERL%g
+s%@CC@%$CC%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
diff --git a/configure.in b/configure.in
index e1da891..c90e56b 100644
--- a/configure.in
+++ b/configure.in
@@ -1,9 +1,10 @@
dnl Process this file with autoconf to produce a configure script.
-dnl $Id: configure.in,v 1.4 2001/12/03 07:32:05 bod Exp $
+dnl $Id: configure.in,v 1.5 2003/07/08 15:25:57 bod Exp $
AC_INIT(help2man.PL)
AC_PROG_PERL(5.005)
test -z "$PERL" && AC_MSG_ERROR([perl 5.005 required])
+AC_PROG_CC
AC_PROG_INSTALL
AC_PATH_PROG(MAKEINFO, makeinfo)
AC_PATH_PROG(INSTALL_INFO, install-info)
diff --git a/debian/README b/debian/README
new file mode 100644
index 0000000..b7afaea
--- /dev/null
+++ b/debian/README
@@ -0,0 +1,4 @@
+An example --include file. This is used to create help2man's own man
+page:
+
+ $ help2man --include=help2man.h2m help2man
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..70fe553
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,232 @@
+help2man (1.31.1) unstable; urgency=low
+
+ * Oops, might help to actually *install* the message catalog.
+ * Check for errors writing output (suggested by Jim Meyering).
+ * Work around an odd regex bug under perl 5.6+ where /^ {0}(\S.*)\n/
+ doesn't match correctly.
+
+ -- Brendan O'Dea <bod@debian.org> Wed, 9 Jul 2003 20:20:02 +1000
+
+help2man (1.30.1) unstable; urgency=low
+
+ * Add support for localised manual pages (closes #183671). Many
+ thanks to Denis Barbier for patches, advice and French
+ translations.
+
+ * Import RCS files to CVS.
+ * Convert to native Debian package.
+
+ -- Brendan O'Dea <bod@debian.org> Tue, 8 Jul 2003 23:57:44 +1000
+
+Sat Sep 7 02:13:05 2002 Brendan O'Dea <bod@debian.org>
+
+ * help2man.texi: Change @dircategory to "GNU programming support"
+ (Karl Berry). Change @setchapternewpage to "on" (Peter Moulder).
+
+ * Makefile.in: Added some more GNU standard targets (Peter
+ Moulder).
+
+ * Makefile.in, help2man.h2m: Rename help2man.aux to .h2m to avoid
+ clashing with tex.
+
+ * help2man.PL: version bump
+
+Tue Jun 4 00:53:18 2002 Brendan O'Dea <bod@debian.org>
+
+ * help2man.PL: Expand copyright years (Paul Eggert). Provide
+ --info-page option (Bonzini).
+
+ * README.sh: hrm, different awk...
+
+Tue Mar 19 23:52:37 2002 Brendan O'Dea <bod@debian.org>
+
+ * help2man.PL: Allow short and long options to be separated by
+ multiple spaces (Paul Eggert).
+
+Sat Mar 9 23:54:01 2002 Brendan O'Dea <bod@debian.org>
+
+ * help2man.PL: version bump for doc changes
+ * help2man.texi: Add --help recommendations from Karl Berry (& co.)
+
+Mon Dec 3 19:02:26 2001 Brendan O'Dea <bod@debian.org>
+
+ * README.sh: Change email address
+ * configure.in: Require perl 5.005
+ * help2man.PL, help2man.texi: Add --source, --manual, --help-option
+ and --version-option; change email address; update copyright
+
+Fri Dec 22 23:17:11 2000 Brendan O'Dea <bod@compusol.com.au>
+
+ * help2man.PL: Process options given in the block before the first
+ section of an include file (suggested by Akim Demaille).
+
+ * help2man.aux: Document option parsing of initial include file
+ segment.
+
+ * help2man.texi: Use @pxref rather than @xref (Karl Berry).
+ Document option parsing of initial include file segment.
+
+Tue Oct 31 17:07:30 2000 Brendan O'Dea <bod@compusol.com.au>
+
+ * help2man.PL: Add protection for leading apostrophes (reported by
+ Matt Kraai). Don't zero-pad version.
+
+Fri Jul 7 16:16:18 2000 Brendan O'Dea <bod@compusol.com.au>
+
+ * README.sh: Add GNU prefix
+ * aclocal.m4: (add) autoconf support
+ * configure.in: Use AC_PROG_PERL from aclocal.m4 to find perl
+ (checks for perl and perl5)
+
+ * help2man.PL: Add GNU prefix, bug reporting address
+ * help2man.aux: Remove ozemail URL
+ * help2man.texi: Add GNU prefix, bug reporting address. Remove
+ ozemail URL
+
+Sun Apr 16 00:18:41 2000 Brendan O'Dea <bod@compusol.com.au>
+
+ * Makefile.in: Add mkinstalldirs (as reqested by Dave Morrison,
+ Patrick Tullmann and Mo DeJong)
+
+ * help2man.PL: Version bump
+
+Thu Dec 30 01:29:12 1999 Brendan O'Dea <bod@compusol.com.au>
+
+ * help2man.texi: Correct typo
+
+Thu Nov 11 03:16:25 1999 Brendan O'Dea <bod@compusol.com.au>
+
+ * help2man.PL: Remove directories from synopsis
+
+Wed Nov 3 17:39:50 1999 Brendan O'Dea <bod@compusol.com.au>
+
+ * help2man.PL: Revise tagged paragraph matching *again*
+
+Mon Nov 1 21:50:36 1999 Brendan O'Dea <bod@compusol.com.au>
+
+ * help2man.PL: Allow multiple synopsis entries (w/- `or:'). Single
+ options may have argument w/- `='.
+
+ * help2man.texi: Add /pattern/
+ * configure.in: Add MAKEINFO/INSTALL_INFO
+ * Makefile.in: Install help2man.info
+
+Wed Oct 27 16:02:00 1999 Brendan O'Dea <bod@compusol.com.au>
+
+ * help2man.PL: Allow --include to be specified multiple times. Add
+ /pattern/.
+
+ * help2man.aux: Document /pattern/ syntax
+
+Mon Oct 25 22:36:16 1999 Brendan O'Dea <bod@compusol.com.au>
+
+ * help2man.PL: Fix odd /^x|^y/ pre-5.005 perl bug. Split tagged
+ paragraph logic into option/other. Protect leading periods in
+ continuation lines.
+
+ * THANKS to Roland Huebner for extensive bug report.
+ * Add NEWS file
+
+Tue Oct 12 16:25:23 1999 Brendan O'Dea <bod@compusol.com.au>
+
+ * help2man.PL: Protect leading dots (1.14: not released)
+
+ * README.sh, help2man.aux: Add ftp.gnu.org URL
+ * help2man.PL: Allow fixed-pitch examples where prefixed by $,
+ % or > (for Akim)
+
+Thu Sep 2 19:43:02 1999 Brendan O'Dea <bod@compusol.com.au>
+
+ * help2man.PL: Fix typo in --help (Jim Meyering)
+ Escape backslashes (Andreas Schwab/Peter Moulder)
+
+ * help2man.texi: (add) Texinfo docs for help2man
+
+Thu Jun 24 12:17:50 1999 Brendan O'Dea <bod@compusol.com.au>
+
+ * help2man.PL: Add --section option (from Okuji Yoshinori). Fixes
+ to option handling and inter-paragraph breaks.
+
+Thu Jun 17 19:45:08 1999 Brendan O'Dea <bod@compusol.com.au>
+
+ * help2man.PL: Defer option formatting until after paragraph
+ continuation handling
+
+ * Makefile.in, configure.in: (add) autoconf support
+ * configure, makefile.dist: (remove) autoconf support
+ * README.in: Rename to README.sh (so as not to be confused with
+ autoconf files)
+
+Wed Mar 24 21:47:18 1999 Brendan O'Dea <bod@compusol.com.au>
+
+ * help2man.PL: Improved tagged paragraph/continuation handling
+
+Thu Feb 25 15:58:30 1999 Brendan O'Dea <bod@compusol.com.au>
+
+ * README.in, help2man.aux: Add URL for distribution
+ * help2man.PL: Increment revision (changes to help2man.aux)
+
+Thu Jan 21 14:46:48 1999 Brendan O'Dea <bod@compusol.com.au>
+
+ * help2man.PL: Update copyright
+ * makefile.dist: Add help2man.1 to `all' target
+
+Mon Jan 11 10:42:04 1999 Brendan O'Dea <bod@compusol.com.au>
+
+ * help2man.PL: Handle version output with `Free' as well as `GNU'.
+ Missing backslash in initial comment (from Andreas Schwab)
+
+Thu Dec 10 12:50:10 1998 Brendan O'Dea <bod@compusol.com.au>
+
+ * help2man.PL: Experimental NLS version on main trunk (1.6-1.8)
+ pruned, rejoined branch 1.5.1.4 as 1.6
+
+ Cleaned up version format and removed François' name from
+ the code (at his suggestion).
+
+ * README.in: (add) Description for help2man
+ * configure: (add) Dodgy configure script for help2man
+ * help2man.aux: (add) Include file for help2man man page
+ * makefile.dist: (add) Dodgy makefile for help2man
+
+Wed Nov 25 11:31:09 1998 Brendan O'Dea <bod@compusol.com.au>
+
+ * help2man.PL: Join hyphenated lines in --version output
+
+Tue Oct 20 20:44:46 1998 Brendan O'Dea <bod@compusol.com.au>
+
+ * help2man.PL: Fix strftime locale (from Akim Demaille), add
+ --no-info option
+
+Tue Oct 6 10:05:20 1998 Brendan O'Dea <bod@compusol.com.au>
+
+ * help2man.PL: Remove --manhelp/oneliner mechanism
+
+Sat Aug 29 04:50:02 1998 Brendan O'Dea <bod@compusol.com.au>
+
+ * help2man.PL: Add --include/--opt-include options and Clark
+ Morgan's --manhelp/oneliner parsing. Merged changes from Karl
+ Berry.
+
+Thu Feb 26 10:38:34 1998 Brendan O'Dea <bod@compusol.com.au>
+
+ * help2man.PL: Fix synopsis and revert `use version' to `require
+ version' as perl5.003 doesn't grok the former
+
+Mon Feb 23 11:54:13 1998 Brendan O'Dea <bod@compusol.com.au>
+
+ * help2man.PL: Add --output
+
+Fri Feb 20 15:14:22 1998 Brendan O'Dea <bod@compusol.com.au>
+
+ * help2man.PL: Made self-extracting .PL for portability; Some
+ enhancements to work with a2ps for Akim
+
+Thu Feb 19 10:16:58 1998 Brendan O'Dea <bod@compusol.com.au>
+
+ * help2man.PL: Fix DESCRIPTION mis-spell (from Akim Demaille)
+
+Thu Jan 22 16:53:32 1998 Brendan O'Dea <bod@compusol.com.au>
+
+ * help2man.PL: (add) Generate man page from a program's --version
+ and --help output
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..1c9714c
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,18 @@
+Source: help2man
+Section: devel
+Priority: optional
+Maintainer: Brendan O'Dea <bod@debian.org>
+Standards-Version: 3.5.1
+Build-Depends: perl (>= 5.6.0-18), debhelper (>= 3.0.5), gettext, liblocale-gettext-perl
+
+Package: help2man
+Architecture: all
+Depends: ${perl:Depends}
+Recommends: gettext, liblocale-gettext-perl
+Description: Automatic manpage generator
+ Program to create simple man pages from the --help and
+ --version output of other programs.
+ .
+ Since most GNU documentation is now in info format, this provides a
+ way to generate a placeholder man page pointing to that resource while
+ still providing some useful information.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..8b87c8c
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,18 @@
+Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
+Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+Written by Brendan O'Dea <bod@debian.org>
+
+help2man is licenced under the terms of the GNU General Public License (GPL)
+version 2 or later, as published by the Free Software Foundation.
+
+On Debian GNU/Linux systems, the text of the GPL can be found in
+/usr/share/common-licenses/GPL.
+
+It may be downloaded from:
+
+ http://packages.debian.org/unstable/devel/help2man.html or
+ ftp://ftp.gnu.org/gnu/help2man/
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..7f879e1
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1 @@
+NEWS README THANKS
diff --git a/debian/examples b/debian/examples
new file mode 100644
index 0000000..563acea
--- /dev/null
+++ b/debian/examples
@@ -0,0 +1 @@
+debian/README help2man.h2m
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..d5acbbf
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,93 @@
+#!/usr/bin/make -f
+#-*- makefile -*-
+# Made with the aid of dh_make, by Craig Small
+# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
+# Some lines taken from debmake, by Christoph Lameter.
+
+SHELL=/bin/bash
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+build: build-stamp
+build-stamp:
+ dh_testdir
+ ./configure --prefix=/usr --mandir='$${prefix}/share/man' \
+ --infodir='$${prefix}/share/info'
+
+ $(MAKE)
+ touch build-stamp
+
+clean:
+ test README -nt help2man.PL # maintainer sanity check
+ dh_testdir
+ dh_testroot
+ -$(MAKE) distclean
+ rm -f build-stamp install-stamp
+ dh_clean
+
+install: install-stamp
+install-stamp: build-stamp
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
+ touch install-stamp
+
+# Build architecture-independent files here.
+binary-indep: build install
+ dh_testdir
+ dh_testroot
+ dh_installdocs
+ dh_installinfo
+ dh_installexamples
+ dh_installchangelogs
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_perl -V
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# Build architecture-dependent files here.
+binary-arch: build install
+# We have nothing to do by default.
+
+source diff:
+ @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+
+# maintainer pre-release setup
+AM = COPYING INSTALL install-sh mkinstalldirs
+maint-prep:
+ cp $(addprefix /usr/share/automake/,$(AM)) .
+ export ver=`./help2man.PL --version`; \
+ export debver=`perl -ne '/[^(]*\(([^)]*)/ and print $1; exit' debian/changelog`; \
+ (echo " README for GNU help2man version $$ver"; \
+ echo; \
+ echo "help2man is a script to create simple man pages from the --help and"; \
+ echo "--version output of programs."; \
+ echo ""; \
+ echo " http://www.gnu.org/software/help2man/"; \
+ echo " ftp://ftp.gnu.org/gnu/help2man/help2man-$$debver.tar.gz"; \
+ echo ""; \
+ echo "Since most GNU documentation is now in info format, this provides a"; \
+ echo "way to generate a placeholder man page pointing to that resource while"; \
+ echo "still providing some useful information."; \
+ echo ""; \
+ echo "-- "; \
+ echo "Brendan O'Dea <bod@debian.org>") >README
+ ln -sf debian/changelog ChangeLog
+ autoconf
+ configure
+ $(MAKE) all distclean
+
+maint-clean: maint-prep
+ configure
+ $(MAKE) maintainer-clean
+ rm -f README ChangeLog $(AM)
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary maint-prep maint-clean
diff --git a/hacklocaledir.c b/hacklocaledir.c
new file mode 100644
index 0000000..25e40f6
--- /dev/null
+++ b/hacklocaledir.c
@@ -0,0 +1,113 @@
+/*
+ * Nasty preload hack to allow message catalogs to be read from the "po"
+ * subdir of the build tree.
+ *
+ * export LD_PRELOAD="hacklocaledir.so preloadable_libintl.so"
+ * export TEXTDOMAIN=program
+ */
+
+#define _GNU_SOURCE
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
+#include <dlfcn.h>
+
+#define PRELOAD "hacklocaledir.so"
+
+static void *xmalloc(size_t len)
+{
+ void *r = malloc(len);
+ if (!r)
+ {
+ fprintf(stderr, PRELOAD ": can't malloc %d bytes (%s)\n", len,
+ strerror(errno));
+ exit(1);
+ }
+
+ return r;
+}
+
+int __open(char const *path, int flags, mode_t mode)
+{
+ static int (*open)(char const *, int, mode_t) = 0;
+ static char const *textdomain = 0;
+ static char const *localedir = 0;
+ static size_t localedirlen;
+ static char *match = 0;
+ static size_t matchlen;
+ char *newpath = 0;
+ int r;
+
+ if (!open && !(open = dlsym(RTLD_NEXT, "open")))
+ {
+ fprintf(stderr, PRELOAD ": can't find open(): %s\n", dlerror());
+ return -1;
+ }
+
+ if (textdomain || (textdomain = getenv("TEXTDOMAIN")))
+ {
+ size_t pathlen = strlen(path);
+ char const *check;
+
+ if (!localedir)
+ {
+ if (!(localedir = getenv("LOCALEDIR")))
+ localedir = "po";
+
+ localedirlen = strlen(localedir);
+ }
+
+ if (!match)
+ {
+ matchlen = sizeof("/LC_MESSAGES/")-1 + strlen(textdomain)
+ + sizeof(".mo")-1;
+
+ match = xmalloc(matchlen + 1);
+ strcpy(match, "/LC_MESSAGES/");
+ strcat(match, textdomain);
+ strcat(match, ".mo");
+ }
+
+ if (*path == '/' && pathlen > matchlen &&
+ !strcmp(check = (path + pathlen - matchlen), match))
+ {
+ char const *p = path;
+ char const *locale = 0;
+ do {
+ locale = p + 1;
+ p = strchr(locale, '/');
+ } while (p && p < check);
+
+ if (locale)
+ {
+ size_t len = strcspn(locale, "/");
+ newpath = xmalloc(localedirlen + 1 + len + sizeof(".gmo"));
+ strcpy(newpath, localedir);
+ strcat(newpath, "/");
+ strncat(newpath, locale, len);
+ strcat(newpath, ".gmo");
+
+ if (access(newpath, R_OK))
+ {
+ free(newpath);
+ newpath = 0;
+ }
+ }
+ }
+ }
+
+ r = (*open)(newpath ? newpath : path, flags, mode);
+ if (newpath)
+ {
+ fprintf(stderr, "note: mapped %s to %s\n", path, newpath);
+ free(newpath);
+ }
+
+ return r;
+}
+
+int open(char const *path, int flags, mode_t mode)
+ __attribute__((weak, alias("__open")));
diff --git a/help2man.1 b/help2man.1
new file mode 100644
index 0000000..c8615b7
--- /dev/null
+++ b/help2man.1
@@ -0,0 +1,139 @@
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.31.
+.TH HELP2MAN "1" "July 2003" "help2man 1.31" "User Commands"
+.SH NAME
+help2man \- generate a simple manual page
+.SH SYNOPSIS
+.B help2man
+[\fIOPTION\fR]... \fIEXECUTABLE\fR
+.SH DESCRIPTION
+`help2man' generates a man page out of `--help' and `--version' output.
+.TP
+\fB\-n\fR, \fB\-\-name\fR=\fISTRING\fR
+description for the NAME paragraph
+.TP
+\fB\-s\fR, \fB\-\-section\fR=\fISECTION\fR
+section number for manual page (1, 6, 8)
+.TP
+\fB\-m\fR, \fB\-\-manual\fR=\fITEXT\fR
+name of manual (User Commands, ...)
+.TP
+\fB\-S\fR, \fB\-\-source\fR=\fITEXT\fR
+source of program (FSF, Debian, ...)
+.TP
+\fB\-L\fR, \fB\-\-locale\fR=\fISTRING\fR
+select locale (default "C")
+.TP
+\fB\-i\fR, \fB\-\-include\fR=\fIFILE\fR
+include material from `FILE'
+.TP
+\fB\-I\fR, \fB\-\-opt\-include\fR=\fIFILE\fR
+include material from `FILE' if it exists
+.TP
+\fB\-o\fR, \fB\-\-output\fR=\fIFILE\fR
+send output to `FILE'
+.TP
+\fB\-p\fR, \fB\-\-info\-page\fR=\fITEXT\fR
+name of Texinfo manual
+.TP
+\fB\-N\fR, \fB\-\-no\-info\fR
+suppress pointer to Texinfo manual
+.TP
+\fB\-\-help\fR
+print this help, then exit
+.TP
+\fB\-\-version\fR
+print version number, then exit
+.PP
+EXECUTABLE should accept `--help' and `--version' options although
+alternatives may be specified using:
+.TP
+\fB\-h\fR, \fB\-\-help\-option\fR=\fISTRING\fR
+help option string
+.TP
+\fB\-v\fR, \fB\-\-version\-option\fR=\fISTRING\fR
+version option string
+.SH "INCLUDE FILES"
+Additional material may be included in the generated output with the
+.B \-\-include
+and
+.B \-\-opt\-include
+options. The format is simple:
+
+ [section]
+ text
+
+ /pattern/
+ text
+
+Blocks of verbatim *roff text are inserted into the output either at
+the start of the given
+.BI [ section ]
+(case insensitive), or after a paragraph matching
+.BI / pattern /\fR.
+
+Patterns use the Perl regular expression syntax and may be followed by
+the
+.IR i ,
+.I s
+or
+.I m
+modifiers (see
+.BR perlre (1)).
+
+Lines before the first section or pattern which begin with `\-' are
+processed as options. Anything else is silently ignored and may be
+used for comments, RCS keywords and the like.
+
+The section output order is:
+
+ NAME
+ SYNOPSIS
+ DESCRIPTION
+ OPTIONS
+ EXAMPLES
+ \fIother\fR
+ AUTHOR
+ REPORTING BUGS
+ COPYRIGHT
+ SEE ALSO
+
+Any
+.B [name]
+or
+.B [synopsis]
+sections appearing in the include file will replace what would have
+automatically been produced (although you can still override the
+former with
+.B --name
+if required).
+
+Other sections are prepended to the automatically produced output for
+the standard sections given above, or included at
+.I other
+(above) in the order they were encountered in the include file.
+.SH AVAILABILITY
+The latest version of this distribution is available on-line from:
+
+ ftp://ftp.gnu.org/gnu/help2man/
+.SH AUTHOR
+Written by Brendan O'Dea <bod@debian.org>
+.SH "REPORTING BUGS"
+Report bugs to <bug-help2man@gnu.org>.
+.SH COPYRIGHT
+Copyright \(co 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
+Foundation, Inc.
+.br
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+.SH "SEE ALSO"
+The full documentation for
+.B help2man
+is maintained as a Texinfo manual. If the
+.B info
+and
+.B help2man
+programs are properly installed at your site, the command
+.IP
+.B info help2man
+.PP
+should give you access to the complete manual.
diff --git a/help2man.PL b/help2man.PL
index 8f43747..fdd6304 100755
--- a/help2man.PL
+++ b/help2man.PL
@@ -16,7 +16,7 @@ use Config;
use Getopt::Long;
my ($program, $version)
- = (qw$Id: help2man.PL,v 1.29 2002/09/06 15:48:31 bod Exp $)[1..2];
+ = (qw$Id: help2man.PL,v 1.31 2003/07/09 10:26:23 bod Exp $)[1..2];
$program =~ s/\.PL(,v)?$//;
@@ -59,7 +59,7 @@ eval 'exec $Config{perlpath} -wS \$0 \${1+"\$@"}'
print OUT <<'!NO!SUBS!';
# Generate a short man page from --help and --version output.
-# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software
+# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
# Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -83,7 +83,8 @@ use 5.005;
use strict;
use Getopt::Long;
use Text::Tabs qw(expand);
-use POSIX qw(strftime setlocale LC_TIME);
+use POSIX qw(strftime setlocale LC_ALL);
+use locale;
!NO!SUBS!
@@ -95,25 +96,59 @@ my \$this_version = '$version';
# No substitutions for the remainder of the script:
print OUT <<'!NO!SUBS!';
-my $version_info = <<EOT;
-GNU $this_program $this_version
-Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+my $have_gettext;
+BEGIN {
+ eval {
+ require Locale::gettext;
+ Locale::gettext->import;
+ $have_gettext = 1;
+ };
+
+ unless ($have_gettext)
+ {
+ *gettext = sub { $_[0] };
+ *textdomain = sub {};
+ }
+}
+
+sub _ { gettext @_ }
+sub N_ { $_[0] }
+
+textdomain $this_program;
+{
+ my ($user_locale) = grep defined && length,
+ (map $ENV{$_}, qw(LANGUAGE LC_ALL LC_MESSAGES LANG)), 'C';
+
+ sub kark # die with message formatted in the invoking user's locale
+ {
+ setlocale LC_ALL, $user_locale;
+ my $fmt = gettext shift;
+ die +(sprintf $fmt, @_), "\n";
+ }
+}
+
+my $version_info = sprintf _(<<'EOT'), $this_program, $this_version;
+GNU %s %s
+
+Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
+Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-Written by Brendan O'Dea <bod\@debian.org>
+Written by Brendan O'Dea <bod@debian.org>
EOT
-my $help_info = <<EOT;
-`$this_program' generates a man page out of `--help' and `--version' output.
+my $help_info = sprintf _(<<'EOT'), $this_program, $this_program;
+`%s' generates a man page out of `--help' and `--version' output.
-Usage: $this_program [OPTION]... EXECUTABLE
+Usage: %s [OPTION]... EXECUTABLE
-n, --name=STRING description for the NAME paragraph
-s, --section=SECTION section number for manual page (1, 6, 8)
-m, --manual=TEXT name of manual (User Commands, ...)
-S, --source=TEXT source of program (FSF, Debian, ...)
+ -L, --locale=STRING select locale (default "C")
-i, --include=FILE include material from `FILE'
-I, --opt-include=FILE include material from `FILE' if it exists
-o, --output=FILE send output to `FILE'
@@ -128,12 +163,13 @@ alternatives may be specified using:
-h, --help-option=STRING help option string
-v, --version-option=STRING version option string
-Report bugs to <bug-help2man\@gnu.org>.
+Report bugs to <bug-help2man@gnu.org>.
EOT
my $section = 1;
my $manual = '';
my $source = '';
+my $locale = 'C';
my $help_option = '--help';
my $version_option = '--version';
my ($opt_name, @opt_include, $opt_output, $opt_info, $opt_no_info);
@@ -143,6 +179,7 @@ my %opt_def = (
's|section=s' => \$section,
'm|manual=s' => \$manual,
'S|source=s' => \$source,
+ 'L|locale=s' => \$locale,
'i|include=s' => sub { push @opt_include, [ pop, 1 ] },
'I|opt-include=s' => sub { push @opt_include, [ pop, 0 ] },
'o|output=s' => \$opt_output,
@@ -161,6 +198,13 @@ GetOptions (%opt_def,
die $help_info unless @ARGV == 1;
+die "$this_program: no locale support (Locale::gettext required)\n"
+ unless $locale eq 'C' or $have_gettext;
+
+# Set localisation of date and executable's ouput.
+delete @ENV{qw(LANGUAGE LC_MESSAGES LANG)};
+setlocale LC_ALL, $ENV{LC_ALL} = $locale;
+
my %include = ();
my %append = ();
my @include = (); # retain order given in include file
@@ -181,7 +225,7 @@ while (@opt_include)
my ($inc, $required) = @{shift @opt_include};
next unless -f $inc or $required;
- die "$this_program: can't open `$inc' ($!)\n"
+ kark N_("%s: can't open `%s' (%s)"), $this_program, $inc, $!
unless open INC, $inc;
my $key;
@@ -238,8 +282,8 @@ while (@opt_include)
close INC;
- die "$this_program: no valid information found in `$inc'\n"
- unless $key;
+ kark N_("%s: no valid information found in `%s'"), $this_program, $inc
+ unless $key;
}
# Compress trailing blank lines.
@@ -248,16 +292,11 @@ for my $hash (\(%include, %append))
for (keys %$hash) { $hash->{$_} =~ s/\n+$/\n/ }
}
-# Turn off localisation of executable's ouput.
-@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
-
-# Turn off localisation of date (for strftime).
-setlocale LC_TIME, 'C';
-
# Grab help and version info from executable.
my ($help_text, $version_text) = map {
join '', map { s/ +$//; expand $_ } `$ARGV[0] $_ 2>/dev/null`
- or die "$this_program: can't get `$_' info from $ARGV[0]\n"
+ or kark N_("%s: can't get `%s' info from %s"), $this_program,
+ $_, $ARGV[0]
} $help_option, $version_option;
my $date = strftime "%B %Y", localtime;
@@ -267,12 +306,11 @@ my $version;
if ($opt_output)
{
- unlink $opt_output
- or die "$this_program: can't unlink $opt_output ($!)\n"
- if -e $opt_output;
+ unlink $opt_output or kark N_("%s: can't unlink %s (%s)"),
+ $this_program, $opt_output, $! if -e $opt_output;
open STDOUT, ">$opt_output"
- or die "$this_program: can't create $opt_output ($!)\n";
+ or kark N_("%s: can't create %s (%s)"), $this_program, $opt_output, $!;
}
# The first line of the --version information is assumed to be in one
@@ -312,10 +350,11 @@ $program =~ s!.*/!!;
$opt_no_info = 1 if $program eq 'info';
# --name overrides --include contents.
-$include{NAME} = "$program \\- $opt_name\n" if $opt_name;
+$include{_('NAME')} = "$program \\- $opt_name\n" if $opt_name;
# Default (useless) NAME paragraph.
-$include{NAME} ||= "$program \\- manual page for $program $version\n";
+$include{_('NAME')} ||= sprintf _("%s \\- manual page for %s %s") . "\n",
+ $program, $program, $version;
# Man pages traditionally have the page title in caps.
my $PROGRAM = uc $program;
@@ -326,21 +365,23 @@ unless ($manual)
{
for ($section)
{
- if (/^(1[Mm]|8)/) { $manual = 'System Administration Utilities' }
- elsif (/^6/) { $manual = 'Games' }
- else { $manual = 'User Commands' }
+ if (/^(1[Mm]|8)/) { $manual = _('System Administration Utilities') }
+ elsif (/^6/) { $manual = _('Games') }
+ else { $manual = _('User Commands') }
}
}
+my $or = _('or'); # usage continuation
+
# Extract usage clause(s) [if any] for SYNOPSIS.
-if ($help_text =~ s/^Usage:( +(\S+))(.*)((?:\n(?: {6}\1| *or: +\S).*)*)//m)
+if ($help_text =~ s/^Usage:( +(\S+))(.*)((?:\n(?: {6}\1| *($or): +\S).*)*)//m)
{
my @syn = $2 . $3;
if ($_ = $4)
{
s/^\n//;
- for (split /\n/) { s/^ *(or: +)?//; push @syn, $_ }
+ for (split /\n/) { s/^ *(($or): +)?//; push @syn, $_ }
}
my $synopsis = '';
@@ -363,11 +404,11 @@ if ($help_text =~ s/^Usage:( +(\S+))(.*)((?:\n(?: {6}\1| *or: +\S).*)*)//m)
$synopsis .= "$_\n";
}
- $include{SYNOPSIS} ||= $synopsis;
+ $include{_('SYNOPSIS')} ||= $synopsis;
}
# Process text, initial section is DESCRIPTION.
-my $sect = 'DESCRIPTION';
+my $sect = _('DESCRIPTION');
$_ = "$help_text\n\n$version_text";
# Normalise paragraph breaks.
@@ -381,24 +422,35 @@ s/^\./\x80/mg;
s/^'/\x81/mg;
s/\\/\x82/g;
+my $PAT_BUGS = _('Report +bugs|Email +bug +reports +to');
+my $PAT_AUTHOR = _('Written +by');
+my $PAT_OPTIONS = _('Options');
+my $PAT_EXAMPLES = _('Examples');
+my $PAT_FREE_SOFTWARE = _('This +is +free +software');
+
# Start a new paragraph (if required) for these.
-s/([^\n])\n(Report +bugs|Email +bug +reports +to|Written +by)/$1\n\n$2/g;
+s/([^\n])\n($PAT_BUGS|$PAT_AUTHOR)/$1\n\n$2/og;
sub convert_option;
while (length)
{
# Convert some standard paragraph names.
- if (s/^(Options|Examples): *\n//)
+ if (s/^($PAT_OPTIONS): *\n//o)
{
- $sect = uc $1;
+ $sect = _('OPTIONS');
+ next;
+ }
+ elsif (s/^($PAT_EXAMPLES): *\n//o)
+ {
+ $sect = _('EXAMPLES');
next;
}
# Copyright section
if (/^Copyright +[(\xa9]/)
{
- $sect = 'COPYRIGHT';
+ $sect = _('COPYRIGHT');
$include{$sect} ||= '';
$include{$sect} .= ".PP\n" if $include{$sect};
@@ -416,7 +468,7 @@ while (length)
# Insert line breaks before additional copyright messages
# and the disclaimer.
- s/(.)\n(Copyright |This +is +free +software)/$1\n.br\n$2/g;
+ s/(.)\n(Copyright |$PAT_FREE_SOFTWARE)/$1\n.br\n$2/go;
# Join hyphenated lines.
s/([A-Za-z])-\n */$1/g;
@@ -428,15 +480,15 @@ while (length)
}
# Catch bug report text.
- if (/^(Report +bugs|Email +bug +reports +to) /)
+ if (/^($PAT_BUGS) /o)
{
- $sect = 'REPORTING BUGS';
+ $sect = _('REPORTING BUGS');
}
# Author section.
- elsif (/^Written +by/)
+ elsif (/^($PAT_AUTHOR)/)
{
- $sect = 'AUTHOR';
+ $sect = _('AUTHOR');
}
# Examples, indicated by an indented leading $, % or > are
@@ -516,7 +568,7 @@ while (length)
}
# Append continuations.
- while (s/^ {$indent}(\S.*)\n//)
+ while ($indent ? s/^ {$indent}(\S.*)\n// : s/^(\S.*)\n//)
{
$matched .= $& if %append;
$content .= "\x83$1\n"
@@ -557,19 +609,19 @@ unless ($opt_no_info)
{
my $info_page = $opt_info || $program;
- $sect = 'SEE ALSO';
+ $sect = _('SEE ALSO');
$include{$sect} ||= '';
$include{$sect} .= ".PP\n" if $include{$sect};
- $include{$sect} .= <<EOT;
+ $include{$sect} .= sprintf _(<<'EOT'), $program, $info_page, $info_page;
The full documentation for
-.B $program
+.B %s
is maintained as a Texinfo manual. If the
.B info
and
-.B $program
+.B %s
programs are properly installed at your site, the command
.IP
-.B info $info_page
+.B info %s
.PP
should give you access to the complete manual.
EOT
@@ -582,29 +634,39 @@ print <<EOT;
EOT
# Section ordering.
-my @pre = qw(NAME SYNOPSIS DESCRIPTION OPTIONS EXAMPLES);
-my @post = ('AUTHOR', 'REPORTING BUGS', 'COPYRIGHT', 'SEE ALSO');
+my @pre = (_('NAME'), _('SYNOPSIS'), _('DESCRIPTION'), _('OPTIONS'),
+ _('EXAMPLES'));
+
+my @post = (_('AUTHOR'), _('REPORTING BUGS'), _('COPYRIGHT'), _('SEE ALSO'));
my $filter = join '|', @pre, @post;
# Output content.
-for (@pre, (grep ! /^($filter)$/o, @include), @post)
+for my $sect (@pre, (grep ! /^($filter)$/o, @include), @post)
{
- if ($include{$_})
+ if ($include{$sect})
{
- my $quote = /\W/ ? '"' : '';
- print ".SH $quote$_$quote\n";
-
- for ($include{$_})
+ my $lsect = gettext $sect;
+ my $quote = $lsect =~ /\W/ ? '"' : '';
+ print ".SH $quote$lsect$quote\n";
+
+ for ($include{$sect})
{
# Replace leading dot, apostrophe and backslash tokens.
s/\x80/\\&./g;
s/\x81/\\&'/g;
s/\x82/\\e/g;
+
+ # Convert some latin1 chars to troff equivalents
+ s/\xa0/\\ /g; # non-breaking space
+
print;
}
}
}
+close STDOUT or kark N_("%s: error writing to %s (%s)"), $this_program,
+ $opt_output || 'stdout', $!;
+
exit;
# Convert option dashes to \- to stop nroff from hyphenating 'em, and
diff --git a/help2man.fr.1 b/help2man.fr.1
new file mode 100644
index 0000000..847be18
--- /dev/null
+++ b/help2man.fr.1
@@ -0,0 +1,149 @@
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.31.
+.TH HELP2MAN "1" "juillet 2003" "help2man 1.31" "Commandes"
+.SH NOM
+help2man \- génère une page de manuel sommaire
+.SH SYNOPSIS
+.B help2man
+[\fIOPTION\fR]... \fIPROGRAMME\fR
+.SH DESCRIPTION
+«\ help2man\ » génère la page de manuel d'un programme à partir des
+indications fournies par celui-ci lorsqu'il est lancé avec les
+options «\ --help\ » et «\ --version\ ».
+.TP
+\fB\-n\fR, \fB\-\-name\fR=\fICHAÎNE\fR
+description pour le paragraphe NOM
+.TP
+\fB\-s\fR, \fB\-\-section\fR=\fISECTION\fR
+numéro de section de la page de
+manuel (1, 6, 8)
+.TP
+\fB\-m\fR, \fB\-\-manual\fR=\fITEXTE\fR
+nom du manuel (Commandes, ...)
+.TP
+\fB\-S\fR, \fB\-\-source\fR=\fITEXTE\fR
+source du programme (FSF, Debian, ...)
+.TP
+\fB\-L\fR, \fB\-\-locale\fR=\fICHAÎNE\fR
+changer les paramètres régionaux
+(«\ C\ » par défaut)
+.TP
+\fB\-i\fR, \fB\-\-include\fR=\fIFICHIER\fR
+ajouter du texte depuis «\ FICHIER\ »
+.TP
+\fB\-I\fR, \fB\-\-opt\-include\fR=\fIFICHIER\fR ajouter du texte depuis «\ FICHIER\ »,
+si ce fichier existe
+.TP
+\fB\-o\fR, \fB\-\-output\fR=\fIFICHIER\fR
+envoyer le résultat dans «\ FICHIER\ »
+.TP
+\fB\-p\fR, \fB\-\-info\-page\fR=\fITEXTE\fR
+nom du manuel Texinfo
+.TP
+\fB\-N\fR, \fB\-\-no\-info\fR
+supprimer le pointeur vers le manuel Texinfo
+.TP
+\fB\-\-help\fR
+afficher cette aide, puis quitter
+.TP
+\fB\-\-version\fR
+afficher le numéro de version, puis quitter
+.PP
+PROGRAMME devrait accepter les options «\ --help\ » et «\ --version\ »
+mais des alternatives peuvent être spécifiées en utilisant\ :
+.TP
+\fB\-h\fR, \fB\-\-help\-option\fR=\fICHAÎNE\fR
+chaîne pour l'option équivalente à «\ --help\ »
+.HP
+\fB\-v\fR, \fB\-\-version\-option\fR=\fICHAÎNE\fR chaîne pour l'option équivalente à «\ --version\ »
+.SH "FICHIERS INCLUS"
+On peut ajouter un supplément de texte aux indications fournies par le
+programme grâce aux options
+.B \-\-include
+et
+.BR \-\-opt\-include .
+Le format est simple\ :
+
+ [section]
+ texte
+
+ /motif/
+ texte
+
+Les blocs de texte (au format *roff) sont insérés tels quels dans la
+sortie, soit au début de la zone désignée par
+.BI [ section ]
+(balise insensible à la casse), soit après un paragraphe correspondant à
+.BI / motif /\fR.
+
+Les motifs obéissent à la syntaxe des expressions rationnelles de Perl
+et peuvent être suivis des modificateurs
+.IR i ,
+.I s
+ou
+.I m
+(voir
+.BR perlre (1)).
+
+Les lignes précédant la première section (ou le premier motif) et
+commençant par «\ \-\ » sont traitées comme des options. Tout le
+reste est ignoré sans aucun avertissement, et peut être utilisé pour
+des commentaires, des mots clés RCS ou d'autres éléments.
+
+L'ordre des sections produites est\ :
+
+ NOM
+ SYNOPSIS
+ DESCRIPTION
+ OPTIONS
+ EXEMPLES
+ \fIautres\fR
+ AUTEUR
+ SIGNALER DES BOGUES
+ COPYRIGHT
+ VOIR AUSSI
+
+Toute section
+.B [nom]
+ou
+.B [synopsis]
+apparaissant dans le fichier inclus va remplacer celle qui aurait êté
+générée automatiquement (mais vous pouvez encore remplacer la première
+avec
+.B --name
+si nécessaire).
+
+Le texte supplémentaire aux autres sections usuelles (celles
+apparaissant dans cette liste) est inséré avant la sortie générée
+automatiquement pour elles.
+Les sections non usuelles sont insérées à la place marquée
+.I autres
+dans la liste ci-dessus, dans l'ordre dans lequel ces sections
+apparaissent dans le fichier inclus.
+.SH DISPONIBILITÉ
+La dernière version de cette distribution est disponible en ligne sur\ :
+
+ ftp://ftp.gnu.org/gnu/help2man/
+.SH AUTEUR
+Écrit par Brendan O'Dea <bod@debian.org>
+.SH "SIGNALER DES BOGUES"
+Signaler les bogues à <bug-help2man@gnu.org>.
+.SH COPYRIGHT
+Copyright \(co 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
+Foundation, Inc.
+.br
+Ce logiciel est libre\ ; voir les sources pour les conditions de
+reproduction. AUCUNE garantie n'est donnée, pas même la garantie
+implicite de COMMERCIALISATION ni l'ADAPTATION A UN BESOIN PARTICULIER.
+.SH "VOIR AUSSI"
+La documentation complète pour
+.B help2man
+est mise à jour dans un manuel Texinfo (en anglais).
+Si les programmes
+.B info
+et
+.B help2man
+sont correctement installés sur votre système, la commande
+.IP
+.B info help2man
+.PP
+devrait vous donner accès au manuel complet (en anglais).
diff --git a/help2man.fr.h2m b/help2man.fr.h2m
new file mode 100644
index 0000000..22800a1
--- /dev/null
+++ b/help2man.fr.h2m
@@ -0,0 +1,80 @@
+Encoding charset: ISO-8859-15
+Language: French
+Locale: fr_FR@euro (and also fr_FR)
+Translator : Denis Barbier <barbier@linuxfr.org>
+
+Traduction française du fichier inclus pour générer la page
+de manuel de help2man
+
+[nom]
+help2man \- génère une page de manuel sommaire
+
+[fichiers inclus]
+On peut ajouter un supplément de texte aux indications fournies par le
+programme grâce aux options
+.B \-\-include
+et
+.BR \-\-opt\-include .
+Le format est simple\ :
+
+ [section]
+ texte
+
+ /motif/
+ texte
+
+Les blocs de texte (au format *roff) sont insérés tels quels dans la
+sortie, soit au début de la zone désignée par
+.BI [ section ]
+(balise insensible à la casse), soit après un paragraphe correspondant à
+.BI / motif /\fR.
+
+Les motifs obéissent à la syntaxe des expressions rationnelles de Perl
+et peuvent être suivis des modificateurs
+.IR i ,
+.I s
+ou
+.I m
+(voir
+.BR perlre (1)).
+
+Les lignes précédant la première section (ou le premier motif) et
+commençant par «\ \-\ » sont traitées comme des options. Tout le
+reste est ignoré sans aucun avertissement, et peut être utilisé pour
+des commentaires, des mots clés RCS ou d'autres éléments.
+
+L'ordre des sections produites est\ :
+
+ NOM
+ SYNOPSIS
+ DESCRIPTION
+ OPTIONS
+ EXEMPLES
+ \fIautres\fR
+ AUTEUR
+ SIGNALER DES BOGUES
+ COPYRIGHT
+ VOIR AUSSI
+
+Toute section
+.B [nom]
+ou
+.B [synopsis]
+apparaissant dans le fichier inclus va remplacer celle qui aurait êté
+générée automatiquement (mais vous pouvez encore remplacer la première
+avec
+.B --name
+si nécessaire).
+
+Le texte supplémentaire aux autres sections usuelles (celles
+apparaissant dans cette liste) est inséré avant la sortie générée
+automatiquement pour elles.
+Les sections non usuelles sont insérées à la place marquée
+.I autres
+dans la liste ci-dessus, dans l'ordre dans lequel ces sections
+apparaissent dans le fichier inclus.
+
+[disponibilité]
+La dernière version de cette distribution est disponible en ligne sur\ :
+
+ ftp://ftp.gnu.org/gnu/help2man/
diff --git a/help2man.info b/help2man.info
index d65cd51..22663ac 100644
--- a/help2man.info
+++ b/help2man.info
@@ -1,4 +1,4 @@
-This is help2man.info, produced by makeinfo version 4.2 from
+This is help2man.info, produced by makeinfo version 4.3 from
help2man.texi.
INFO-DIR-SECTION GNU programming support
@@ -9,7 +9,8 @@ END-INFO-DIR-ENTRY
This file documents the GNU `help2man' command which produces simple
manual pages from the `--help' and `--version' output of other commands.
- Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
+Inc.
Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
@@ -39,8 +40,9 @@ File: help2man.info, Node: Top, Next: Overview, Up: (dir)
* Overview:: Overview of `help2man'.
* Invoking help2man:: How to run `help2man'.
* Including text:: Including additional text in the output.
-* --help recommendations:: Recommended formatting for --help output.
+* --help recommendations:: Recommended formatting for --help output.
* Makefile usage:: Using `help2man' with `make'.
+* Localised man pages:: Producing native langauge manual pages.
* Reports:: Reporting bugs or suggestions.
* Availability:: Obtaining `help2man'.
@@ -105,6 +107,12 @@ How to Run `help2man'
the name of the organisation or a suite of which the program is
part. By default the value is the package name and version.
+`-L LOCALE'
+`--locale=LOCALE'
+ Select output locale (default `C'). Both the program and
+ `help2man' must support the given LOCALE (*note Localised man
+ pages::).
+
`-i FILE'
`--include=FILE'
Include material from FILE (*note Including text::).
@@ -264,7 +272,7 @@ the standard sections given above, or included at _other_ (above) in
the order they were encountered in the include file.
-File: help2man.info, Node: Makefile usage, Next: Reports, Prev: --help recommendations, Up: Top
+File: help2man.info, Node: Makefile usage, Next: Localised man pages, Prev: --help recommendations, Up: Top
Using `help2man' With `make'
****************************
@@ -293,7 +301,57 @@ included in the distribution without requiring the end-user to have
for `autoconf' alone.
-File: help2man.info, Node: Reports, Next: Availability, Prev: Makefile usage, Up: Top
+File: help2man.info, Node: Localised man pages, Next: Reports, Prev: Makefile usage, Up: Top
+
+Producing Native Langauge Manual Pages.
+***************************************
+
+ Manual pages may be produced for any locale supported by both the
+program and `help2man'(1) with the `--locale' (`-L') option.
+
+ help2man -L fr_FR@euro -o cp.fr.1 cp
+
+Changing the Location of Message Catalogs
+=========================================
+
+ When creating localised manual pages from a program's build
+directory it is probable that the translations installed in the
+standard location will not be (if installed at all) correct for the
+version of the program being built.
+
+ A preloadable library is provided with `help2man' which will
+intercept `open(2)' calls for message catalogs for the domain given by
+`$TEXTDOMAIN' and re-map the requests to the appropriate file under
+`./po' (or `$LOCALEDIR' if given).
+
+ So for example:
+
+ LD_PRELOAD="hacklocaledir.so preloadable_libintl.so" TEXTDOMAIN=PROG \
+ help2man -L fr_FR@euro -i PROG.fr.h2m -o PROG.fr.1 PROG
+
+ will translate requests by PROG for
+`/usr/share/locale/fr/LC_MESSGAES/PROG.mo' to `po/fr.gmo'.
+
+ Notes:
+ * The generalisation of `fr_FR@euro' to `fr' in the example above is
+ done by `gettext', if a more specific match were available it
+ would also have been re-mapped.
+
+ * The inclusion of `preloadable_libintl.so' in `$LD_PRELOAD' is
+ required only for cases (such as `glibc') where `gettext' is built
+ into libc (where `__open' would otherwise be satisfied internally).
+
+ * This preload hack has only been tested against `glibc' 2.3.1 and
+ `gettext' 2.3.1 on a GNU/Linux system; let me know if it does (or
+ doesn't) work for you (*note Reports::).
+
+ ---------- Footnotes ----------
+
+ (1) `help2man' currently supports `fr_FR' (*note Reports:: for how
+to submit other translations).
+
+
+File: help2man.info, Node: Reports, Next: Availability, Prev: Localised man pages, Up: Top
Reporting Bugs or Suggestions
*****************************
@@ -301,6 +359,10 @@ Reporting Bugs or Suggestions
If you find problems or have suggestions about this program or
manual, please report them to <bug-help2man@gnu.org>.
+ Note to translators: when submitting new translations for
+`po/help2man.pot' please additionally translate `help2man.h2m' (used to
+augment the manual pages for `help2man').
+
File: help2man.info, Node: Availability, Prev: Reports, Up: Top
@@ -314,13 +376,15 @@ Obtaining `help2man'
Tag Table:
-Node: Top1100
-Node: Overview1733
-Node: Invoking help2man2439
-Node: --help recommendations4433
-Node: Including text7848
-Node: Makefile usage9389
-Node: Reports10315
-Node: Availability10590
+Node: Top1106
+Node: Overview1816
+Node: Invoking help2man2522
+Node: --help recommendations4692
+Node: Including text8107
+Node: Makefile usage9648
+Node: Localised man pages10586
+Ref: Localised man pages-Footnote-112380
+Node: Reports12482
+Node: Availability12939
End Tag Table
diff --git a/help2man.texi b/help2man.texi
index c9ce9cf..f8a1bf1 100644
--- a/help2man.texi
+++ b/help2man.texi
@@ -3,7 +3,7 @@
@settitle @command{help2man} Reference Manual
@setchapternewpage on
@finalout
-@c $Id: help2man.texi,v 1.8 2002/09/06 15:49:44 bod Exp $
+@c $Id: help2man.texi,v 1.9 2003/07/08 14:19:18 bod Exp $
@dircategory GNU programming support
@direntry
@@ -15,7 +15,7 @@ This file documents the GNU @command{help2man} command which produces
simple manual pages from the @samp{--help} and @samp{--version} output
of other commands.
-Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -46,7 +46,8 @@ by the Foundation.
@page
@vskip 0pt plus 1filll
-Copyright @copyright{} 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+Copyright @copyright{} 1999, 2000, 2001, 2002, 2003 Free Software
+Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -74,8 +75,9 @@ and @samp{--version} output of other commands.
* Overview:: Overview of @command{help2man}.
* Invoking help2man:: How to run @command{help2man}.
* Including text:: Including additional text in the output.
-* --help recommendations:: Recommended formatting for --help output.
+* --help recommendations:: Recommended formatting for --help output.
* Makefile usage:: Using @command{help2man} with @command{make}.
+* Localised man pages:: Producing native langauge manual pages.
* Reports:: Reporting bugs or suggestions.
* Availability:: Obtaining @command{help2man}.
@end menu
@@ -140,6 +142,12 @@ The program source is used as a page footer, and often contains the name
of the organisation or a suite of which the program is part. By default
the value is the package name and version.
+@item -L @var{locale}
+@itemx --locale=@var{locale}
+Select output locale (default @samp{C}). Both the program and
+@command{help2man} must support the given @var{locale}
+(@pxref{Localised man pages}).
+
@item -i @var{file}
@itemx --include=@var{file}
Include material from @var{file} (@pxref{Including text}).
@@ -242,7 +250,8 @@ or the entire list if there are no sections.
@item
Any useful additional information about program behavior, such as
influential environment variables, further explanation of options, etc.
-For example, @command{cp} discusses @env{VERSION_CONTROL} and sparse files.
+For example, @command{cp} discusses @env{VERSION_CONTROL} and sparse
+files.
@item
A few examples of typical usage, at your discretion. One good example
@@ -352,12 +361,71 @@ AC_PATH_PROG(HELP2MAN, help2man, false // No help2man //)
for @command{autoconf} alone.
+@node Localised man pages
+@chapter Producing Native Langauge Manual Pages.
+
+Manual pages may be produced for any locale supported by both the
+program and @command{help2man}@footnote{@command{help2man} currently
+supports @samp{fr_FR} (@pxref{Reports} for how to submit other
+translations).} with the @samp{--locale} (@samp{-L}) option.
+
+@example
+help2man -L fr_FR@@euro -o cp.fr.1 cp
+@end example
+
+@section Changing the Location of Message Catalogs
+
+When creating localised manual pages from a program's build directory it
+is probable that the translations installed in the standard location
+will not be (if installed at all) correct for the version of the
+program being built.
+
+A preloadable library is provided with @command{help2man} which will
+intercept @code{open(2)} calls for message catalogs for the domain
+given by @env{$TEXTDOMAIN} and re-map the requests to the appropriate
+file under @code{./po} (or @env{$LOCALEDIR} if given).
+
+So for example:
+
+@example
+LD_PRELOAD="hacklocaledir.so preloadable_libintl.so" TEXTDOMAIN=@var{prog} \
+ help2man -L fr_FR@@euro -i @var{prog}.fr.h2m -o @var{prog}.fr.1 @var{prog}
+@end example
+
+will translate requests by @var{prog} for
+@samp{/usr/share/locale/fr/LC_MESSGAES/@var{PROG}.mo} to
+@samp{po/fr.gmo}.
+
+Notes:
+@itemize @bullet
+@item
+The generalisation of @samp{fr_FR@@euro} to @samp{fr} in the example
+above is done by @code{gettext}, if a more specific match were available
+it would also have been re-mapped.
+
+@item
+The inclusion of @code{preloadable_libintl.so} in @env{$LD_PRELOAD} is
+required only for cases (such as @code{glibc}) where @code{gettext} is
+built into libc (where @code{__open} would otherwise be satisfied
+internally).
+
+@item
+This preload hack has only been tested against @command{glibc} 2.3.1
+and @command{gettext} 2.3.1 on a GNU/Linux system; let me know if it
+does (or doesn't) work for you (@pxref{Reports}).
+@end itemize
+
@node Reports
@chapter Reporting Bugs or Suggestions
If you find problems or have suggestions about this program or
manual, please report them to @email{bug-help2man@@gnu.org}.
+Note to translators: when submitting new translations for
+@code{po/help2man.pot} please additionally translate
+@code{help2man.h2m} (used to augment the manual pages for
+@code{help2man}).
+
@node Availability
@chapter Obtaining @command{help2man}
diff --git a/install-sh b/install-sh
index c122ef9..d4744f0 100755
--- a/install-sh
+++ b/install-sh
@@ -1,19 +1,37 @@
#!/bin/sh
#
# install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
#
-# Copyright 1991 by the Massachusetts Institute of Technology
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
#
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission. M.I.T. makes no representations about the
-# suitability of this software for any purpose. It is provided "as is"
-# without express or implied warranty.
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
diff --git a/mkpot b/mkpot
new file mode 100755
index 0000000..dd6ade9
--- /dev/null
+++ b/mkpot
@@ -0,0 +1,102 @@
+#!/usr/bin/perl
+
+# extract translation strings
+
+use POSIX 'strftime';
+
+my $date = strftime '%F %T%z', localtime;
+my $prog = shift or die "Usage: $0 PROG\n";
+my ($package, $version) = `perl $prog --version 2>/dev/null`
+ =~ /^(?:(?:GNU|Free)\s+)?(?:(\w\S+)\s+)?(\d\S+)\n/;
+
+($package = $prog) =~ s!.*/!! unless $package;
+$version ||= 'unknown';
+
+open PARSER, "perl -MO=Deparse,-l $prog 2>/dev/null |"
+ or die "can't fork: $!";
+
+print <<EOT;
+# Translation template for $package
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: $package $version\\n"
+"POT-Creation-Date: $date\\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n"
+"Language-Team: LANGUAGE <LL@li.org>\\n"
+"MIME-Version: 1.0\\n"
+"Content-Type: text/plain; charset=CHARSET\\n"
+"Content-Transfer-Encoding: ENCODING\\n"
+EOT
+
+my $line = 1;
+my $file = $prog;
+my %close = (
+ '(' => ')',
+ '[' => ']',
+ '<' => '>',
+ '{' => '}',
+);
+
+my %seen;
+
+while (<PARSER>)
+{
+ chomp;
+ ($line, $file) = ($1, $2) if /^#\s*line\s+(\d+)\s+"([^"]+)"/;
+ while (s/.*?\bN?_\(//)
+ {
+ my $single;
+ my $o = '';
+ my $c;
+ if (s/^q(q?)(.)//)
+ {
+ $single = !length $1;
+ if ($c = $close{$2})
+ {
+ $o = $2;
+ }
+ else
+ {
+ $c = $2;
+ }
+ }
+ elsif (s/^(["'])//)
+ {
+ $single = $1 eq "'";
+ $c = $1;
+ }
+ else
+ {
+ die "$file:$line: can't determine quote style\n";
+ }
+
+ my $nest = $o ? "|\Q$o\E[^\Q$c\E]*\Q$c\E" : '';
+ my $text = s/^((?:\\.|[^\Q$o$c\E\\]+$nest)*)// ? $1 :
+ die "$file:$line: can't find closing quote $c\n";
+
+ for ($text)
+ {
+ unless ($single)
+ {
+ 1 while s/(^|[^\\])\\n/$1\n/g;
+ s/\\([\$\@])/$1/g;
+ }
+
+ s/"/\\"/g;
+ if (s/\n/\\n"\n"/g)
+ {
+ s/^/"\n"/;
+ s/"\n"$//;
+ }
+ }
+
+ print <<EOT unless $seen{$text}++;
+
+#: $file:$line
+msgid "$text"
+msgstr ""
+EOT
+ }
+}
diff --git a/po/fr.gmo b/po/fr.gmo
new file mode 100644
index 0000000..2efc363
Binary files /dev/null and b/po/fr.gmo differ
diff --git a/po/fr.po b/po/fr.po
new file mode 100644
index 0000000..d69020e
--- /dev/null
+++ b/po/fr.po
@@ -0,0 +1,225 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: help2man 1.31\n"
+"POT-Creation-Date: 2003-07-09 20:33:36+1000\n"
+"PO-Revision-Date: 2003-07-09 20:34:44+1000\n"
+"Last-Translator: Denis Barbier <barbier@linuxfr.org>\n"
+"Language-Team: French <debian-l10n-french@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: help2man:65
+msgid ""
+"GNU %s %s\n"
+"\n"
+"Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software\n"
+"Foundation, Inc.\n"
+"This is free software; see the source for copying conditions. There is NO\n"
+"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
+"\n"
+"Written by Brendan O'Dea <bod@debian.org>\n"
+msgstr ""
+"GNU %s %s\n"
+"\n"
+"Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software\n"
+"Foundation, Inc.\n"
+"Ce logiciel est libre ; voir les sources pour les conditions de\n"
+"reproduction. AUCUNE garantie n'est donnée, pas même la garantie\n"
+"implicite de COMMERCIALISATION ni l'ADAPTATION A UN BESOIN PARTICULIER.\n"
+"\n"
+"Écrit par Brendan O'Dea <bod@debian.org>\n"
+
+#: help2man:76
+msgid ""
+"`%s' generates a man page out of `--help' and `--version' output.\n"
+"\n"
+"Usage: %s [OPTION]... EXECUTABLE\n"
+"\n"
+" -n, --name=STRING description for the NAME paragraph\n"
+" -s, --section=SECTION section number for manual page (1, 6, 8)\n"
+" -m, --manual=TEXT name of manual (User Commands, ...)\n"
+" -S, --source=TEXT source of program (FSF, Debian, ...)\n"
+" -L, --locale=STRING select locale (default \"C\")\n"
+" -i, --include=FILE include material from `FILE'\n"
+" -I, --opt-include=FILE include material from `FILE' if it exists\n"
+" -o, --output=FILE send output to `FILE'\n"
+" -p, --info-page=TEXT name of Texinfo manual\n"
+" -N, --no-info suppress pointer to Texinfo manual\n"
+" --help print this help, then exit\n"
+" --version print version number, then exit\n"
+"\n"
+"EXECUTABLE should accept `--help' and `--version' options although\n"
+"alternatives may be specified using:\n"
+"\n"
+" -h, --help-option=STRING help option string\n"
+" -v, --version-option=STRING version option string\n"
+"\n"
+"Report bugs to <bug-help2man@gnu.org>.\n"
+msgstr ""
+"« %s » génère la page de manuel d'un programme à partir des\n"
+"indications fournies par celui-ci lorsqu'il est lancé avec les\n"
+"options « --help » et « --version ».\n"
+"\n"
+"Usage: %s [OPTION]... PROGRAMME\n"
+"\n"
+" -n, --name=CHAÎNE description pour le paragraphe NOM\n"
+" -s, --section=SECTION numéro de section de la page de\n"
+" manuel (1, 6, 8)\n"
+" -m, --manual=TEXTE nom du manuel (Commandes, ...)\n"
+" -S, --source=TEXTE source du programme (FSF, Debian, ...)\n"
+" -L, --locale=CHAÎNE changer les paramètres régionaux\n"
+" (« C » par défaut)\n"
+" -i, --include=FICHIER ajouter du texte depuis « FICHIER »\n"
+" -I, --opt-include=FICHIER ajouter du texte depuis « FICHIER »,\n"
+" si ce fichier existe\n"
+" -o, --output=FICHIER envoyer le résultat dans « FICHIER »\n"
+" -p, --info-page=TEXTE nom du manuel Texinfo\n"
+" -N, --no-info supprimer le pointeur vers le manuel Texinfo\n"
+" --help afficher cette aide, puis quitter\n"
+" --version afficher le numéro de version, puis quitter\n"
+"\n"
+"PROGRAMME devrait accepter les options « --help » et « --version »\n"
+"mais des alternatives peuvent être spécifiées en utilisant :\n"
+"\n"
+" -h, --help-option=CHAÎNE chaîne pour l'option équivalente à « --help »\n"
+" -v, --version-option=CHAÎNE chaîne pour l'option équivalente à « --version "
+"»\n"
+"\n"
+"Signaler les bogues à <bug-help2man@gnu.org>.\n"
+
+#: help2man:162
+msgid "%s: can't open `%s' (%s)"
+msgstr "%s: impossible d'ouvrir « %s » (%s)"
+
+#: help2man:219
+msgid "%s: no valid information found in `%s'"
+msgstr "%s: aucune information valable trouvée dans « %s »"
+
+#: help2man:231
+msgid "%s: can't get `%s' info from %s"
+msgstr "%s: impossible de récupérer l'information « %s » de %s"
+
+#: help2man:243
+msgid "%s: can't unlink %s (%s)"
+msgstr "%s: impossible d'effacer %s (%s)"
+
+#: help2man:246
+msgid "%s: can't create %s (%s)"
+msgstr "%s: impossible de créer « %s » (%s)"
+
+#: help2man:290
+msgid "%s \\- manual page for %s %s"
+msgstr "%s \\- page de manuel de %s %s"
+
+#: help2man:302
+msgid "System Administration Utilities"
+msgstr "Commandes d'administration système"
+
+#: help2man:302
+msgid "Games"
+msgstr "Jeux"
+
+#: help2man:304
+msgid "User Commands"
+msgstr "Commandes"
+
+#: help2man:308
+msgid "or"
+msgstr "ou"
+
+#: help2man:345
+msgid "DESCRIPTION"
+msgstr "DESCRIPTION"
+
+#: help2man:359
+msgid "Report +bugs|Email +bug +reports +to"
+msgstr ""
+"Signaler +les +bogues|Rapporter +les +bogues|Rapporter +toutes +anomalies|"
+"Envoyer +les +rapports +de +bogue +à"
+
+#: help2man:360
+msgid "Written +by"
+msgstr "Écrit +par"
+
+#: help2man:361
+msgid "Options"
+msgstr "Options"
+
+#: help2man:362
+msgid "Examples"
+msgstr "Exemples"
+
+#: help2man:363
+msgid "This +is +free +software"
+msgstr "Ce +logiciel +est +libre"
+
+#: help2man:375
+msgid "OPTIONS"
+msgstr "OPTIONS"
+
+#: help2man:380
+msgid "EXAMPLES"
+msgstr "EXEMPLES"
+
+#: help2man:387
+msgid "COPYRIGHT"
+msgstr "COPYRIGHT"
+
+#: help2man:417
+msgid "REPORTING BUGS"
+msgstr "SIGNALER DES BOGUES"
+
+#: help2man:417
+msgid "AUTHOR"
+msgstr "AUTEUR"
+
+#: help2man:546
+msgid "SEE ALSO"
+msgstr "VOIR AUSSI"
+
+#: help2man:549
+msgid ""
+"The full documentation for\n"
+".B %s\n"
+"is maintained as a Texinfo manual. If the\n"
+".B info\n"
+"and\n"
+".B %s\n"
+"programs are properly installed at your site, the command\n"
+".IP\n"
+".B info %s\n"
+".PP\n"
+"should give you access to the complete manual.\n"
+msgstr ""
+"La documentation complète pour\n"
+".B %s\n"
+"est mise à jour dans un manuel Texinfo (en anglais).\n"
+"Si les programmes\n"
+".B info\n"
+"et\n"
+".B %s\n"
+"sont correctement installés sur votre système, la commande\n"
+".IP\n"
+".B info %s\n"
+".PP\n"
+"devrait vous donner accès au manuel complet (en anglais).\n"
+
+#: help2man:571
+msgid "NAME"
+msgstr "NOM"
+
+#: help2man:571
+msgid "SYNOPSIS"
+msgstr "SYNOPSIS"
+
+#: help2man:601
+msgid "%s: error writing to %s (%s)"
+msgstr "%s: erreur d'écriture sur %s (%s)"
+
diff --git a/po/help2man.pot b/po/help2man.pot
new file mode 100644
index 0000000..8bcc31b
--- /dev/null
+++ b/po/help2man.pot
@@ -0,0 +1,167 @@
+# Translation template for help2man
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: help2man 1.31\n"
+"POT-Creation-Date: 2003-07-09 20:33:36+1000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL>\n"
+"Language-Team: LANGUAGE <LL.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: ENCODING\n"
+
+#: help2man:65
+msgid ""
+"GNU %s %s\n"
+"\n"
+"Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software\n"
+"Foundation, Inc.\n"
+"This is free software; see the source for copying conditions. There is NO\n"
+"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
+"\n"
+"Written by Brendan O'Dea <bod@debian.org>\n"
+msgstr ""
+
+#: help2man:76
+msgid ""
+"`%s' generates a man page out of `--help' and `--version' output.\n"
+"\n"
+"Usage: %s [OPTION]... EXECUTABLE\n"
+"\n"
+" -n, --name=STRING description for the NAME paragraph\n"
+" -s, --section=SECTION section number for manual page (1, 6, 8)\n"
+" -m, --manual=TEXT name of manual (User Commands, ...)\n"
+" -S, --source=TEXT source of program (FSF, Debian, ...)\n"
+" -L, --locale=STRING select locale (default \"C\")\n"
+" -i, --include=FILE include material from `FILE'\n"
+" -I, --opt-include=FILE include material from `FILE' if it exists\n"
+" -o, --output=FILE send output to `FILE'\n"
+" -p, --info-page=TEXT name of Texinfo manual\n"
+" -N, --no-info suppress pointer to Texinfo manual\n"
+" --help print this help, then exit\n"
+" --version print version number, then exit\n"
+"\n"
+"EXECUTABLE should accept `--help' and `--version' options although\n"
+"alternatives may be specified using:\n"
+"\n"
+" -h, --help-option=STRING help option string\n"
+" -v, --version-option=STRING version option string\n"
+"\n"
+"Report bugs to <bug-help2man@gnu.org>.\n"
+msgstr ""
+
+#: help2man:162
+msgid "%s: can't open `%s' (%s)"
+msgstr ""
+
+#: help2man:219
+msgid "%s: no valid information found in `%s'"
+msgstr ""
+
+#: help2man:231
+msgid "%s: can't get `%s' info from %s"
+msgstr ""
+
+#: help2man:243
+msgid "%s: can't unlink %s (%s)"
+msgstr ""
+
+#: help2man:246
+msgid "%s: can't create %s (%s)"
+msgstr ""
+
+#: help2man:290
+msgid "%s \\- manual page for %s %s"
+msgstr ""
+
+#: help2man:302
+msgid "System Administration Utilities"
+msgstr ""
+
+#: help2man:302
+msgid "Games"
+msgstr ""
+
+#: help2man:304
+msgid "User Commands"
+msgstr ""
+
+#: help2man:308
+msgid "or"
+msgstr ""
+
+#: help2man:345
+msgid "DESCRIPTION"
+msgstr ""
+
+#: help2man:359
+msgid "Report +bugs|Email +bug +reports +to"
+msgstr ""
+
+#: help2man:360
+msgid "Written +by"
+msgstr ""
+
+#: help2man:361
+msgid "Options"
+msgstr ""
+
+#: help2man:362
+msgid "Examples"
+msgstr ""
+
+#: help2man:363
+msgid "This +is +free +software"
+msgstr ""
+
+#: help2man:375
+msgid "OPTIONS"
+msgstr ""
+
+#: help2man:380
+msgid "EXAMPLES"
+msgstr ""
+
+#: help2man:387
+msgid "COPYRIGHT"
+msgstr ""
+
+#: help2man:417
+msgid "REPORTING BUGS"
+msgstr ""
+
+#: help2man:417
+msgid "AUTHOR"
+msgstr ""
+
+#: help2man:546
+msgid "SEE ALSO"
+msgstr ""
+
+#: help2man:549
+msgid ""
+"The full documentation for\n"
+".B %s\n"
+"is maintained as a Texinfo manual. If the\n"
+".B info\n"
+"and\n"
+".B %s\n"
+"programs are properly installed at your site, the command\n"
+".IP\n"
+".B info %s\n"
+".PP\n"
+"should give you access to the complete manual.\n"
+msgstr ""
+
+#: help2man:571
+msgid "NAME"
+msgstr ""
+
+#: help2man:571
+msgid "SYNOPSIS"
+msgstr ""
+
+#: help2man:601
+msgid "%s: error writing to %s (%s)"
+msgstr ""