bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

hello-2.1.91 build failure on MacOS X


From: Bruno Haible
Subject: hello-2.1.91 build failure on MacOS X
Date: Tue, 22 Aug 2006 14:15:36 +0200
User-agent: KMail/1.9.1

Later on in the MacOS X build:

Making all in doc
make[2]: Nothing to be done for `all'.
Making all in man
/bin/sh /Users/bruno/data/work/hello-2.1.91/build-aux/missing --run help2man 
--name="Friendly Greeting Program" ../src/hello >hello.1
/Users/bruno/data/work/hello-2.1.91/build-aux/missing: line 46: help2man: 
command not found
WARNING: `help2man' is missing on your system.  You should only need it if
         you modified a dependency of a manual page.  You may need the
         `Help2man' package in order for those modifications to take
         effect.  You can get `Help2man' from any GNU archive site.
make[2]: *** [hello.1] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Sure I've modified src/hello.c. But is that enough justification to
give a build error after I modified a source file? A user can expect to
need 'automake', 'autoconf', 'm4', 'perl' after modifying configure.ac
or a Makefile.am. A user can expect to need 'makeinfo' after modifying a
.texi file. But modifying a source file is so much more elementary;
hackers doing that should only need a C compiler.

And, by the way, running src/hello will also not work in a cross-compile.

Here's a fix suggestion, using the x-to-1 script that is in use in
GNU gettext for 5 years.

Also, why not adding the help2man to build-aux? It's 20 times more lightweight
than texinfo.tex and is updated quite rarely.

This way,
  1) The minimum requirements for regenerating the manpage are lowered from
     help2man to perl,
  2) If this minimum requirement is not met, the man page is left untouched;
     only a "WARNING: The man page hello.1 cannot be updated yet." is printed.

ChangeLog:
2006-08-21  Bruno Haible  <address@hidden>

        * build-aux/help2man: New file, from GNU help2man-1.36.4.
        * build-aux/x-to-1.in: New file, from gnulib.
        * configure.ac (HELP2MAN): Remove variable.
        (PERL): New variable, for man/Makefile.
        (CROSS_COMPILING): New variable, for x-to-1.
        (AC_CONFIG_FILES): Add x-to-1.

man/ChangeLog:
2006-08-21  Bruno Haible  <address@hidden>

        Avoid build errors when a C file is modified and help2man or perl are
        missing.
        * hello.x: New file.
        * Makefile.am (HELP2MAN): New variable.
        (man_aux): New variable.
        (EXTRA_DIST): Add it.
        (common_mandeps): Add help2man.
        (hello.1): Depend on hello.x. Use x-to-1 script as wrapper around
        help2man.

*** /dev/null   2003-09-23 19:59:22.000000000 +0200
--- man/hello.x 2006-08-22 02:09:45.000000000 +0200
***************
*** 0 ****
--- 1,4 ----
+ [NAME]
+ hello \- Friendly Greeting Program
+ [DESCRIPTION]
+ .\" Add any additional description here
*** configure.ac.bak    2006-08-21 01:43:42.000000000 +0200
--- configure.ac        2006-08-22 02:37:36.000000000 +0200
***************
*** 31,45 ****
  gl_EARLY
  gl_INIT
  
! # GNU help2man creates man pages from --help output; in many cases, this
! # is sufficient, and obviates the need to maintain man pages separately.
! AM_MISSING_PROG(HELP2MAN, help2man)
  
  # i18n support from GNU gettext.
  AM_GNU_GETTEXT_VERSION([0.15])
  AM_GNU_GETTEXT([external])
  
! AC_CONFIG_FILES([Makefile \
             contrib/Makefile \
             doc/Makefile \
             gnulib/lib/Makefile \
--- 31,48 ----
  gl_EARLY
  gl_INIT
  
! dnl Check for tools needed for formatting the documentation.
! ac_aux_dir_abs=`cd $ac_aux_dir && pwd`
! AC_PATH_PROG(PERL, perl, $ac_aux_dir_abs/missing perl)
! dnl The variable 'cross_compiling' is set by AC_PROG_CC.
! CROSS_COMPILING=$cross_compiling
! AC_SUBST(CROSS_COMPILING)
  
  # i18n support from GNU gettext.
  AM_GNU_GETTEXT_VERSION([0.15])
  AM_GNU_GETTEXT([external])
  
! AC_CONFIG_FILES([Makefile x-to-1:build-aux/x-to-1.in \
             contrib/Makefile \
             doc/Makefile \
             gnulib/lib/Makefile \
*** man/Makefile.am.bak 2006-05-03 18:50:13.000000000 +0200
--- man/Makefile.am     2006-08-22 02:39:41.000000000 +0200
***************
*** 17,30 ****
  ## along with this program; if not, write to the Free Software Foundation,
  ## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  
  man_MANS = hello.1
! EXTRA_DIST = $(man_MANS)
  MAINTAINERCLEANFILES = $(man_MANS)
  
  # The man pages depend on the --help strings and the version number.
! common_mandeps = $(top_srcdir)/configure.ac
  
  # Depend on the source, not the binary; we don't need to regenerate the
  # binary when any source file changes, only the main one.
! hello.1: $(top_srcdir)/src/hello.c $(common_mandeps)
!       $(HELP2MAN) --name="Friendly Greeting Program" ../src/hello >$@
--- 17,41 ----
  ## along with this program; if not, write to the Free Software Foundation,
  ## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  
+ # GNU help2man creates man pages from --help output; in many cases, this
+ # is sufficient, and obviates the need to maintain man pages separately.
+ # Need help2man 1.24 or newer.
+ HELP2MAN = $(PERL) -w -- $(top_srcdir)/build-aux/help2man
+ 
+ # A manual page for each of the bin_PROGRAMS in src/Makefile.am.
  man_MANS = hello.1
! 
! # The progname.x files contain some extra information not found in the
! # "progname --help" output.
! man_aux = hello.x
! 
! EXTRA_DIST = $(man_MANS) $(man_aux)
  MAINTAINERCLEANFILES = $(man_MANS)
  
  # The man pages depend on the --help strings and the version number.
! common_mandeps = $(top_srcdir)/configure.ac $(top_srcdir)/build-aux/help2man
  
  # Depend on the source, not the binary; we don't need to regenerate the
  # binary when any source file changes, only the main one.
! hello.1: $(srcdir)/hello.x $(top_srcdir)/src/hello.c $(common_mandeps)
!       $(SHELL) $(top_builddir)/x-to-1 "$(PERL)" "$(HELP2MAN)" 
../src/hello$(EXEEXT) $(srcdir)/hello.x hello.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]