summaryrefslogtreecommitdiff
path: root/gcc/fixinc
diff options
context:
space:
mode:
authorkorbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4>2001-05-26 16:17:46 +0000
committerkorbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4>2001-05-26 16:17:46 +0000
commitbeabccff154835098621c8d4ae7b3b8cd004dc4f (patch)
tree8a5b7a85ad3fa7bec9417fa703b87ef2a07913b0 /gcc/fixinc
parentf31add048e45084cada3b65a245e7a91c6e21538 (diff)
downloadgcc-beabccff154835098621c8d4ae7b3b8cd004dc4f.tar.gz
This check template is now upgraded for AutoGen5
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42632 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fixinc')
-rw-r--r--gcc/fixinc/check.tpl72
1 files changed, 35 insertions, 37 deletions
diff --git a/gcc/fixinc/check.tpl b/gcc/fixinc/check.tpl
index 592a69b1f08..c89b214d91b 100644
--- a/gcc/fixinc/check.tpl
+++ b/gcc/fixinc/check.tpl
@@ -25,53 +25,51 @@ export TARGET_MACHINE DESTDIR SRCDIR FIND_BASE VERBOSE INPUT ORIGDIR
rm -rf ${DESTDIR} ${SRCDIR}
mkdir ${DESTDIR} ${SRCDIR}
-
-( cd ${SRCDIR}
- set +e
- for f in [=
-
- (shellf "echo `
-
- for f in %s
- do case $f in
- */* ) echo $f | sed 's;/[^/]*$;;' ;;
- esac
- done | sort -u
-
- ` " (join " " (stack "fix.files")) ) =]
- do
- mkdir $f || mkdir -p $f
- done ) > /dev/null 2>&1
-
+(
+[=
+ (shellf
+ "for f in %s
+ do case $f in
+ */* ) echo $f | sed 's;/[^/]*$;;' ;;
+ esac
+ done | sort -u | \
+ while read g
+ do echo \" mkdir \\${SRCDIR}/$g || mkdir -p \\${SRCDIR}/$g || exit 1\"
+ done" (join " " (stack "fix.files")) ) =]
+) 2> /dev/null[= # suppress 'No such file or directory' messages =]
cd inc
[=
+(define sfile "")
+(define dfile "") =][=
-FOR fix =][=
+FOR fix =][=
- IF (> (count "test_text") 1) =]
-#
-# [=hackname=] has [=(count "test_text")=] tests
-#
-sfile=[=
- IF (exist? "files") =][=
- files[] =][=
- ELSE =]testing.h[=
- ENDIF =][=
- FOR test_text FROM 1 =]
-dfile=`dirname $sfile`/[=(string-tr! (get "hackname") "_A-Z" "-a-z")
- =]-[=(for-index)=].h
-cat >> $sfile <<_HACK_EOF_
+ IF (> (count "test_text") 1) =][=
+
+ (set! sfile (if (exist? "files") (get "files[]") "testing.h"))
+ (set! dfile (string-append
+ (if (*==* sfile "/")
+ (shellf "echo \"%s\"|sed 's,/[^/]*,/,'" sfile )
+ "" )
+ (string-tr! (get "hackname") "_A-Z" "-a-z")
+ ) ) =][=
+
+ FOR test_text (for-from 1) =]
+cat >> [=(. sfile)=] <<_HACK_EOF_
#if defined( [=(string-upcase! (get "hackname"))=]_CHECK_[=(for-index)=] )
[=test_text=]
#endif /* [=(string-upcase! (get "hackname"))=]_CHECK_[=(for-index)=] */
_HACK_EOF_
-echo $sfile | ../../fixincl
-mv -f $sfile $dfile
-[ -f ${DESTDIR}/$sfile ] && mv ${DESTDIR}/$sfile ${DESTDIR}/$dfile[=
+echo [=(. sfile)=] | ../../fixincl
+mv -f [=(. sfile)=] [=(. dfile)=]-[=(for-index)=].h
+[ -f ${DESTDIR}/[=(. sfile)=] ] && [=#
+ =]mv ${DESTDIR}/[=(. sfile)=] ${DESTDIR}/[=(. dfile)=]-[=(for-index)=].h[=
+
ENDFOR test_text =][=
- ENDIF =][=
+
+ ENDIF multi-test =][=
ENDFOR fix
@@ -138,7 +136,7 @@ do
:
else
- diff -c $f ${TESTBASE}/$f >&2 || :
+ diff -u $f ${TESTBASE}/$f >&2 || :
exitok=false
fi
done