source: libcaca/trunk/test/check-build @ 4303

Last change on this file since 4303 was 4303, checked in by Sam Hocevar, 10 years ago

Don't fail the check-build test if documentation was not built.

  • Property svn:executable set to *
File size: 1.5 KB
Line 
1#!/bin/sh
2
3ret=0
4
5#
6# Check that the Win32 config.h is in sync with config.h.in
7#
8
9config_h_in=$(dirname "$0")/../config.h.in
10win32_config_h=$(dirname "$0")/../win32/config.h
11
12failure=0
13for key in $(sed -ne 's/.*#undef *\([A-Za-z0-9_]*\).*/\1/p' "$config_h_in");
14do
15  if ! grep '[ef] \<'"$key"'\>' "$win32_config_h" >/dev/null 2>&1; then
16    echo "error: $key missing from win32/config.h"
17    failure=1
18  fi
19done
20if test "$failure" != "0"; then
21  ret=1
22else
23  echo "0 errors in Win32 config.h"
24fi
25
26#
27# Check that we have no tabs or trailing spaces in the source code
28#
29failure=0
30for dir in caca kernel src cxx examples ruby tools; do
31  pushd ../$dir >/dev/null
32  for x in $(make -s echo-sources); do
33    case "$x" in
34     *.c|*.cpp|*.h|*.m) ;;
35     *) continue ;;
36    esac
37    if grep '[[:space:]]$' "$x" >/dev/null 2>&1; then
38      echo "error: $dir/$x contains trailing spaces"
39      failure=1
40    fi
41    if grep '   ' "$x" >/dev/null 2>&1; then
42      echo "error: $dir/$x contains tabs"
43      failure=1
44    fi
45  done
46  popd >/dev/null
47done
48if test "$failure" != "0"; then
49  ret=1
50else
51  echo "0 errors in source code"
52fi
53
54#
55# Check for Doxygen errors
56#
57warnings="$(grep -c Warning: ../doc/doxygen.log 2>/dev/null || echo 0)"
58if test "$warnings" != "0"; then
59  echo "error: $warnings warnings in Doxygen generation:"
60  grep Warning: ../doc/doxygen.log | sed 's/\(.\{75\}\)...*/\1 .../'
61  ret=1
62else
63  echo "0 visible errors in documentation"
64fi
65
66if test "$ret" != "0"; then
67  exit 1
68fi
69
70exit 0
71
Note: See TracBrowser for help on using the repository browser.