comparison fixincludes/check.tpl @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents 77e2b8dfacca
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
83 (if (not (exist? "replace")) 83 (if (not (exist? "replace"))
84 (error (sprintf "include fix '%s' has no test text" 84 (error (sprintf "include fix '%s' has no test text"
85 (get "hackname") )) ) 85 (get "hackname") )) )
86 =][= 86 =][=
87 ELSE =] 87 ELSE =]
88 cat >> [= 88 cat >> [= (raw-shell-str (if (exist? "files") (get "files[0]") "testing.h"))
89 IF (exist? "files") =][= 89 =] <<_HACK_EOF_
90 files[0] =][=
91 ELSE =]testing.h[=
92 ENDIF =] <<_HACK_EOF_
93 90
94 91
95 #if defined( [=(. HACK)=]_CHECK ) 92 #if defined( [=(. HACK)=]_CHECK )
96 [=test_text=] 93 [=test_text=]
97 #endif /* [=(. HACK)=]_CHECK */ 94 #endif /* [=(. HACK)=]_CHECK */
100 97
101 ENDFOR fix 98 ENDFOR fix
102 99
103 =] 100 =]
104 101
102 export TEST_MODE=true
105 find . -type f | sed 's;^\./;;' | sort | ../../fixincl 103 find . -type f | sed 's;^\./;;' | sort | ../../fixincl
106 cd ${DESTDIR} 104 cd ${DESTDIR}
107 105
108 exitok=true 106 exitok=true
109 107
123 # 121 #
124 exitok=` 122 exitok=`
125 exec < ${TESTDIR}/LIST 123 exec < ${TESTDIR}/LIST
126 while read f 124 while read f
127 do 125 do
126 if [ -n "$MSYSTEM" -o -n "$DJGPP" ]
127 then
128 # On MinGW and DJGPP convert line endings to avoid false positives
129 mv $f $f.dos; tr -d '\r' < $f.dos > $f; rm $f.dos
130 fi
128 if [ ! -f ${TESTBASE}/$f ] 131 if [ ! -f ${TESTBASE}/$f ]
129 then 132 then
130 echo "Newly fixed header: $f" >&2 133 echo "Newly fixed header: $f" >&2
131 exitok=false 134 exitok=false
132 135
141 done 144 done
142 echo $exitok` 145 echo $exitok`
143 146
144 cd $TESTBASE 147 cd $TESTBASE
145 148
146 find * -type f -print | \ 149 find * -type f ! -name .DS_Store ! -name CVS ! -name .svn -print \
147 fgrep -v 'CVS/' | \ 150 > ${TESTDIR}/LIST
148 fgrep -v '.svn/' > ${TESTDIR}/LIST
149 151
150 exitok=` 152 exitok=`
151 exec < ${TESTDIR}/LIST 153 exec < ${TESTDIR}/LIST
152 while read f 154 while read f
153 do 155 do