From 60100886993dc7473bf7a4c98318e8be6dc8b36d Mon Sep 17 00:00:00 2001 From: Rob Savoye Date: Tue, 15 Feb 1994 03:33:46 +0000 Subject: [PATCH] Use new config features of DejaGnu in site.exp file. --- binutils/testsuite/Makefile.in | 40 ++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/binutils/testsuite/Makefile.in b/binutils/testsuite/Makefile.in index 19c92bbecb3..3fb5fc57b6a 100644 --- a/binutils/testsuite/Makefile.in +++ b/binutils/testsuite/Makefile.in @@ -1,6 +1,7 @@ srcdir = . prefix = /usr/local +program_transform_name = exec_prefix = $(prefix) bindir = $(exec_prefix)/bin libdir = $(exec_prefix)/lib @@ -34,9 +35,36 @@ CFLAGS = -g CHILLFLAGS = $(CFLAGS) CHILL_LIB = -lchill $(end-sanitize-chill) + +CC_FOR_TARGET = ` \ + if [ -f $${rootme}/../../gcc/xgcc ] ; then \ + echo $${rootme}/../../gcc/xgcc -B$${rootme}/../../gcc/; \ + else \ + if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ + echo $(CC); \ + else \ + t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \ + fi; \ + fi` + CXX = gcc +CXX_FOR_TARGET = ` \ + if [ -f $${rootme}/../../gcc/xgcc ] ; then \ + echo $${rootme}/../../gcc/xgcc -B$${rootme}/../../gcc/; \ + else \ + if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ + echo $(CXX); \ + else \ + t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \ + fi; \ + fi` + CXXFLAGS = -g -O +EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; \ + then echo $${rootme}/../../expect/expect ; \ + else echo expect; fi` + LINK= ln -s SUBDIRS= @@ -44,6 +72,7 @@ RUNTEST = runtest RUNTESTFLAGS = FLAGS_TO_PASS = \ "CC=$(CC)" \ + "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ "CFLAGS=$(CFLAGS)" #### host, target, and site specific Makefile frags come in here. @@ -62,13 +91,12 @@ install-info: $(MAKE) subdir_do DO=install-info "DODIRS=$(INFODIRS)" $(FLAGS_TO_PASS) check: site.exp all - $(RUNTEST) $(RUNTESTFLAGS) $(FLAGS_TO_PASS) --tool binutils --srcdir $(srcdir) + $(RUNTEST) $(RUNTESTFLAGS) site.exp: ./config.status Makefile @echo "Making a new config file..." -@rm -f ./tmp? @touch site.exp - -@mv site.exp site.bak @echo "## these variables are automatically generated by make ##" > ./tmp0 @echo "# Do not edit here. If you wish to override these values" >> ./tmp0 @@ -76,6 +104,14 @@ site.exp: ./config.status Makefile @echo "set host_triplet ${host_canonical}" >> ./tmp0 @echo "set target_triplet ${target_canonical}" >> ./tmp0 @echo "set tool binutils" >> ./tmp0 + @echo "set srcdir ${srcdir}" >> ./tmp0 + @echo "set RANLIB [findfile \$$base_dir/../ranlib]" >> ./tmp0 + @echo "set OBJCOPY [findfile \$$base_dir/../objcopy]" >> ./tmp0 + @echo "set STRIP [findfile \$$base_dir/../strip]" >> ./tmp0 + @echo "set STRINGS [findfile \$$base_dir/../strings]" >> ./tmp0 + @echo "set NM [findfile \$$base_dir/../nm]" >> ./tmp0 + @echo "set OBJDUMP [findfile \$$base_dir/../objdump]" >> ./tmp0 + @echo "set SIZE [findfile \$$base_dir/../size]" >> ./tmp0 @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0 @cat ./tmp0 > site.exp @cat site.bak | sed \ -- 2.30.2