1994-04-12 07:17:18 +08:00
|
|
|
# Makefile for regression testing the GNU debugger.
|
1994-07-25 00:56:45 +08:00
|
|
|
# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
|
1994-04-12 07:17:18 +08:00
|
|
|
|
1994-07-25 00:56:45 +08:00
|
|
|
# This file is part of GDB.
|
1994-04-12 07:17:18 +08:00
|
|
|
|
1994-07-25 00:56:45 +08:00
|
|
|
# GDB is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
# any later version.
|
1994-04-12 07:17:18 +08:00
|
|
|
|
1994-07-25 00:56:45 +08:00
|
|
|
# GDB is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
1994-04-12 07:17:18 +08:00
|
|
|
|
1994-07-25 00:56:45 +08:00
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; see the file COPYING. If not, write to
|
|
|
|
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
1994-04-12 07:17:18 +08:00
|
|
|
|
1993-02-23 00:20:25 +08:00
|
|
|
srcdir = .
|
|
|
|
prefix = /usr/local
|
1994-04-12 07:17:18 +08:00
|
|
|
program_transform_name =
|
1993-02-23 00:20:25 +08:00
|
|
|
|
|
|
|
exec_prefix = $(prefix)
|
|
|
|
bindir = $(exec_prefix)/bin
|
|
|
|
libdir = $(exec_prefix)/lib
|
|
|
|
tooldir = $(libdir)/$(target_alias)
|
|
|
|
|
1993-03-25 09:25:09 +08:00
|
|
|
datadir = $(exec_prefix)/lib/dejagnu
|
1993-02-23 00:20:25 +08:00
|
|
|
mandir = $(prefix)/man
|
|
|
|
man1dir = $(mandir)/man1
|
|
|
|
man2dir = $(mandir)/man2
|
|
|
|
man3dir = $(mandir)/man3
|
|
|
|
man4dir = $(mandir)/man4
|
|
|
|
man5dir = $(mandir)/man5
|
|
|
|
man6dir = $(mandir)/man6
|
|
|
|
man7dir = $(mandir)/man7
|
|
|
|
man8dir = $(mandir)/man8
|
|
|
|
man9dir = $(mandir)/man9
|
|
|
|
infodir = $(prefix)/info
|
|
|
|
includedir = $(prefix)/include
|
|
|
|
gxx_includedir = $(tooldir)/g++-include
|
|
|
|
docdir = $(datadir)/doc
|
|
|
|
targetdir = $(datadir)/$(target_alias)
|
|
|
|
|
|
|
|
SHELL = /bin/sh
|
|
|
|
|
|
|
|
INSTALL = install -c
|
|
|
|
INSTALL_PROGRAM = $(INSTALL)
|
|
|
|
INSTALL_DATA = $(INSTALL)
|
|
|
|
|
|
|
|
CFLAGS = -g
|
1994-05-13 05:08:47 +08:00
|
|
|
# start-sanitize-chill
|
1993-02-23 00:20:25 +08:00
|
|
|
CHILLFLAGS = $(CFLAGS)
|
1994-05-13 05:08:47 +08:00
|
|
|
# end-sanitize-chill
|
1994-04-12 07:17:18 +08:00
|
|
|
# This should probably be consistent with the top-level Makefile.in,
|
|
|
|
# gdb/Makefile.in, and gdb/testsuite/gdb.t2*/Makefile.in, so that "make check"
|
|
|
|
# has the same effect no matter where it is run.
|
|
|
|
CXXFLAGS = -g -O
|
1993-02-23 00:20:25 +08:00
|
|
|
|
|
|
|
LINK= ln -s
|
|
|
|
SUBDIRS=
|
|
|
|
|
1994-04-12 07:17:18 +08:00
|
|
|
EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; then \
|
|
|
|
echo $${rootme}/../../expect/expect ; \
|
|
|
|
else echo expect ; fi`
|
|
|
|
|
1994-07-25 00:56:45 +08:00
|
|
|
RUNTEST = $(RUNTEST_FOR_TARGET)
|
|
|
|
|
|
|
|
RUNTESTFLAGS =
|
|
|
|
|
|
|
|
RUNTEST_FOR_TARGET = `\
|
|
|
|
if [ -f $${srcdir}/../../dejagnu/runtest ]; then \
|
|
|
|
echo $${srcdir}/../../dejagnu/runtest; \
|
1993-02-23 00:20:25 +08:00
|
|
|
else \
|
1994-07-25 00:56:45 +08:00
|
|
|
if [ "$(host_canonical)" = "$(target_canonical)" ]; then \
|
|
|
|
echo runtest; \
|
1994-04-12 07:17:18 +08:00
|
|
|
else \
|
|
|
|
t='$(program_transform_name)'; echo runtest | sed -e '' $$t; \
|
|
|
|
fi; \
|
|
|
|
fi`
|
|
|
|
|
|
|
|
CC_FOR_TARGET = ` \
|
|
|
|
if [ -f $${rootme}/../../gcc/xgcc ] ; then \
|
1994-07-29 05:23:28 +08:00
|
|
|
if [ -f $${rootme}/../../newlib/Makefile ]; then \
|
1995-02-16 08:35:53 +08:00
|
|
|
echo $${rootme}/../../gcc/xgcc -B$${rootme}/../../gcc/ -idirafter $${rootme}/../../newlib/targ-include -idirafter $${rootsrc}/../../newlib/libc/include -nostdinc -L$${rootme}/../../newlib -B$${rootme}/../../newlib/; \
|
1994-07-29 05:23:28 +08:00
|
|
|
else \
|
|
|
|
echo $${rootme}/../../gcc/xgcc -B$${rootme}/../../gcc/; \
|
|
|
|
fi; \
|
1994-04-12 07:17:18 +08:00
|
|
|
else \
|
|
|
|
if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
|
|
|
|
echo $(CC); \
|
1993-02-23 00:20:25 +08:00
|
|
|
else \
|
|
|
|
t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
|
|
|
|
fi; \
|
|
|
|
fi`
|
|
|
|
|
1994-04-12 07:17:18 +08:00
|
|
|
CXX = gcc
|
|
|
|
CXX_FOR_TARGET = ` \
|
|
|
|
if [ -f $${rootme}/../../gcc/xgcc ] ; then \
|
1994-07-29 05:33:56 +08:00
|
|
|
if [ -f $${rootme}/../../newlib/Makefile ]; then \
|
1995-02-16 08:35:53 +08:00
|
|
|
echo $${rootme}/../../gcc/xgcc -B$${rootme}/../../gcc/ -idirafter $${rootme}/../../newlib/targ-include -idirafter $${rootsrc}/../../newlib/libc/include -nostdinc -L$${rootme}/../../newlib -B$${rootme}/../../newlib/; \
|
1994-07-29 05:23:28 +08:00
|
|
|
else \
|
|
|
|
echo $${rootme}/../../gcc/xgcc -B$${rootme}/../../gcc/; \
|
|
|
|
fi; \
|
1993-02-23 00:20:25 +08:00
|
|
|
else \
|
|
|
|
if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
|
1994-04-12 07:17:18 +08:00
|
|
|
echo $(CXX); \
|
1993-02-23 00:20:25 +08:00
|
|
|
else \
|
|
|
|
t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
|
|
|
|
fi; \
|
|
|
|
fi`
|
|
|
|
|
1994-05-13 05:08:47 +08:00
|
|
|
# start-sanitize-chill
|
1994-04-12 07:17:18 +08:00
|
|
|
CHILLFLAGS = $(CFLAGS)
|
|
|
|
CHILL = gcc
|
|
|
|
CHILL_FOR_TARGET = ` \
|
1994-05-30 13:34:32 +08:00
|
|
|
if [ -f $${rootme}/../../gcc/Makefile ] ; then \
|
|
|
|
echo $${rootme}/../../gcc/xgcc -B$${rootme}../../gcc/; \
|
1994-04-12 07:17:18 +08:00
|
|
|
else \
|
|
|
|
if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
|
1994-05-30 13:34:32 +08:00
|
|
|
echo gcc; \
|
1994-04-12 07:17:18 +08:00
|
|
|
else \
|
|
|
|
t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
|
|
|
|
fi; \
|
|
|
|
fi`
|
1994-05-30 13:34:32 +08:00
|
|
|
CHILL = $(CHILL_FOR_TARGET)
|
1994-04-12 07:17:18 +08:00
|
|
|
|
1994-05-30 13:34:32 +08:00
|
|
|
CHILL_LIB = ` \
|
|
|
|
if [ -f $${rootme}/../../gcc/ch/runtime/libchill.a ] ; then \
|
|
|
|
echo $${rootme}/../../gcc/ch/runtime/chillrt0.o \
|
|
|
|
$${rootme}/../../gcc/ch/runtime/libchill.a; \
|
1993-02-23 00:20:25 +08:00
|
|
|
else \
|
1994-05-30 13:34:32 +08:00
|
|
|
echo -lchill; \
|
1993-02-23 00:20:25 +08:00
|
|
|
fi`
|
1994-05-13 05:08:47 +08:00
|
|
|
# end-sanitize-chill
|
1993-02-23 00:20:25 +08:00
|
|
|
|
1993-04-21 12:18:11 +08:00
|
|
|
GDB = ` \
|
1995-02-16 08:35:53 +08:00
|
|
|
if [ -f $${rootme}/../gdb ] ; then \
|
|
|
|
echo $${rootme}/../gdb ; \
|
|
|
|
else \
|
|
|
|
if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
|
|
|
|
echo gdb; \
|
|
|
|
else \
|
|
|
|
t='$(program_transform_name)'; echo gdb | sed -e '' $$t; \
|
|
|
|
fi; \
|
1993-04-21 12:18:11 +08:00
|
|
|
fi`
|
|
|
|
|
1993-05-24 06:21:17 +08:00
|
|
|
GDBFLAGS = -nx
|
1993-02-23 00:20:25 +08:00
|
|
|
|
|
|
|
#### host, target, and site specific Makefile frags come in here.
|
|
|
|
|
1994-04-12 07:17:18 +08:00
|
|
|
# The use of $$(x_FOR_TARGET) reduces the command line length by not
|
|
|
|
# duplicating the lengthy definition.
|
1994-07-25 00:56:45 +08:00
|
|
|
|
1994-04-12 07:17:18 +08:00
|
|
|
TARGET_FLAGS_TO_PASS = \
|
|
|
|
"prefix=$(prefix)" \
|
|
|
|
"exec_prefix=$(exec_prefix)" \
|
|
|
|
"against=$(against)" \
|
|
|
|
'CC=$$(CC_FOR_TARGET)' \
|
|
|
|
"CC_FOR_TARGET=$(CC_FOR_TARGET)" \
|
|
|
|
"CFLAGS=$(CFLAGS)" \
|
1994-05-26 08:12:21 +08:00
|
|
|
$(start-sanitize-chill) \
|
1994-04-12 07:17:18 +08:00
|
|
|
"CHILLFLAGS=$(CHILLFLAGS)" \
|
|
|
|
'CHILL=$$(CHILL_FOR_TARGET)' \
|
|
|
|
"CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
|
|
|
|
"CHILL_LIB=$(CHILL_LIB)" \
|
1994-05-26 08:12:21 +08:00
|
|
|
$(end-sanitize-chill) \
|
1994-04-12 07:17:18 +08:00
|
|
|
'CXX=$$(CXX_FOR_TARGET)' \
|
|
|
|
"CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
|
|
|
|
"CXXFLAGS=$(CXXFLAGS)" \
|
|
|
|
"MAKEINFO=$(MAKEINFO)" \
|
|
|
|
"INSTALL=$(INSTALL)" \
|
|
|
|
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
|
|
|
|
"INSTALL_DATA=$(INSTALL_DATA)" \
|
|
|
|
"LDFLAGS=$(LDFLAGS)" \
|
|
|
|
"LIBS=$(LIBS)" \
|
|
|
|
"RUNTEST=$(RUNTEST)" \
|
|
|
|
"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
|
|
|
|
"BISON=$(BISON)"
|
1993-02-23 00:20:25 +08:00
|
|
|
|
|
|
|
all: subdirs
|
|
|
|
|
|
|
|
.NOEXPORT:
|
|
|
|
INFODIRS=doc
|
|
|
|
info:
|
|
|
|
install-info:
|
1993-03-25 06:45:00 +08:00
|
|
|
dvi:
|
1993-02-23 00:20:25 +08:00
|
|
|
|
|
|
|
install:
|
|
|
|
|
|
|
|
uninstall: force
|
|
|
|
|
1993-04-19 13:04:41 +08:00
|
|
|
site.exp: ./config.status Makefile
|
1993-03-22 13:51:13 +08:00
|
|
|
@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
|
|
|
|
@echo "# add them to the last section" >> ./tmp0
|
1993-05-24 06:21:17 +08:00
|
|
|
@echo "set GDBFLAGS \"${GDBFLAGS}\"" >> ./tmp0
|
1995-02-16 08:35:53 +08:00
|
|
|
@echo "set host_alias $(host_alias)" >> ./tmp0
|
1993-04-19 13:04:41 +08:00
|
|
|
@echo "set host_triplet ${host_canonical}" >> ./tmp0
|
1995-02-16 08:35:53 +08:00
|
|
|
@echo "set target_alias $(target_alias)" >> ./tmp0
|
1993-04-19 13:04:41 +08:00
|
|
|
@echo "set target_triplet ${target_canonical}" >> ./tmp0
|
1993-03-22 13:51:13 +08:00
|
|
|
@echo "set srcdir ${srcdir}" >> ./tmp0
|
1993-04-19 13:04:41 +08:00
|
|
|
@echo "set tool gdb" >> ./tmp0
|
1993-03-22 13:51:13 +08:00
|
|
|
@echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0
|
|
|
|
@cat ./tmp0 > site.exp
|
|
|
|
@cat site.bak | sed \
|
|
|
|
-e '1,/^## All variables above are.*##/ d' >> site.exp
|
1993-04-19 13:04:41 +08:00
|
|
|
-@rm -f ./tmp?
|
1993-03-22 13:51:13 +08:00
|
|
|
|
1993-03-25 06:45:00 +08:00
|
|
|
installcheck:
|
1994-07-25 00:56:45 +08:00
|
|
|
|
1993-04-29 07:18:10 +08:00
|
|
|
check: site.exp all just-check
|
1994-07-25 00:56:45 +08:00
|
|
|
|
1993-04-29 07:18:10 +08:00
|
|
|
just-check:
|
1993-04-21 12:18:11 +08:00
|
|
|
rootme=`pwd`; export rootme; \
|
1994-04-12 07:17:18 +08:00
|
|
|
srcdir=${srcdir} ; export srcdir ; \
|
|
|
|
EXPECT=${EXPECT} ; export EXPECT ; \
|
|
|
|
if [ -f $${rootme}/../../expect/expect ] ; then \
|
|
|
|
TCL_LIBRARY=$${srcdir}/../../tcl/library ; \
|
|
|
|
export TCL_LIBRARY ; fi ; \
|
1994-07-25 00:56:45 +08:00
|
|
|
$(RUNTEST) $(RUNTESTFLAGS) GDB=$(GDB)
|
1993-03-17 17:05:58 +08:00
|
|
|
|
1993-02-23 00:20:25 +08:00
|
|
|
subdir_do: force
|
|
|
|
@for i in $(DODIRS); do \
|
|
|
|
if [ -d ./$$i ] ; then \
|
|
|
|
if (rootme=`pwd`/ ; export rootme ; \
|
|
|
|
rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \
|
|
|
|
cd ./$$i; \
|
1994-04-12 07:17:18 +08:00
|
|
|
$(MAKE) $(TARGET_FLAGS_TO_PASS) $(DO)) ; then true ; \
|
1993-02-23 00:20:25 +08:00
|
|
|
else exit 1 ; fi ; \
|
|
|
|
else true ; fi ; \
|
|
|
|
done
|
1993-03-17 17:05:58 +08:00
|
|
|
|
|
|
|
force:;
|
1993-02-23 00:20:25 +08:00
|
|
|
|
|
|
|
|
|
|
|
subdirs:
|
|
|
|
for dir in ${SUBDIRS}; \
|
|
|
|
do \
|
|
|
|
echo "$$dir:"; \
|
|
|
|
if [ -d $$dir ]; then \
|
|
|
|
(rootme=`pwd`/ ; export rootme ; \
|
|
|
|
rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \
|
1994-04-12 07:17:18 +08:00
|
|
|
cd $$dir; $(MAKE) $(TARGET_FLAGS_TO_PASS)); \
|
1993-02-23 00:20:25 +08:00
|
|
|
fi; \
|
|
|
|
done
|
|
|
|
|
1993-03-17 17:05:58 +08:00
|
|
|
clean mostlyclean:
|
1993-02-23 00:20:25 +08:00
|
|
|
-rm -f *~ core *.o a.out xgdb *.x
|
1993-03-17 17:05:58 +08:00
|
|
|
for dir in ${SUBDIRS}; \
|
|
|
|
do \
|
|
|
|
echo "$$dir:"; \
|
|
|
|
if [ -d $$dir ]; then \
|
|
|
|
(cd $$dir; $(MAKE) clean); \
|
|
|
|
fi; \
|
|
|
|
done
|
|
|
|
|
|
|
|
distclean realclean: clean
|
1994-04-12 07:17:18 +08:00
|
|
|
-rm -f *~ core *.log *.plog *.sum *.psum site.*
|
1993-02-23 00:20:25 +08:00
|
|
|
-rm -f Makefile config.status *-init.exp
|
1993-08-13 06:05:06 +08:00
|
|
|
-rm -fr *.log summary detail *.plog *.sum *.psum site.*
|
1993-03-17 17:05:58 +08:00
|
|
|
for dir in ${SUBDIRS}; \
|
|
|
|
do \
|
|
|
|
echo "$$dir:"; \
|
1994-07-25 00:56:45 +08:00
|
|
|
if [ -d $$dir ]; then \
|
|
|
|
(cd $$dir; $(MAKE) distclean); \
|
|
|
|
fi; \
|
1993-03-17 17:05:58 +08:00
|
|
|
done
|
1993-02-23 00:20:25 +08:00
|
|
|
|
1993-04-29 07:18:10 +08:00
|
|
|
Makefile : $(srcdir)/Makefile.in $(srcdir)/configure.in $(host_makefile_frag) $(target_makefile_frag)
|
1993-02-23 00:20:25 +08:00
|
|
|
$(SHELL) ./config.status
|