From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26889 invoked by alias); 26 Feb 2002 16:45:19 -0000 Mailing-List: contact insight-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sources.redhat.com Received: (qmail 26784 invoked from network); 26 Feb 2002 16:45:07 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 26 Feb 2002 16:45:07 -0000 Received: from makita.cygnus.com (makita.cygnus.com [205.180.230.78]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id IAA12954 for ; Tue, 26 Feb 2002 08:45:03 -0800 (PST) Received: from localhost (keiths@localhost) by makita.cygnus.com (8.8.8+Sun/8.6.4) with ESMTP id IAA20179 for ; Tue, 26 Feb 2002 08:45:03 -0800 (PST) X-Authentication-Warning: makita.cygnus.com: keiths owned process doing -bs Date: Tue, 26 Feb 2002 08:45:00 -0000 From: Keith Seitz X-X-Sender: To: Insight Maling List Subject: [RFC] Plugin tweaks Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-q1/txt/msg00169.txt.bz2 Hi, A long, long time ago I promised some plugin changes which would: . Configure/build plugins on different hosts . install the plugins properly (into ${exec_prefix}/lib) Well, I would like some comments (good or bad) about this. I consider myself to be done with this, but I agree there is room for improvement. I am only enabling plugins for cygwin, linux, and solaris -- the three hosts I've tested this on. Here's what I've changed: New/changed files (generated files omitted): gdbtk/configure.in gdbtk/Makefile.am gdbtk/plugins/configure.in gdbtk/plugins/Makefile.am gdbtk/plugins/rhabout/Makefile.in (replaces current) gdb/configure.in This also brings us one step closer to moving all insight configury into its own directory. The gdbtk/plugins folder was moved from gdbtk/library/plugins. The general idea is that plugins should be easy to make. With that in mind, the gdbtk/plugin/PLUGIN/Makefile.in's should be stupidly easy to write, and they are. Here are the new files and the diffs for gdb/configure.in. I've also included gdbtk/plugins/rhabout/Makefile.in so that you can see an example of how the plugin's Makefiles are written. Fire away! Keith PS. Yes, you'll note a new "intel-pentium" plugin... Index: configure.in =================================================================== RCS file: /cvs/src/src/gdb/configure.in,v retrieving revision 1.82 diff -u -p -r1.82 configure.in --- configure.in 2002/02/24 04:31:13 1.82 +++ configure.in 2002/02/26 04:38:12 @@ -51,6 +51,7 @@ CONFIG_CLEAN= CONFIG_INSTALL= CONFIG_UNINSTALL= +SUBDIRS="doc testsuite nlm" configdirs="doc testsuite" AC_ARG_ENABLE(multi-ice, @@ -1067,6 +1068,9 @@ if test "${enable_gdbtk}" = "yes"; then fi fi fi + + SUBDIRS="${SUBDIRS} gdbtk" + configdirs="${configdirs} gdbtk" fi AC_SUBST(X_CFLAGS) @@ -1273,7 +1277,6 @@ case "${GDB_MULTI_ARCH}" in *) AC_MSG_ERROR("GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}");; esac -SUBDIRS="doc testsuite nlm" if test "${enable_multi_ice}" = "yes"; then SUBDIRS="${SUBDIRS} multi-ice" fi @@ -1338,6 +1341,7 @@ AC_LINK_FILES($files, $links) dnl Check for exe extension set on certain hosts (e.g. Win32) AC_EXEEXT +AC_OBJEXT AC_CONFIG_SUBDIRS($configdirs) AC_OUTPUT(Makefile .gdbinit:gdbinit.in, Index: gdbtk/Makefile.am: ============================================================ ## Process this file with automake to produce Makefile.in AUTOMAKE_OPTIONS = cygnus SUBDIRS = plugins gdbtk/configure.in: AC_INIT(generic/gdbtk.h) AC_CONFIG_AUX_DIR(../..) AM_INIT_AUTOMAKE(insight, 1.0) AM_MAINTAINER_MODE AC_CANONICAL_HOST AC_PROG_MAKE_SET AC_PROG_CC AC_OBJEXT AC_EXEEXT AC_CONFIG_SUBDIRS(plugins) AC_OUTPUT(Makefile) Index: gdbtk/plugins/Makefile.am: ============================================================ ## Process this file with automake to produce Makefile.in AUTOMAKE_OPTIONS = cygnus SUBDIRS = @make_subdirs@ Index: gdbtk/plugins/configure.in: ============================================================ AC_INIT(Make-rules) AC_CONFIG_AUX_DIR(../../..) AM_INIT_AUTOMAKE(insight, 1.0) AM_MAINTAINER_MODE AC_PROG_MAKE_SET AC_CANONICAL_HOST AC_PROG_CC AC_OBJEXT AC_EXEEXT # Find Tcl, Tk, etc CYG_AC_PATH_TCLCONFIG CYG_AC_LOAD_TCLCONFIG CYG_AC_PATH_TKCONFIG CYG_AC_LOAD_TKCONFIG CYG_AC_PATH_TCLH CYG_AC_PATH_TKH AC_SUBST(TCL_SHLIB_SUFFIX) # Make sure TCL_SHLIB_SUFFIX is set if test x$TCL_SHLIB_SUFFIX = x ; then case "${host}" in *cygwin*) TCL_SHLIB_SUFFIX=".dll" ;; *) TCL_SHILB_SUFFIX=".so" ;; esac fi # Since we're not using autoconf > 2.1x, we cannot use AC_CONFIG_FILES. make_subdirs="" # See if -mwin32 works for cygwin case "${host}" in *cygwin*) ocflags=${CFLAGS} CFLAGS="${CFLAGS} -mwin32" AC_TRY_COMPILE(,,,CFLAGS="${ocflags}") ;; *) ;; esac # note toplevel plugin build directory plugin_builddir=`pwd` # # Plugins # # Supported hosts # Only supported/tested on linux, solaris, cygwin supported=yes case "${host}" in *cygwin*) ;; *solaris*) ;; *linux*) ;; *) supported=no ;; esac if test x${supported} = xyes; then plugins="rhabout" case "${target}" in *cygwin*) ;; *linux*) ;; *i?86*) plugins="${plugins} intel-pentium" ;; esac for i in $plugins ; do make_subdirs="${make_subdirs} $i" done fi AC_SUBST(make_subdirs) AC_SUBST(plugin_builddir) AC_OUTPUT(Makefile rhabout/Makefile:rhabout/Makefile.in:Make-rules rhabout/rhabout.tcl intel-pentium/Makefile:intel-pentium/Makefile.in:Make-rules intel-pentium/intel-pentium.tcl) Index: gdbtk/plugins/rhabout/Makefile.in: ============================================================ # Plugin definitions PLUGIN = rhabout PLUGIN_OBJS = rhabout.$(OBJEXT) PLUGIN_IMAGE_BASE = 0x65000000 PLUGIN_INSTALL_SRCDIR = rhabout.itcl # Comment out this to install the example plugin PLUGIN_INSTALL_TARGET = nothing nothing: