]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - fixincludes/check.tpl
Make TOPN counter dynamically allocated.
[thirdparty/gcc.git] / fixincludes / check.tpl
index a5b7363bf7394a535104986a544b529271a1ef7b..496420846bdec0764011b88a1d1ca07b5a5d0f5e 100644 (file)
@@ -1,7 +1,7 @@
 [= autogen5 template sh=check.sh =]
 [=
 #
-#  This file contanes the shell template to run tests on the fixes
+#  This file contains the shell template to run tests on the fixes
 #
 =]#!/bin/sh
 
@@ -85,11 +85,8 @@ FOR fix  =][=
                         (get "hackname") )) )
          =][=
   ELSE   =]
-cat >> [=
-    IF (exist? "files") =][=
-      files[0] =][=
-    ELSE =]testing.h[=
-    ENDIF =] <<_HACK_EOF_
+cat >> [= (raw-shell-str (if (exist? "files") (get "files[0]") "testing.h"))
+         =] <<_HACK_EOF_
 
 
 #if defined( [=(. HACK)=]_CHECK )
@@ -102,6 +99,7 @@ ENDFOR  fix
 
 =]
 
+export TEST_MODE=true
 find . -type f | sed 's;^\./;;' | sort | ../../fixincl
 cd ${DESTDIR}
 
@@ -125,6 +123,11 @@ exitok=`
 exec < ${TESTDIR}/LIST
 while read f
 do
+  if [ -n "$MSYSTEM" -o -n "$DJGPP" ]
+  then
+    # On MinGW and DJGPP convert line endings to avoid false positives
+    mv $f $f.dos; tr -d '\r' < $f.dos > $f; rm $f.dos
+  fi
   if [ ! -f ${TESTBASE}/$f ]
   then
     echo "Newly fixed header:  $f" >&2
@@ -143,8 +146,8 @@ echo $exitok`
 
 cd $TESTBASE
 
-find * -type f -print | \
-fgrep -v '.svn/' > ${TESTDIR}/LIST
+find * -type f ! -name .DS_Store ! -name CVS ! -name .svn -print \
+> ${TESTDIR}/LIST
 
 exitok=`
 exec < ${TESTDIR}/LIST