How to disable Automake docs?
Asked Answered
T

4

16

I'm trying to update Automake on a really old CentOS machine. The build is failing with:

$ make -j 4
...

  MAKEINFO doc/automake.info
/home/scripts/automake-1.15.1/lib/missing: line 81: makeinfo: command not found
WARNING: 'makeinfo' is missing on your system.
         You should only need it if you modified a '.texi' file, or
         any other file indirectly affecting the aspect of the manual.
         You might want to install the Texinfo package:
         <http://www.gnu.org/software/texinfo/>
         The spurious makeinfo call might also be the consequence of
         using a buggy 'make' (AIX, DU, IRIX), in which case you might
         want to install GNU make:
         <http://www.gnu.org/software/make/>
gmake: *** [Makefile:2518: doc/automake.info] Error 127

Building the docs is not a requirement. In fact it is unwanted because it is another point of failure and it takes up space on some devices that only have a couple hundred MB free.

According to configure --help we can disable them with --disable-FEATURE. The problem is, I don't know the feature name. I tried the obvious ones like:

  • --disable-doc
  • --disable-docs
  • --disable-texi
  • --disable-texinfo
  • --disable-DOCDIR
  • --disable-automake.info

How do I disable the docs during configure?


Here is the configuration information for Automake 1.15.1:

$ ./configure --help
`configure' configures GNU Automake 1.15.1 to adapt to many kinds of systems.

Usage: ./configure [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
  -h, --help              display this help and exit
      --help=short        display options specific to this package
      --help=recursive    display the short help of all the included packages
  -V, --version           display version information and exit
  -q, --quiet, --silent   do not print `checking ...' messages
      --cache-file=FILE   cache test results in FILE [disabled]
  -C, --config-cache      alias for `--cache-file=config.cache'
  -n, --no-create         do not create output files
      --srcdir=DIR        find the sources in DIR [configure dir or `..']

Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [/usr/local]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]

By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc.  You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
  --bindir=DIR            user executables [EPREFIX/bin]
  --sbindir=DIR           system admin executables [EPREFIX/sbin]
  --libexecdir=DIR        program executables [EPREFIX/libexec]
  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
  --libdir=DIR            object code libraries [EPREFIX/lib]
  --includedir=DIR        C header files [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
  --infodir=DIR           info documentation [DATAROOTDIR/info]
  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
  --mandir=DIR            man documentation [DATAROOTDIR/man]
  --docdir=DIR            documentation root [DATAROOTDIR/doc/automake]
  --htmldir=DIR           html documentation [DOCDIR]
  --dvidir=DIR            dvi documentation [DOCDIR]
  --pdfdir=DIR            pdf documentation [DOCDIR]
  --psdir=DIR             ps documentation [DOCDIR]

Program names:
  --program-prefix=PREFIX            prepend PREFIX to installed program names
  --program-suffix=SUFFIX            append SUFFIX to installed program names
  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names

System types:
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-silent-rules   less verbose build output (undo: "make V=1")
  --disable-silent-rules  verbose build output (undo: "make V=0")

Some influential environment variables:
  AM_TEST_RUNNER_SHELL
              a sturdy POSIX shell for our testsuite
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  LIBS        libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
  CXX         C++ compiler command
  CXXFLAGS    C++ compiler flags
  FC          Fortran compiler command
  FCFLAGS     Fortran compiler flags
  F77         Fortran 77 compiler command
  FFLAGS      Fortran 77 compiler flags
  GNU_CC      GNU C compiler
  GNU_CFLAGS  GNU C compiler flags
  GNU_CXX     GNU C++ compiler
  GNU_CXXFLAGS
              GNU C++ compiler flags
  GNU_FC      GNU Fortran compiler
  GNU_FCFLAGS GNU Fortran compiler flags
  GNU_F77     GNU Fortran 77 compiler
  GNU_FFLAGS  GNU Fortran 77 compiler flags
  GNU_GCJ     GNU Java compiler
  GNU_GCJFLAGS
              GNU Java compiler flags

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.

Report bugs to <[email protected]>.
GNU Automake home page: <http://www.gnu.org/software/automake/>.
General help using GNU software: <http://www.gnu.org/gethelp/>.
Thies answered 3/1, 2018 at 4:40 Comment(3)
Just install package 'texinfo'. ftp.gnu.org/gnu/texinfoMontserrat
This is frustrating me too, I cannot install texinfo, because texinfo is compatible with the tex documentation for this version of the compiler I have to use, which is what's breaking the documentation in the first place - this is exactly why this needs to be disabled, not "fixed".Harbourage
@Harbourage - I found the answer below but it is project dependent. Some projects can be tricked with MAKEINFO = true while others avoid the variable and hard-code makeinfo. Those which hard code uses of makeinfo cannot be tricked.Thies
T
2

The easiest way seems to be to set MAKEINFO = true in the makefile:

$ cat automake-1.15.1/Makefile | grep '^MAKEINFO ='
MAKEINFO = ${SHELL} /home/scripts/automake-1.15.1/lib/missing makeinfo

Something like the following after configuring:

./configure --prefix="$INSTALL_PREFIX" --libdir="$INSTALL_LIBDIR"

sed -e 's|^MAKEINFO =*|MAKEINFO = true|g' Makefile > Makefile.fixed
mv Makefile.fixed Makefile
Thies answered 4/1, 2018 at 23:25 Comment(3)
Off topic, better suited to linux/unix or superuser. See meta.stackexchange.com/questions/194963/…Active
@Active downvoting is fine. But how is the question or this answer off-topic for StackOverflow? ...Chagrin
Certainly on topic, it is a "a specific programming problem". And it was the first answer to mention the override. It needs more upvotes.Duvetyn
S
23

Instead of editing files, when I run make I pass the argument MAKEINFO

make MAKEINFO=true

It might not be obvious at first glance what this does.

It overrides the MAKEINFO variable predefined by GNU make, which normally points to the program to call in order to get makeinfo invoked. So by setting it to true you are effectively replacing calls to makeinfo by calls to /bin/true. This changes the makeinfo tasks into no-op actions that always succeed, thus allowing the whole build to succeed, rather than halting at makeinfo errors.

Stephaniastephanie answered 16/5, 2019 at 2:13 Comment(3)
One minor point about this. I think it should be pointed out what this does. It basically overrides the MAKEINFO variable predefined by GNU make, which normally points to the program to call in order to get makeinfo invoked. So by setting it to true you are effectively replacing calls to makeinfo by calls to /bin/true (can be seen with make -npf /dev/null |grep ^MAKEINFO).Chagrin
The root cause, and the exact problem I had was an old system that makeinfo could not be installed on. I wrote this solution because it does not require editing the auto generated makefile, nor does require adding a makeinfo program to the PATH.Stephaniastephanie
your solution is sound. If you read my comment you will have noticed that the only thing I bemoan is that - as simple as this solution is - your answer does not at all explain the mechanism. Because setting a variable in itself doesn't explain anything whatsoever. Explaining that it leads to execution of true in place of makeinfo is a much clearer explanation.Chagrin
A
7

You can non-intrusively prevent building by making makeinfo a no-op. The easiest way so far I've found is to symlink a local makeinfo to true before building so that configure and make find that instead. I.e. you can do this:

ln -s /usr/bin/true makeinfo
export PATH=${PWD}:${PATH}
Alizaalizarin answered 17/1, 2019 at 19:3 Comment(1)
I've done this manipulation of the precedence of PATH many times over in order to bend legacy build systems to my will. Very good point. Does the same like the MAKEINFO=true trick, but will even work when the invocation of makeinfo doesn't happen via the MAKEINFO variable.Chagrin
T
2

The easiest way seems to be to set MAKEINFO = true in the makefile:

$ cat automake-1.15.1/Makefile | grep '^MAKEINFO ='
MAKEINFO = ${SHELL} /home/scripts/automake-1.15.1/lib/missing makeinfo

Something like the following after configuring:

./configure --prefix="$INSTALL_PREFIX" --libdir="$INSTALL_LIBDIR"

sed -e 's|^MAKEINFO =*|MAKEINFO = true|g' Makefile > Makefile.fixed
mv Makefile.fixed Makefile
Thies answered 4/1, 2018 at 23:25 Comment(3)
Off topic, better suited to linux/unix or superuser. See meta.stackexchange.com/questions/194963/…Active
@Active downvoting is fine. But how is the question or this answer off-topic for StackOverflow? ...Chagrin
Certainly on topic, it is a "a specific programming problem". And it was the first answer to mention the override. It needs more upvotes.Duvetyn
D
-2

you can change "missing" file, and direct exit 0

Disposable answered 7/3, 2021 at 3:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.