This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
[PATCH] MI - Add configury ...
- To: GDB Patches <gdb-patches at sourceware dot cygnus dot com>
- Subject: [PATCH] MI - Add configury ...
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Mon, 21 Feb 2000 18:23:59 +1100
- Organization: Cygnus Solutions
Hello,
The attatched patch adds configury for the MI sub directory to GDB. The
thing that is probably of interest is the addition of the configury
option:
--enable-gdbmi
(It can be changed to --enable-gdb-mi. JimB you tend to be up on this.)
Andrew
Mon Feb 21 13:57:27 2000 Andrew Cagney <cagney@b1.cygnus.com>
* configure.in (CONFIG_INITS): Fix typo, was CONFIG_INIT.
(ENABLE_CFLAGS): Move initialization to start of file.
(enable-gdbmi): Add new configure option --enable-gdbmi. When
selected and an ${srcdir}/mi directory is present enable MI
interface.
* configure: Regenerate.
* Makefile.in (SUBDIR_MI_OBS, SUBDIR_MI_SRCS, SUBDIR_MI_DEPS,
SUBDIR_MI_INITS, SUBDIR_MI_LDFLAGS, SUBDIR_MI_CFLAGS): New macros.
(CONFIG_OBS, CONFIG_SRCS, CONFIG_DEPS, CONFIG_INITS,
CONFIG_LDFLAGS): New macros. Initialized by autoconf via
@CONFIG...@.
(INTERNAL_LDFLAGS, CDEPS, LINTFILES, DEPFILES, SOURCES,
INIT_FILES): Use $(CONFIG_...) instead of @CONFIG...@.
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.5
diff -p -r1.5 Makefile.in
*** Makefile.in 2000/02/16 23:35:19 1.5
--- Makefile.in 2000/02/21 07:08:31
*************** TUI_DIR=tui
*** 141,146 ****
--- 141,167 ----
TUI_SRC = $(srcdir)/$(TUI_DIR)
TUI_CFLAGS= -I$(TUI_SRC)
+ #
+ # MI sub directory definitons
+ #
+ SUBDIR_MI_OBS = \
+ mi-out.o mi-console.o \
+ mi-cmds.o mi-cmd-var.o mi-cmd-break.o mi-cmd-stack.o \
+ mi-cmd-disas.o \
+ mi-main.o mi-parse.o mi-getopt.o
+ SUBDIR_MI_SRCS = \
+ mi/mi-out.c mi/mi-console.c \
+ mi/mi-cmds.c \
+ mi/mi-cmd-var.c mi/mi-cmd-break.c mi/mi-cmd-stack.c \
+ mi/mi-cmd-disas.c \
+ mi/mi-main.c mi/mi-parse.c mi/mi-getopt.c
+ SUBDIR_MI_DEPS =
+ SUBDIR_MI_INITS = \
+ mi/mi-cmds.c mi/mi-parse.c mi/mi-main.c
+ SUBDIR_MI_LDFLAGS=
+ SUBDIR_MI_CFLAGS= \
+ -DUI_OUT=1
+
# Opcodes currently live in one of two places. Either they are in the
# opcode library, typically ../opcodes, or they are in a header file
# in INCLUDE_DIR.
*************** LIBGUI = @LIBGUI@
*** 200,205 ****
--- 221,231 ----
GUI_CFLAGS_X = @GUI_CFLAGS_X@
IDE_CFLAGS=$(GUI_CFLAGS_X) $(IDE_CFLAGS_X)
+ CONFIG_OBS= @CONFIG_OBS@
+ CONFIG_SRCS= @CONFIG_SRCS@
+ CONFIG_DEPS= @CONFIG_DEPS@
+ CONFIG_INITS= @CONFIG_INITS@
+ CONFIG_LDFLAGS = @CONFIG_LDFLAGS@
ENABLE_CFLAGS= @ENABLE_CFLAGS@
# -I. for config files.
*************** INTERNAL_CFLAGS = $(INTERNAL_WARN_CFLAGS
*** 240,246 ****
# Profiling options need to go here to work.
# I think it's perfectly reasonable for a user to set -pg in CFLAGS
# and have it work; that's why CFLAGS is here.
! INTERNAL_LDFLAGS = $(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) $(LDFLAGS) @CONFIG_LDFLAGS@ @HLDFLAGS@
HLDENV = @HLDENV@
# We are using our own version of REGEX now to be consistent across
--- 266,272 ----
# Profiling options need to go here to work.
# I think it's perfectly reasonable for a user to set -pg in CFLAGS
# and have it work; that's why CFLAGS is here.
! INTERNAL_LDFLAGS = $(CFLAGS) $(GLOBAL_CFLAGS) $(PROFILE_CFLAGS) $(LDFLAGS) $(CONFIG_LDFLAGS) @HLDFLAGS@
HLDENV = @HLDENV@
# We are using our own version of REGEX now to be consistent across
*************** CLIBS = $(SIM) $(BFD) $(READLINE) $(OPCO
*** 265,271 ****
$(TERMCAP) $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \
$(MMALLOC) $(LIBIBERTY) $(WIN32LIBS)
CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE) \
! $(OPCODES) $(MMALLOC) $(INTL_DEPS) $(LIBIBERTY) @CONFIG_DEPS@
ADD_FILES = $(REGEX) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
ADD_DEPS = $(REGEX1) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
--- 291,297 ----
$(TERMCAP) $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \
$(MMALLOC) $(LIBIBERTY) $(WIN32LIBS)
CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE) \
! $(OPCODES) $(MMALLOC) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS)
ADD_FILES = $(REGEX) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
ADD_DEPS = $(REGEX1) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
*************** SFILES = ax-general.c ax-gdb.c bcache.c
*** 449,455 ****
tui/tui-file.h tui/tui-file.c \
ui-file.h ui-file.c
! LINTFILES = $(SFILES) $(YYFILES) @CONFIG_SRCS@ init.c
# "system" headers. Using these in dependencies is a rather personal
# choice. (-rich, summer 1993)
--- 475,481 ----
tui/tui-file.h tui/tui-file.c \
ui-file.h ui-file.c
! LINTFILES = $(SFILES) $(YYFILES) $(CONFIG_SRCS) init.c
# "system" headers. Using these in dependencies is a rather personal
# choice. (-rich, summer 1993)
*************** POSSLIBS = gnu-regex.c gnu-regex.h
*** 551,559 ****
# Makefile.in
DEPFILES = $(TDEPFILES) $(XDEPFILES) $(SER_HARDWIRE) $(NATDEPFILES) \
! $(REMOTE_OBS) $(SIM_OBS) @CONFIG_OBS@
! SOURCES = $(SFILES) $(ALLDEPFILES) $(YYFILES) @CONFIG_SRCS@
# Don't include YYFILES (*.tab.c) because we already include *.y in SFILES,
# and it's more useful to see it in the .y file.
TAGFILES_NO_SRCDIR = $(SFILES) $(HFILES_NO_SRCDIR) $(ALLDEPFILES) \
--- 577,585 ----
# Makefile.in
DEPFILES = $(TDEPFILES) $(XDEPFILES) $(SER_HARDWIRE) $(NATDEPFILES) \
! $(REMOTE_OBS) $(SIM_OBS) $(CONFIG_OBS)
! SOURCES = $(SFILES) $(ALLDEPFILES) $(YYFILES) $(CONFIG_SRCS)
# Don't include YYFILES (*.tab.c) because we already include *.y in SFILES,
# and it's more useful to see it in the .y file.
TAGFILES_NO_SRCDIR = $(SFILES) $(HFILES_NO_SRCDIR) $(ALLDEPFILES) \
*************** uninstall: force
*** 693,699 ****
# tui-file.c.
#
! INIT_FILES = $(OBS) $(TSOBS) $(SUBDIR_INIT_FILES) @CONFIG_INITS@
init.c: $(INIT_FILES)
@echo Making init.c
@rm -f init.c-tmp init.l-tmp
--- 719,725 ----
# tui-file.c.
#
! INIT_FILES = $(OBS) $(TSOBS) $(CONFIG_INITS)
init.c: $(INIT_FILES)
@echo Making init.c
@rm -f init.c-tmp init.l-tmp
*************** varobj.o: varobj.c $(defs_h) $(frame_h)
*** 1851,1855 ****
--- 1877,1920 ----
$(language_h) valprint.h varobj.h
$(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $<
wrapper.o: wrapper.c $(defs_h) $(frame_h) $(value_h) wrapper.h
+
+ #
+ # MI dependencies
+ #
+ # Need to explicitly specify the compile rule as make will do nothing
+ # or try to compile the object file into the mi directory.
+
+ mi_cmds_h = $(srcdir)/mi/mi-cmds.h
+ mi_out_h = $(srcdir)/mi/mi-out.h
+ mi_parse_h = $(srcdir)/mi/mi-parse.h
+ mi_getopt_h = $(srcdir)/mi/mi-getopt.h
+ mi_console_h = $(srcdir)/mi/mi-console.h
+
+ mi-cmds.o: $(srcdir)/mi/mi-cmds.c $(defs_h) $(top_h) $(mi_cmds_h) $(ui_out_h)
+ $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmds.c
+ mi-cmd-var.o: $(srcdir)/mi/mi-cmd-var.c $(defs_h) $(top_h) $(mi_cmds_h) \
+ $(ui_out_h)
+ $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-var.c
+ mi-cmd-stack.o: $(srcdir)/mi/mi-cmd-stack.c $(defs_h) $(top_h) $(mi_cmds_h) \
+ $(ui_out_h) $(frame_h) $(value_h) $(target_h)
+ $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-stack.c
+ mi-cmd-break.o: $(srcdir)/mi/mi-cmd-break.c $(defs_h) $(mi_cmds_h) \
+ $(ui_out_h) $(mi_getopt_h)
+ $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-break.c
+ mi-cmd-disas.o: $(srcdir)/mi/mi-cmd-disas.c $(defs_h) $(mi_cmds_h) \
+ $(ui_out_h) $(value_h) $(target_h)
+ $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-disas.c
+ mi-main.o: $(srcdir)/mi/mi-main.c $(defs_h) $(top_h) $(mi_cmds_h) $(ui_out_h) \
+ $(mi_console_h) $(mi_getopt_h) $(event_loop_h) $(event_top_h) \
+ $(mi_getopt_h)
+ $(CC) -c $(INTERNAL_WARN_CFLAGS) $(srcdir)/mi/mi-main.c
+ mi-out.o: $(srcdir)/mi/mi-out.c $(defs_h) $(mi_out_h) $(ui_out_h)
+ $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-out.c
+ mi-console.o: $(srcdir)/mi/mi-console.c $(mi_out_h) $(defs_h)
+ $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-console.c
+ mi-parse.o: $(srcdir)/mi/mi-parse.c $(defs_h) $(mi_parse_h) $(mi_cmds_h)
+ $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-parse.c
+ mi-getopt.o: $(srcdir)/mi/mi-getopt.c $(mi_getopt_h) $(defs_h)
+ $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-getopt.c
### end of the gdb Makefile.in.
Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.4
diff -p -r1.4 configure.in
*** configure.in 2000/02/16 23:35:19 1.4
--- configure.in 2000/02/21 07:09:00
*************** dnl List of object files added by config
*** 41,47 ****
CONFIG_OBS=
CONFIG_DEPS=
CONFIG_SRCS=
! CONFIG_INIT=
configdirs="doc testsuite"
--- 41,48 ----
CONFIG_OBS=
CONFIG_DEPS=
CONFIG_SRCS=
! CONFIG_INITS=
! ENABLE_CFLAGS=
configdirs="doc testsuite"
*************** if test ${build} = ${host} -a ${host} =
*** 363,369 ****
fi
dnl Handle optional features that can be enabled.
! ENABLE_CFLAGS=
AC_ARG_ENABLE(tui,
[ --enable-tui Enable full-screen terminal user interface],
--- 364,393 ----
fi
dnl Handle optional features that can be enabled.
!
! dnl Handle MI sub-directory configury.
! AC_ARG_ENABLE(gdbmi,
! [ --enable-gdbmi Enable GDB-MI interface],
! [
! case "${enable_gdbmi}" in
! yes | no) ;;
! "") enable_gdbmi=yes ;;
! *)
! AC_MSG_ERROR(Bad value for --enable-gdbmi: ${enableval})
! ;;
! esac
! ])
! case ${enable_gdbmi} in
! "yes" )
! if test -d "${srcdir}/mi" ; then
! CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_MI_OBS)"
! CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_MI_DEPS)"
! CONFIG_SRCS="${CONFIG_SRS} \$(SUBDIR_MI_SRCS)"
! CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_MI_INITS)"
! ENABLE_CFLAGS="${ENABLE_CFLAGS} -DUI_OUT=1"
! fi
! ;;
! esac
AC_ARG_ENABLE(tui,
[ --enable-tui Enable full-screen terminal user interface],