This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: [RFA] tcl/tk Makefile fixes
- To: Chris Faylor <cgf at cygnus dot com>, gdb-patches at sourceware dot cygnus dot com
- Subject: Re: [RFA] tcl/tk Makefile fixes
- From: Syd Polk <spolk at redhat dot com>
- Date: Wed, 07 Jun 2000 10:44:37 -0700
This is cool. Please check it in.
At 10:12 PM 6/6/00 -0400, Chris Faylor wrote:
>While preparing a new version of the gdb executable for a cygwin net
>release I noticed that the tcl/tk family of makefiles do not honor
>overrides like:
>
>make prefix=/some/directory
>
>I have found it convenient to build gdb giving a "standard" configuration
>but then to install gdb in an alternate location for packaging into a
>tar file. This seems to work fine with everything but the tcl/tk family
>of Makefiles.
>
>The patch below changes all of the appropriate Makefiles that are used
>in a Windows install. The changes are pretty straightforward. They add
>a typical autoconf variable at the top of each Makefile and then use
>that variable throughout. This allows the variables to be overridden on
>the command line.
>
>The changes aren't as comprehensive as they could be. I left some
>variables that did not seem to be causing any problems when I did a
>"make prefix=/somewhere install". For completeness, it might be nice to
>change those, too at some point.
>
>I've provided a typical ChangeLog entry rather than six identical entries
>for six different ChangeLogs.
>
>cgf
>
>Tue Jun 6 22:09:02 2000 Christopher Faylor <cgf@cygnus.com>
>
> * win/Makefile.in: Set up and use autoconf variables throughout to
> allow overriding variables from the make command line.
>
>Index: itcl/itcl/win/Makefile.in
>===================================================================
>RCS file: /cvs/src/src/itcl/itcl/win/Makefile.in,v
>retrieving revision 1.1.1.1
>diff -u -p -r1.1.1.1 Makefile.in
>--- Makefile.in 2000/02/07 00:19:46 1.1.1.1
>+++ Makefile.in 2000/06/07 00:49:52
>@@ -12,6 +12,11 @@ prefix = @prefix@
> exec_prefix = @exec_prefix@
> VPATH = @srcdir@:@srcdir@/../generic:@srcdir@/../unix
> srcdir = @srcdir@
>+libdir=@libdir@
>+bindir=@bindir@
>+includedir=@includedir@
>+mandir=@mandir@
>+datadir=@datadir@
>
> CC = @CC@
> CFLAGS = @CFLAGS@
>@@ -82,21 +87,21 @@ ITCLSHRES = @ITCLSHRES@
> # Directory in which to install the library of Itcl scripts and demos
> # (note: you can set the ITCL_LIBRARY environment variable at run-time to
> # override the compiled-in location):
>-ITCL_LIBRARY = $(prefix)/share/itcl$(ITCL_VERSION)
>+ITCL_LIBRARY = $(datadir)/itcl$(ITCL_VERSION)
>
>-# CYGNUS LOCAL: dj - use @dir@ form
>+# CYGNUS LOCAL: cgf - use autoconf variables
>
> # Directory in which to install the archive libitcl.a:
>-INSTALL_LIB_DIR = @libdir@
>+INSTALL_LIB_DIR = $(libdir)
>
> # Directory in which to install the program itclsh:
>-INSTALL_BIN_DIR = @bindir@
>+INSTALL_BIN_DIR = $(bindir)
>
> # Directory in which to install the include file itcl.h:
>-INSTALL_INCLUDE_DIR = @includedir@
>+INSTALL_INCLUDE_DIR = $(includedir)
>
> # Top-level directory for manual entries:
>-INSTALL_MAN_DIR = @mandir@
>+INSTALL_MAN_DIR = $(mandir)
>
> # Directory in which to install manual entry for itclsh:
> INSTALL_MAN1_DIR = $(INSTALL_MAN_DIR)/man1
>Index: itcl/itk/win/Makefile.in
>===================================================================
>RCS file: /cvs/src/src/itcl/itk/win/Makefile.in,v
>retrieving revision 1.1.1.1
>diff -u -p -r1.1.1.1 Makefile.in
>--- Makefile.in 2000/02/07 00:19:46 1.1.1.1
>+++ Makefile.in 2000/06/07 00:49:52
>@@ -12,6 +12,11 @@ prefix = @prefix@
> exec_prefix = @exec_prefix@
> VPATH = @srcdir@:@srcdir@/../generic:@srcdir@/../unix
> srcdir = @srcdir@
>+libdir=@libdir@
>+bindir=@bindir@
>+includedir=@includedir@
>+mandir=@mandir@
>+datadir=@datadir@
>
> CC = @CC@
> CFLAGS = @CFLAGS@
>@@ -96,16 +101,16 @@ ITKWISHRES = @ITKWISHRES@
> ITK_LIBRARY = $(prefix)/share/itk$(ITCL_VERSION)
>
> # Directory in which to install the archive libitcl.a:
>-INSTALL_LIB_DIR = @libdir@
>+INSTALL_LIB_DIR = $(libdir)
>
> # Directory in which to install the program itclsh:
>-INSTALL_BIN_DIR = @bindir@
>+INSTALL_BIN_DIR = $(bindir)
>
> # Directory in which to install the include file itcl.h:
>-INSTALL_INCLUDE_DIR = @includedir@
>+INSTALL_INCLUDE_DIR = $(includedir)
>
> # Top-level directory for manual entries:
>-INSTALL_MAN_DIR = @mandir@
>+INSTALL_MAN_DIR = $(mandir)
>
> # Directory in which to install manual entry for itclsh:
> INSTALL_MAN1_DIR = $(INSTALL_MAN_DIR)/man1
>Index: itcl/iwidgets3.0.0/unix/Makefile.in
>===================================================================
>RCS file: /cvs/src/src/itcl/iwidgets3.0.0/unix/Makefile.in,v
>retrieving revision 1.1.1.1
>diff -u -p -r1.1.1.1 Makefile.in
>--- Makefile.in 2000/02/07 00:19:47 1.1.1.1
>+++ Makefile.in 2000/06/07 00:49:53
>@@ -28,6 +28,12 @@ VERSION = $(ITCL_VERSION).$(IWIDGETS_VER
>
> prefix = @prefix@
> exec_prefix = @exec_prefix@
>+srcdir = @srcdir@
>+libdir=@libdir@
>+bindir=@bindir@
>+includedir=@includedir@
>+mandir=@mandir@
>+datadir=@datadir@
>
> # The following definition can be set to non-null for special systems
> # like AFS with replication. It allows the pathnames used for installation
>@@ -40,23 +46,23 @@ INSTALL_ROOT =
> # Directory from which applications will reference the library of
> # [incr Widgets] scripts (note: you can set the IWIDGETS_LIBRARY environment
> # variable at run-time to override this value):
>-IWIDGETS_LIBRARY = $(prefix)/share/iwidgets$(VERSION)
>+IWIDGETS_LIBRARY = $(datadir)/iwidgets$(VERSION)
> # END CYGNUS LOCAL
>
> # Path name to use when installing library scripts:
> SCRIPT_INSTALL_DIR = $(INSTALL_ROOT)$(IWIDGETS_LIBRARY)
>
> # Directory in which to install the archive libtcl.a:
>-LIB_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/lib
>+LIB_INSTALL_DIR = $(INSTALL_ROOT)$(libdir)
>
> # Directory in which to install the program tclsh:
>-BIN_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/bin
>+BIN_INSTALL_DIR = $(INSTALL_ROOT)$(bindir)
>
> # Directory in which to install the include file itcl.h:
>-INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/include
>+INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(includedir)
>
> # Top-level directory in which to install manual entries:
>-MAN_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/man
>+MAN_INSTALL_DIR = $(INSTALL_ROOT)$(mandir)
>
> # Directory in which to install manual entry for itclsh:
> MAN1_INSTALL_DIR = $(MAN_INSTALL_DIR)/man1
>@@ -76,25 +82,25 @@ HTML_INSTALL_DIR = $(INSTALL_ROOT)$(pref
> TCL_LIB_DIR = @TCL_LIB_DIR@
>
> # Directory containing Tcl source code (for library used during test):
>-TCL_SRC_DIR = @TCL_SRC_DIR@
>+TCL_SRC_DIR = ${srcdir}/../../../../tcl
>
> # Tk libraries can be found here:
> TK_LIB_DIR = @TK_LIB_DIR@
>
> # Directory containing Tk source code (for library used during test):
>-TK_SRC_DIR = @TK_SRC_DIR@
>+TK_SRC_DIR = ${srcdir}/../../../tk
>
> # Itcl libraries can be found here:
> ITCL_LIB_DIR = @ITCL_LIB_DIR@
>
> # Directory containing Itcl source code (for library used during test):
>-ITCL_SRC_DIR = @ITCL_SRC_DIR@
>+ITCL_SRC_DIR = ${srcdir}/../../itcl
>
> # Itk libraries can be found here:
> ITK_LIB_DIR = @ITK_LIB_DIR@
>
> # Directory containing Itk source code (for library used during test):
>-ITK_SRC_DIR = @ITK_SRC_DIR@
>+ITK_SRC_DIR = ${srcdir}/../../itk
>
> # [incr Tk] build directory containing the itkwish binary for 'make test'
> ITK_BIN_DIR = ../../itk/unix
>Index: tcl/win/Makefile.in
>===================================================================
>RCS file: /cvs/src/src/tcl/win/Makefile.in,v
>retrieving revision 1.1.1.1
>diff -u -p -r1.1.1.1 Makefile.in
>--- Makefile.in 1999/11/09 01:28:44 1.1.1.1
>+++ Makefile.in 2000/06/07 00:49:54
>@@ -11,6 +11,10 @@ prefix = @prefix@
> exec_prefix = @exec_prefix@
> VPATH = @srcdir@:@srcdir@/../generic:@srcdir@/../compat
> srcdir = @srcdir@
>+libdir = @libdir@
>+bindir = @bindir@
>+includedir = @includedir@
>+datadir = @datadir@
>
> INSTALL = @INSTALL@
> INSTALL_PROGRAM = @INSTALL_PROGRAM@
>@@ -44,19 +48,19 @@ INSTALL_ROOT =
> # Directory from which applications will reference the library of Tcl
> # scripts (note: you can set the TCL_LIBRARY environment variable at
> # run-time to override this value):
>-TCL_LIBRARY = @datadir@/tcl$(DIRVERSION)
>+TCL_LIBRARY = $(datadir)/tcl$(DIRVERSION)
>
> # Path name to use when installing library scripts:
> SCRIPT_INSTALL_DIR = $(INSTALL_ROOT)$(TCL_LIBRARY)
>
> # Directory in which to install libtcl.so or libtcl.a:
>-LIB_INSTALL_DIR = $(INSTALL_ROOT)@libdir@
>+LIB_INSTALL_DIR = $(INSTALL_ROOT)$(libdir)
>
> # Directory in which to install the program tclsh:
>-BIN_INSTALL_DIR = $(INSTALL_ROOT)@bindir@
>+BIN_INSTALL_DIR = $(INSTALL_ROOT)$(bindir)
>
> # Directory in which to install the include file tcl.h:
>-INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)@includedir@
>+INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(includedir)
>
> #
> # Visual C++ 2.x and 4.0 makefile
>Index: tix/win/Makefile.in
>===================================================================
>RCS file: /cvs/src/src/tix/win/Makefile.in,v
>retrieving revision 1.1.1.1
>diff -u -p -r1.1.1.1 Makefile.in
>--- Makefile.in 2000/02/07 00:19:29 1.1.1.1
>+++ Makefile.in 2000/06/07 00:49:55
>@@ -5,6 +5,12 @@ prefix = @prefix@
> exec_prefix = @exec_prefix@
> VPATH = @srcdir@:@srcdir@/../generic
> srcdir = @srcdir@
>+libdir=@libdir@
>+bindir=@bindir@
>+includedir=@includedir@
>+mandir=@mandir@
>+datadir=@datadir@
>+host_alias=@host_alias@
>
> CC = @CC@
> CFLAGS = @CFLAGS@
>@@ -428,21 +434,21 @@ TIX_VERSION = @TIX_VERSION@
> # Directory in which to install the library of Tix scripts and demos
> # (note: you can set the TIX_LIBRARY environment variable at run-time to
> # override the compiled-in location):
>-TIX_LIBRARY = $(prefix)/share/tix$(TIX_VERSION)
>+TIX_LIBRARY = $(datadir)/tix$(TIX_VERSION)
>
> # CYGNUS LOCAL: dj - change to autoconf'd directories
>
> # Directory in which to install the archive libtix.a:
>-LIB_DIR = @libdir@
>+LIB_DIR = $(libdir)
>
> # Directory in which to install the program wish:
>-BIN_DIR = @bindir@
>+BIN_DIR = $(bindir)
>
> # Directory in which to install the include file tix.h:
>-INCLUDE_DIR = @includedir@
>+INCLUDE_DIR = $(includedir)
>
> # Top-level directory for manual entries:
>-MAN_DIR = @mandir@
>+MAN_DIR = $(mandir)
>
> # Directory in which to install manual entry for wish:
> MAN1_DIR = $(MAN_DIR)/man1
>Index: tk/win/Makefile.in
>===================================================================
>RCS file: /cvs/src/src/tk/win/Makefile.in,v
>retrieving revision 1.1.1.1
>diff -u -p -r1.1.1.1 Makefile.in
>--- Makefile.in 2000/02/07 00:19:30 1.1.1.1
>+++ Makefile.in 2000/06/07 00:49:56
>@@ -19,8 +19,14 @@
>
> prefix = @prefix@
> exec_prefix = @exec_prefix@
>-VPATH =
>@srcdir@:@srcdir@/../xlib:@srcdir@/../generic:@srcdir@/../unix:@srcdir@/../
>win/rc
> srcdir = @srcdir@
>+VPATH =
>$(srcdir):$(srcdir)/../xlib:$(srcdir)/../generic:$(srcdir)/../unix:$(srcdir
>)/../win/rc
>+libdir=@libdir@
>+bindir=@bindir@
>+includedir=@includedir@
>+mandir=@mandir@
>+datadir=@datadir@
>+host_alias=@host_alias@
>
> INSTALL = @INSTALL@
> INSTALL_PROGRAM = @INSTALL_PROGRAM@
>@@ -53,23 +59,23 @@ INSTALL_ROOT =
> # Directory from which applications will reference the library of Tcl
> # scripts (note: you can set the TK_LIBRARY environment variable at
> # run-time to override the compiled-in location):
>-TK_LIBRARY = @datadir@/tk$(DIRVERSION)
>+TK_LIBRARY = $(datadir)/tk$(DIRVERSION)
>
> # Path name to use when installing library scripts:
> SCRIPT_INSTALL_DIR = $(INSTALL_ROOT)$(TK_LIBRARY)
>
> # Directory in which to install the .a or .so binary for the Tk library:
>-LIB_INSTALL_DIR = $(INSTALL_ROOT)@libdir@
>+LIB_INSTALL_DIR = $(INSTALL_ROOT)$(libdir)
>
> # Directory in which to install the program wish:
>-BIN_INSTALL_DIR = $(INSTALL_ROOT)@bindir@
>+BIN_INSTALL_DIR = $(INSTALL_ROOT)$(bindir)
>
> # Directory in which to install the include file tk.h:
>-INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)@includedir@
>+INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(includedir)
>
> # Directory in which to install the X11 header files. These files are
> # not machine independent, so they should not go in includedir.
>-X11_INCLUDE_INSTALL_DIR =
>$(INSTALL_ROOT)@exec_prefix@/@host_alias@/include/X11
>+X11_INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(includedir)/X11
>
> DEMOPROGS = browse hello ixset rmt rolodex square tcolor timer widget
>
Syd Polk spolk@redhat.com
Engineering Manager +1 415 777 9810 x 241
Cygnus Solutions,a Red Hat company