mirror of
https://github.com/osmarks/ngircd.git
synced 2025-02-08 13:20:02 +00:00
Updated contrib/platformtest.sh (new version scheme)
- handle version numbers generated by "git describe" - detect gcc compiler version correctly when "-std=xxx" is used
This commit is contained in:
parent
01c39ba001
commit
05d1df97c3
@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# ngIRCd -- The Next Generation IRC Daemon
|
# ngIRCd -- The Next Generation IRC Daemon
|
||||||
# Copyright (c)2001-2009 Alexander Barton <alex@barton.de>
|
# Copyright (c)2001-2010 Alexander Barton <alex@barton.de>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -51,9 +51,9 @@ if [ $? -ne 0 ]; then
|
|||||||
cd ..
|
cd ..
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$NAME: Checking for ./configure script ..."
|
echo "$NAME: Checking for ./autogen.sh script ..."
|
||||||
if [ ! -e ./configure ]; then
|
if [ -e ./autogen.sh ]; then
|
||||||
echo "$NAME: Not found. Running ./autogen.sh ..."
|
echo "$NAME: Running ./autogen.sh ..."
|
||||||
[ -n "$VERBOSE" ] && ./autogen.sh || ./autogen.sh >/dev/null
|
[ -n "$VERBOSE" ] && ./autogen.sh || ./autogen.sh >/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ fi
|
|||||||
|
|
||||||
# Get compiler information
|
# Get compiler information
|
||||||
if [ -r "Makefile" ]; then
|
if [ -r "Makefile" ]; then
|
||||||
eval $(grep "^CC = " Makefile | sed -e 's/ //g')
|
CC=$(grep "^CC = " Makefile | cut -d' ' -f3)
|
||||||
$CC --version 2>&1 | grep -i "GCC" >/dev/null
|
$CC --version 2>&1 | grep -i "GCC" >/dev/null
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
COMPILER=$($CC --version | head -n 1 | awk "{ print \$3 }" \
|
COMPILER=$($CC --version | head -n 1 | awk "{ print \$3 }" \
|
||||||
@ -103,12 +103,12 @@ if [ -r "Makefile" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Get ngIRCd version information
|
# Get ngIRCd version information
|
||||||
if [ -d ".git" ]; then
|
eval $(grep "^VERSION = " Makefile | sed -e 's/ //g')
|
||||||
VERSION=`git log --abbrev-commit --pretty=oneline HEAD~1.. \
|
case "$VERSION" in
|
||||||
| head -1 | cut -d' ' -f1 | tr -d '.'`
|
*-*-*)
|
||||||
elif [ -r "Makefile" ]; then
|
VERSION=`echo "$VERSION" | cut -d'-' -f3 | cut -b2-`
|
||||||
eval $(grep "^VERSION = " Makefile | sed -e 's/ //g')
|
;;
|
||||||
fi
|
esac
|
||||||
[ -n "$VERSION" ] || VERSION="unknown"
|
[ -n "$VERSION" ] || VERSION="unknown"
|
||||||
|
|
||||||
# Get IO interface information
|
# Get IO interface information
|
||||||
|
Loading…
x
Reference in New Issue
Block a user