Fix build failures involving doc/invoke-*.texi
authorKevin Cernekee <cernekee@gmail.com>
Sat, 8 Mar 2014 04:38:30 +0000 (20:38 -0800)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 8 Mar 2014 08:46:09 +0000 (09:46 +0100)
commit9ad80536986f0a80b426e0091388ef97f0329160
treecc19d0dc01c7bd545856f1b3ec99cb9c510f3123
parentbea0b1bbe0d2877b7bf203920d9e0e1c7e59e6ab
Fix build failures involving doc/invoke-*.texi

Several problems were found in this area:

1) Currently, if SRC_DEF_* are undefined, autogen will get invoked with
no input file and it will hang forever waiting for content from stdin:

    mv -f enums.texi-tmp enums.texi
    mkdir enums
    ../../doc/scripts/split-texi.pl enums enum < enums.texi
    echo stamp_enums > stamp_enums
    cd ../src/ && autogen -Tagtexi-cmd.tpl  && \
        rm -f ../doc/invoke-gnutls-cli.texi && \
        ../doc/scripts/cleanup-autogen.pl <../src/invoke-gnutls-cli.texi >../doc/invoke-gnutls-cli.texi.tmp && \
        mv -f ../doc/invoke-gnutls-cli.texi.tmp ../doc/invoke-gnutls-cli.texi && \
        rm -f ../src/invoke-gnutls-cli.texi
    <HANG>

Since these documents are @include'd by other documents, it is probably
a good idea to make sure the targets are buildable in case they get
listed as prerequisites.

2) SRC_DEF_* used relative paths which are correct for an in-place build,
but incorrect for an out-of-tree build.  They should use something like
$(top_srcdir)/src to resolve the ambiguity.

3) cleanup-autogen.pl was also referenced using a relative pathname,
breaking out-of-tree builds.

4) The non-portable "sed -i" flag was used.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
.gitignore
doc/Makefile.am