Changeset b75671d for configure


Ignore:
Timestamp:
2015-06-17T22:47:26Z (9 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Children:
b441614
Parents:
d832164 (diff), 2f99f23 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge remote-tracking branch 'origin/master' into parson

File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure

    rd832164 rb75671d  
    6767get_version() {
    6868        REAL_BITLBEE_VERSION=$(grep '^#define BITLBEE_VERSION ' $srcdir/bitlbee.h | sed 's/.*\"\(.*\)\".*/\1/')
     69
     70        if [ -n "$BITLBEE_VERSION" ]; then
     71                # environment variable already set to something to spoof it
     72                # don't replace it with the git stuff
     73                return
     74        fi
     75
    6976        BITLBEE_VERSION=$REAL_BITLBEE_VERSION
    7077
     
    7380                branch=$(cd $srcdir; git rev-parse --abbrev-ref HEAD)
    7481
    75                 search="(.+)-([0-9]+)-(g[0-9a-f]+)"
     82                search='\(.*\)-\([0-9]*\)-\(g[0-9a-f]*\)'
    7683                replace="\1+$timestamp+$branch+\2-\3-git"
    7784
    78                 BITLBEE_VERSION=$(cd $srcdir; git describe --long --tags | sed -r "s/$search/$replace/")
    79 
    80                 unset timestamp branch search replace
     85                describe=$(cd $srcdir; git describe --long --tags 2>/dev/null)
     86                if [ $? -ne 0 ]; then
     87                        describe=${REAL_BITLBEE_VERSION}-0-g$(cd $srcdir; git rev-parse --short HEAD)
     88                fi
     89
     90                BITLBEE_VERSION=$(echo $describe | sed "s#$search#$replace#")
     91
     92                unset timestamp branch search replace describe
    8193        fi
    8294}
     
    675687fi
    676688
     689if [ -z "$PYTHON" ]; then
     690        PYTHON=python
     691fi
     692
    677693if [ "$doc" = "1" ]; then
    678         if [ ! -e doc/user-guide/help.txt ] && \
    679              ! type xmlto > /dev/null 2> /dev/null || \
    680              ! type xsltproc > /dev/null 2> /dev/null
    681         then
     694        # check this here just in case someone tries to install it in python2.4...
     695        if ! $PYTHON -m xml.etree.ElementTree > /dev/null 2>&1; then
    682696                echo
    683                 echo 'WARNING: Building from an unreleased source tree without prebuilt helpfile.'
    684                 echo 'Install xmlto and xsltproc if you want online help to work.'
    685         else
    686                 echo "DOC=1" >> Makefile.settings
    687         fi
    688 
    689         if [ "$skype" = "1" -o "$skype" = "plugin" ]; then
    690                 # skype also needs asciidoc
    691                 if ! type a2x > /dev/null 2> /dev/null; then
    692                         echo
    693                         echo 'WARNING: The skyped man page requires asciidoc. It will not be generated.'
    694                 else
    695                         echo "ASCIIDOC=1" >> Makefile.settings
    696                 fi
    697         fi
     697                echo 'ERROR: Python (>=2.5 or 3.x) is required to generate docs'
     698                echo "(Use the PYTHON environment variable if it's in a weird location)"
     699                exit 1
     700        fi
     701        echo "DOC=1" >> Makefile.settings
     702        echo "PYTHON=$PYTHON" >> Makefile.settings
    698703fi
    699704
Note: See TracChangeset for help on using the changeset viewer.