Changeset a85a8ab


Ignore:
Timestamp:
2015-02-23T04:50:32Z (5 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
a67e781
Parents:
570f183
Message:

Add --doc= configure option to disable helpfile generation

It will get disabled automatically if the deps (xmlto and xsltproc)
are missing

Also added checks for asciidoc (a2x) for the skype plugin, which needs
it for the skyped man page, and will also get that disabled if --doc=0
is passed or if asciidoc isn't installed.

This should keep those ugly deps under control for now.

I'd like to replace them at some point with something less dumb.

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r570f183 ra85a8ab  
    2525
    2626doc:
     27ifdef DOC
    2728        $(MAKE) -C doc
     29endif
    2830
    2931uninstall: uninstall-bin uninstall-doc
     
    7375
    7476install-doc:
     77ifdef DOC
    7578        $(MAKE) -C doc install
     79endif
    7680ifdef SKYPE_PI
    7781        $(MAKE) -C protocols/skype install-doc
     
    7983
    8084uninstall-doc:
     85ifdef DOC
    8186        $(MAKE) -C doc uninstall
     87endif
    8288ifdef SKYPE_PI
    8389        $(MAKE) -C protocols/skype uninstall-doc
  • configure

    r570f183 ra85a8ab  
    3737purple=0
    3838
     39doc=1
    3940debug=0
    4041strip=1
     
    5960# Cygwin and Darwin don't support PIC/PIE
    6061case "$arch" in
    61     CYGWIN* )
    62         pie=0;;
    63     Darwin )
    64         pie=0;;
     62        CYGWIN* )
     63                pie=0;;
     64        Darwin )
     65                pie=0;;
    6566esac
    6667
     
    9495                (automatically disables other protocol modules)
    9596
     97--doc=0/1       Disable/enable help.txt generation      $doc
    9698--debug=0/1     Disable/enable debugging                $debug
    9799--strip=0/1     Disable/enable binary stripping         $strip
     
    647649fi
    648650
    649 if [ ! -e doc/user-guide/help.txt ] && ! type xmlto > /dev/null 2> /dev/null; then
    650         echo
    651         echo 'WARNING: Building from an unreleased source tree without prebuilt helpfile.'
    652         echo 'Install xmlto if you want online help to work.'
     651if [ "$doc" = "1" ]; then
     652        if [ ! -e doc/user-guide/help.txt ] && \
     653             ! type xmlto > /dev/null 2> /dev/null || \
     654             ! type xsltproc > /dev/null 2> /dev/null
     655        then
     656                echo
     657                echo 'WARNING: Building from an unreleased source tree without prebuilt helpfile.'
     658                echo 'Install xmlto and xsltproc if you want online help to work.'
     659        else
     660                echo "DOC=1" >> Makefile.settings
     661        fi
     662
     663        if [ "$skype" = "1" -o "$skype" = "plugin" ]; then
     664                # skype also needs asciidoc
     665                if ! type a2x > /dev/null 2> /dev/null; then
     666                        echo
     667                        echo 'WARNING: The skyped man page requires asciidoc. It will not be generated.'
     668                else
     669                        echo "ASCIIDOC=1" >> Makefile.settings
     670                fi
     671        fi
    653672fi
    654673
  • doc/Makefile

    r570f183 ra85a8ab  
    66all:
    77        # Only build the docs if this is a git tree
    8         -test ! '(' -d ../.git -o -d ../.bzr ')' || $(MAKE) -C user-guide
     8        test ! '(' -d ../.git -o -d ../.bzr ')' || $(MAKE) -C user-guide
    99
    1010install:
     
    1212        $(INSTALL) -m 0644 $(_SRCDIR_)bitlbee.8 $(DESTDIR)$(MANDIR)/man8/
    1313        $(INSTALL) -m 0644 $(_SRCDIR_)bitlbee.conf.5 $(DESTDIR)$(MANDIR)/man5/
    14         -$(MAKE) -C user-guide $@
     14        $(MAKE) -C user-guide $@
    1515
    1616uninstall:
  • protocols/skype/Makefile

    r570f183 ra85a8ab  
    66DATE := $(shell date +%Y-%m-%d)
    77INSTALL = install
    8 ASCIIDOC = yes
    98
    10 ifeq ($(ASCIIDOC),yes)
     9
     10ifdef ASCIIDOC
    1111MANPAGES = skyped.1
    1212else
     
    2929
    3030install-doc: doc
    31 ifeq ($(ASCIIDOC),yes)
     31ifdef ASCIIDOC
    3232        $(INSTALL) -d $(DESTDIR)$(MANDIR)/man1
    3333        $(INSTALL) -m644 $(MANPAGES) $(DESTDIR)$(MANDIR)/man1
Note: See TracChangeset for help on using the changeset viewer.