diff fixincludes/check.tpl @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents 77e2b8dfacca
children
line wrap: on
line diff
--- a/fixincludes/check.tpl	Sun Aug 21 07:07:55 2011 +0900
+++ b/fixincludes/check.tpl	Fri Oct 27 22:46:09 2017 +0900
@@ -85,11 +85,8 @@
                         (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 @@
 
 =]
 
+export TEST_MODE=true
 find . -type f | sed 's;^\./;;' | sort | ../../fixincl
 cd ${DESTDIR}
 
@@ -125,6 +123,11 @@
 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,9 +146,8 @@
 
 cd $TESTBASE
 
-find * -type f -print | \
-fgrep -v 'CVS/' | \
-fgrep -v '.svn/' > ${TESTDIR}/LIST
+find * -type f ! -name .DS_Store ! -name CVS ! -name .svn -print \
+> ${TESTDIR}/LIST
 
 exitok=`
 exec < ${TESTDIR}/LIST