File: check-versions.sh.in

package info (click to toggle)
simulavr 1.0.0+git20160221.e53413b-1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 5,748 kB
  • sloc: cpp: 35,491; python: 6,991; ansic: 3,567; makefile: 1,072; sh: 653; asm: 414; tcl: 320
file content (109 lines) | stat: -rw-r--r-- 2,477 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#!/bin/sh

# primary tools
echo "[primary]"

# bash
echo "bash.text=Shell (@SHELL@)"
echo "bash.order=2"
echo -n "bash.value="
@SHELL@ --version | head -1

# uname
echo "uname.text=OS"
echo "uname.order=1"
echo -n "uname.value="
uname -srvm

# automake
echo "automake.text=Automake"
echo -n "automake.value="
automake --version | head -1

# autoconf
echo "autoconf.text=Autoconf"
echo -n "autoconf.value="
autoconf --version | head -1

# libtool
echo -n "libtool.value="
if test "`uname -s`" = "Darwin" -a -n "`which glibtool 2> /dev/null`" ; then
  glibtool --version | head -1
  echo "libtool.text=Glibtool (Darwin)"
else
  libtool --version | head -1
  echo "libtool.text=Libtool"
fi

# configured tools
echo "[configured]"

# python command
echo "python.text=Python"
echo "python.order=1"
echo -n "python.value="
@PYTHON_CMD_USE_TRUE@@PYTHON@ -c 'import sys; print(" ".join(sys.version.split()))'
@PYTHON_CMD_USE_FALSE@echo "n/a"

# available python modules
echo "pymod.text=Python modules"
echo "pymod.order=2"
PMOD=
@HAVE_PYMOD_rst2pdf_TRUE@PMOD="$PMOD rstpdf"
@HAVE_PYMOD_sphinx_TRUE@PMOD="$PMOD sphinx"
@HAVE_PYMOD_wheel_TRUE@PMOD="$PMOD wheel"
@HAVE_PYMOD_setuptools_TRUE@PMOD="$PMOD setuptools"
echo "pymod.value=$PMOD"

# tclsh command
echo "tclsh.text=Tclsh"
echo "tclsh.order=3"
echo -n "tclsh.value="
@HAVE_TCLSH_TRUE@echo 'puts $tcl_patchLevel; exit' | @TCL_SHELL@
@HAVE_TCLSH_FALSE@echo "n/a"

# GCC und G++
echo "gcc.text=GCC"
echo "gcc.order=6"
echo -n "gcc.value="
@CC@ --version | head -1

# swig
echo "swig.text=SWIG"
echo -n "swig.value="
@USE_SWIG_TRUE@@SWIG@ -version | awk '/.+/{print $0}' | head -3 | tr '\n' ' '
@USE_SWIG_TRUE@echo ""
@USE_SWIG_FALSE@echo "n/a"

# AVRGCC und AVRG++
echo "avrgcc.text=AVR-GCC"
echo "avrgcc.order=8"
echo -n "avrgcc.value="
@USE_AVR_CROSS_TRUE@@AVR_GCC@ --version | head -1
@USE_AVR_CROSS_FALSE@echo "n/a"

# avr-libc
echo "avrlibc.text=AVR-Libc"
echo "avrlibc.order=9"
echo -n "avrlibc.value="
@USE_AVR_CROSS_TRUE@CHECK="yes"
@USE_AVR_CROSS_FALSE@CHECK="no"
if test $CHECK = "yes" ; then
  P=`mktemp -dt check-versions.XXXXXXXXXXXXX`
  S=$P/test.c
  D=$P/test.s
  cat > $S <<EOD
#include <avr/version.h>
char *LIBC_VER = __AVR_LIBC_VERSION_STRING__ ;
char *LIBC_DATE = __AVR_LIBC_DATE_STRING__ ;
EOD
  @AVR_GCC@ -mmcu=atmega16 -E -o $D $S
  V=`cat $D | grep LIBC_VER | awk '{print $4}' | tr -d '"'`
  T=`cat $D | grep LIBC_DATE | awk '{print $4}' | tr -d '"'`
  rm -rf $P
  echo "$V ($T)"
else
  echo "n/a"
fi

# EOF