summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-04-18 09:49:23 +0000
committerrubidium <rubidium@openttd.org>2008-04-18 09:49:23 +0000
commit2070cee0892591be5842842c1e6be41cdeda2f36 (patch)
tree03ea9dcaf412d768fc928e63bdd98dd3f14cb7e9
parent8fa715e43b54c2d3dd9597a9c02edf95c9e1d9bf (diff)
downloadopenttd-2070cee0892591be5842842c1e6be41cdeda2f36.tar.xz
(svn r12764) -Add: check for missing (forgotten) header files in the generate script.
-rwxr-xr-xprojects/generate9
1 files changed, 9 insertions, 0 deletions
diff --git a/projects/generate b/projects/generate
index 0e1929583..ee036f467 100755
--- a/projects/generate
+++ b/projects/generate
@@ -55,6 +55,15 @@ safety_check() {
done
}
+grep '\.h' "$ROOT_DIR/source.list" | grep -v '../objs/langs/table/strings.h' | sort > tmp.headers.source.list
+find "$ROOT_DIR/src" -iname "*.h*" -and -not -iname "*svn*" -and -not -iname "*.hpp.sq" | sed "s@$ROOT_DIR/src/@@" | sort > tmp.headers.src
+if [ -n "`diff tmp.headers.source.list tmp.headers.src`" ]; then
+ echo "The following headers are missing in source.list and not in /src/ or vice versa."
+ diff tmp.headers.source.list tmp.headers.src | grep '[<>]' | sort
+ echo ""
+fi
+rm tmp.headers.*
+
load_main_data() {
# Read the source.list and process it
RES="`cat $1 | tr '\r' '\n' | awk '