Last change
on this file since 4220 was
4220,
checked in by Sam Hocevar, 10 years ago
|
Clean up .gitignore and documentation build rules.
|
-
Property svn:executable set to
*
|
File size:
1.3 KB
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | |
---|
3 | ret=0 |
---|
4 | |
---|
5 | # |
---|
6 | # Check that the Win32 config.h is in sync with config.h.in |
---|
7 | # |
---|
8 | |
---|
9 | config_h_in=$(dirname "$0")/../config.h.in |
---|
10 | win32_config_h=$(dirname "$0")/../win32/config.h |
---|
11 | |
---|
12 | failure=0 |
---|
13 | for key in $(sed -ne 's/.*#undef *\([A-Za-z0-9_]*\).*/\1/p' "$config_h_in"); |
---|
14 | do |
---|
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 |
---|
19 | done |
---|
20 | if test "$failure" != "0"; then |
---|
21 | ret=1 |
---|
22 | else |
---|
23 | echo "0 errors in Win32 config.h" |
---|
24 | fi |
---|
25 | |
---|
26 | # |
---|
27 | # Check that we have no tabs or trailing spaces in the source code |
---|
28 | # |
---|
29 | failure=0 |
---|
30 | for dir in caca src cxx examples ruby tools; do |
---|
31 | pushd ../$dir >/dev/null |
---|
32 | for x in $(make echo-sources); do |
---|
33 | if grep '[[:space:]]$' "$x" >/dev/null 2>&1; then |
---|
34 | echo "error: $dir/$x contains trailing spaces" |
---|
35 | failure=1 |
---|
36 | fi |
---|
37 | if grep ' ' "$x" >/dev/null 2>&1; then |
---|
38 | echo "error: $dir/$x contains tabs" |
---|
39 | failure=1 |
---|
40 | fi |
---|
41 | done |
---|
42 | popd >/dev/null |
---|
43 | done |
---|
44 | if test "$failure" != "0"; then |
---|
45 | ret=1 |
---|
46 | else |
---|
47 | echo "0 errors in source code" |
---|
48 | fi |
---|
49 | |
---|
50 | # |
---|
51 | # Check for Doxygen errors |
---|
52 | # |
---|
53 | warnings="$(grep -c Warning: ../doc/doxygen.log)" |
---|
54 | if test "$warnings" != "0"; then |
---|
55 | echo "error: $warnings warnings in Doxygen generation" |
---|
56 | ret=1 |
---|
57 | else |
---|
58 | echo "0 errors in documentation" |
---|
59 | fi |
---|
60 | |
---|
61 | if test "$ret" != "0"; then |
---|
62 | exit 1 |
---|
63 | fi |
---|
64 | |
---|
65 | exit 0 |
---|
66 | |
---|
Note: See
TracBrowser
for help on using the repository browser.