From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6265 invoked by alias); 26 May 2009 19:31:05 -0000 Received: (qmail 6238 invoked by uid 22791); 26 May 2009 19:31:01 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,HK_OBFDOM,J_CHICKENPOX_83,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 26 May 2009 19:30:27 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n4QJUPcT006563 for ; Tue, 26 May 2009 15:30:25 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n4QJUOuB019634 for ; Tue, 26 May 2009 15:30:25 -0400 Received: from frink.lemurnet.org (vpn-13-194.rdu.redhat.com [10.11.13.194]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n4QJUNtH012272 for ; Tue, 26 May 2009 15:30:23 -0400 Message-ID: <4A1C434E.8060900@redhat.com> Date: Tue, 26 May 2009 19:39:00 -0000 From: Brendan Conoboy User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: insight@sourceware.org Subject: DESTDIR patch from 2007 Content-Type: multipart/mixed; boundary="------------000200060601050106090802" Mailing-List: contact insight-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sourceware.org X-SW-Source: 2009-q2/txt/msg00063.txt.bz2 This is a multi-part message in MIME format. --------------000200060601050106090802 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 601 Hi folks, I recently needed to build gdb and its tcl/tk dependencies such that the install directory was different from the configured prefix. One normally does this by setting INSTALL_ROOT or DESTDIR, but some of the dependencies (itcl/tcl/tk) didn't honor these fully. This patch, from 2007 got me most of the way there: http://sources.redhat.com/ml/insight/2007-q1/msg00041.html Attached is an updated version of this patch that covers a few of the additional changes in the last year. Is this something that can be committed here? -- Brendan Conoboy / Red Hat, Inc. / blc@redhat.com --------------000200060601050106090802 Content-Type: text/plain; name="tcltk-destdir.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="tcltk-destdir.patch" Content-length: 15804 Index: itcl/itcl/Makefile.in =================================================================== RCS file: /cvs/cvsfiles/gnupro/itcl/itcl/Makefile.in,v retrieving revision 1.2 retrieving revision 1.5 *************** *** 149,155 **** includedir = @includedir@ oldincludedir = /usr/include ! DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@@VERSION@ pkglibdir = $(libdir)/@PACKAGE@@VERSION@ --- 149,155 ---- includedir = @includedir@ oldincludedir = /usr/include ! DESTDIR = $(DESTDIR) pkgdatadir = $(datadir)/@PACKAGE@@VERSION@ pkglibdir = $(libdir)/@PACKAGE@@VERSION@ *************** *** 272,287 **** #======================================================================== install-libraries: libraries ! $(mkinstalldirs) $(includedir) ! @echo "Installing header files in $(includedir)" @for i in $(GENERIC_HDRS) ; do \ echo "Installing $$i" ; \ ! $(INSTALL_DATA) $$i $(includedir) ; \ done; ! @echo "Installing library files in $(ITCL_LIBRARY)" @for i in $(srcdir)/library/*.tcl ; do \ echo "Installing $$i" ; \ ! $(INSTALL_DATA) $$i $(ITCL_LIBRARY) ; \ done; #======================================================================== --- 272,287 ---- #======================================================================== install-libraries: libraries ! $(mkinstalldirs) $(DESTDIR)$(includedir) ! @echo "Installing header files in $(DESTDIR)$(includedir)" @for i in $(GENERIC_HDRS) ; do \ echo "Installing $$i" ; \ ! $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \ done; ! @echo "Installing library files in $(DESTDIR)$(ITCL_LIBRARY)" @for i in $(srcdir)/library/*.tcl ; do \ echo "Installing $$i" ; \ ! $(INSTALL_DATA) $$i $(DESTDIR)$(ITCL_LIBRARY) ; \ done; #======================================================================== *************** *** 290,301 **** #======================================================================== install-doc: doc ! $(mkinstalldirs) $(mandir)/mann ! @echo "Installing man pages in $(mandir)" @for i in $(srcdir)/doc/*.n; \ do \ echo "Installing $$i"; \ ! $(INSTALL_DATA) $$i $(mandir)/mann ; \ done test: $(TCLSH_PROG) --- 290,301 ---- #======================================================================== install-doc: doc ! $(mkinstalldirs) $(DESTDIR)$(mandir)/mann ! @echo "Installing man pages in $(DESTDIR)$(mandir)" @for i in $(srcdir)/doc/*.n; \ do \ echo "Installing $$i"; \ ! $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/mann ; \ done test: $(TCLSH_PROG) *************** *** 445,451 **** $(RANLIB) $(DESTDIR)$(libdir)/$$p; \ else :; fi; \ done ! $(INSTALL_DATA) pkgIndex.tcl $(pkglibdir) #======================================================================== # Install binary executables (e.g. .exe files) --- 445,451 ---- $(RANLIB) $(DESTDIR)$(libdir)/$$p; \ else :; fi; \ done ! $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir) #======================================================================== # Install binary executables (e.g. .exe files) *************** *** 483,489 **** $(mkinstalldirs) $(DESTDIR)$(libdir) $(mkinstalldirs) $(DESTDIR)$(bindir) $(mkinstalldirs) $(DESTDIR)$(pkglibdir) ! $(mkinstalldirs) $(ITCL_LIBRARY) .PHONY: all binaries clean depend distclean doc install installdirs \ libraries test --- 483,489 ---- $(mkinstalldirs) $(DESTDIR)$(libdir) $(mkinstalldirs) $(DESTDIR)$(bindir) $(mkinstalldirs) $(DESTDIR)$(pkglibdir) ! $(mkinstalldirs) $(DESTDIR)$(ITCL_LIBRARY) .PHONY: all binaries clean depend distclean doc install installdirs \ libraries test Index: itcl/itk/Makefile.in =================================================================== RCS file: /cvs/cvsfiles/gnupro/itcl/itk/Makefile.in,v retrieving revision 1.2 retrieving revision 1.4 diff -c -r1.2 -r1.4 *** itcl/itk/Makefile.in 16 Feb 2003 06:18:14 -0000 1.2 --- itcl/itk/Makefile.in 23 May 2009 21:48:26 -0000 1.4 *************** *** 137,143 **** includedir = @includedir@ oldincludedir = /usr/include ! DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@@VERSION@ pkglibdir = $(libdir)/@PACKAGE@@VERSION@ --- 137,143 ---- includedir = @includedir@ oldincludedir = /usr/include ! DESTDIR = $(DESTDIR) pkgdatadir = $(datadir)/@PACKAGE@@VERSION@ pkglibdir = $(libdir)/@PACKAGE@@VERSION@ *************** *** 267,282 **** #======================================================================== install-libraries: libraries ! $(mkinstalldirs) $(includedir) ! @echo "Installing header files in $(includedir)" @for i in $(GENERIC_HDRS) ; do \ echo "Installing $$i" ; \ ! $(INSTALL_DATA) $$i $(includedir) ; \ done; ! @echo "Installing library files in $(ITK_LIBRARY)" @for i in $(srcdir)/library/*.* $(srcdir)/library/tclIndex ; do \ echo "Installing $$i" ; \ ! $(INSTALL_DATA) $$i $(ITK_LIBRARY) ; \ done; #======================================================================== --- 267,282 ---- #======================================================================== install-libraries: libraries ! $(mkinstalldirs) $(DESTDIR)$(includedir) ! @echo "Installing header files in $(DESTDIR)$(includedir)" @for i in $(GENERIC_HDRS) ; do \ echo "Installing $$i" ; \ ! $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \ done; ! @echo "Installing library files in $(DESTDIR)$(ITK_LIBRARY)" @for i in $(srcdir)/library/*.* $(srcdir)/library/tclIndex ; do \ echo "Installing $$i" ; \ ! $(INSTALL_DATA) $$i $(DESTDIR)$(ITK_LIBRARY) ; \ done; #======================================================================== *************** *** 285,296 **** #======================================================================== install-doc: doc ! $(mkinstalldirs) $(mandir)/mann ! @echo "Installing man pages in $(mandir)" @for i in $(srcdir)/doc/*.n; \ do \ ! echo "Installing $$i info $(mandir)/mann"; \ ! $(INSTALL_DATA) $$i $(mandir)/mann ; \ done test: $(TCLSH_PROG) --- 285,296 ---- #======================================================================== install-doc: doc ! $(mkinstalldirs) $(DESTDIR)$(mandir)/mann ! @echo "Installing man pages in $(DESTDIR)$(mandir)" @for i in $(srcdir)/doc/*.n; \ do \ ! echo "Installing $$i info $(DESTDIR)$(mandir)/mann"; \ ! $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/mann ; \ done test: $(TCLSH_PROG) *************** *** 419,425 **** $(RANLIB) $(DESTDIR)$(libdir)/$$p; \ else :; fi; \ done ! $(INSTALL_DATA) pkgIndex.tcl $(pkglibdir) #======================================================================== # Install binary executables (e.g. .exe files) --- 419,425 ---- $(RANLIB) $(DESTDIR)$(libdir)/$$p; \ else :; fi; \ done ! $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir) #======================================================================== # Install binary executables (e.g. .exe files) *************** *** 457,463 **** $(mkinstalldirs) $(DESTDIR)$(libdir) $(mkinstalldirs) $(DESTDIR)$(bindir) $(mkinstalldirs) $(DESTDIR)$(pkglibdir) ! $(mkinstalldirs) $(ITK_LIBRARY) .PHONY: all binaries clean depend distclean doc install installdirs \ libraries test --- 457,463 ---- $(mkinstalldirs) $(DESTDIR)$(libdir) $(mkinstalldirs) $(DESTDIR)$(bindir) $(mkinstalldirs) $(DESTDIR)$(pkglibdir) ! $(mkinstalldirs) $(DESTDIR)$(ITK_LIBRARY) .PHONY: all binaries clean depend distclean doc install installdirs \ libraries test Index: itcl/iwidgets/Makefile.in =================================================================== RCS file: /cvs/cvsfiles/gnupro/itcl/iwidgets/Makefile.in,v retrieving revision 1.2 retrieving revision 1.3 diff -c -r1.2 -r1.3 *** itcl/iwidgets/Makefile.in 2 Feb 2004 15:04:11 -0000 1.2 --- itcl/iwidgets/Makefile.in 23 May 2009 20:17:52 -0000 1.3 *************** *** 36,48 **** # to be different than those used for actually reference files at # run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix # when installing files. ! INSTALL_ROOT = # Path name to use when installing library scripts: # REDHAT LOCAL #SCRIPT_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/lib/iwidgets$(IWIDGETS_VERSION) ! SCRIPT_INSTALL_DIR = @datadir@/iwidgets$(IWIDGETS_VERSION) # END REDHAT LOCAL # Directory in which to install the archive libtcl.a: --- 36,48 ---- # to be different than those used for actually reference files at # run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix # when installing files. ! INSTALL_ROOT = $(DESTDIR) # Path name to use when installing library scripts: # REDHAT LOCAL #SCRIPT_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/lib/iwidgets$(IWIDGETS_VERSION) ! SCRIPT_INSTALL_DIR = $(INSTALL_ROOT)@datadir@/iwidgets$(IWIDGETS_VERSION) # END REDHAT LOCAL # Directory in which to install the archive libtcl.a: Index: itcl/iwidgets3.0.0/Makefile.in =================================================================== RCS file: /cvs/cvsfiles/gnupro/itcl/iwidgets3.0.0/Makefile.in,v retrieving revision 1.3 retrieving revision 1.4 diff -c -r1.3 -r1.4 *** itcl/iwidgets3.0.0/Makefile.in 2 Feb 2005 13:17:38 -0000 1.3 --- itcl/iwidgets3.0.0/Makefile.in 23 May 2009 21:50:31 -0000 1.4 *************** *** 37,43 **** # to be different than those used for actually reference files at # run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix # when installing files. ! INSTALL_ROOT = # Path name to use when installing library scripts: --- 37,43 ---- # to be different than those used for actually reference files at # run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix # when installing files. ! INSTALL_ROOT = $(DESTDIR) # Path name to use when installing library scripts: Index: itcl/iwidgets3.0.0/unix/Makefile.in =================================================================== RCS file: /cvs/cvsfiles/gnupro/itcl/iwidgets3.0.0/unix/Makefile.in,v retrieving revision 1.3 retrieving revision 1.4 diff -c -r1.3 -r1.4 *** itcl/iwidgets3.0.0/unix/Makefile.in 2 Feb 2005 13:17:40 -0000 1.3 --- itcl/iwidgets3.0.0/unix/Makefile.in 23 May 2009 21:50:31 -0000 1.4 *************** *** 40,46 **** # to be different than those used for actually reference files at # run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix # when installing files. ! INSTALL_ROOT = # CYGNUS LOCAL - The default library directory is the share directory... # Directory from which applications will reference the library of --- 40,46 ---- # to be different than those used for actually reference files at # run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix # when installing files. ! INSTALL_ROOT = $(DESTDIR) # CYGNUS LOCAL - The default library directory is the share directory... # Directory from which applications will reference the library of Index: tcl/cygwin/Makefile.in =================================================================== RCS file: /cvs/cvsfiles/gnupro/tcl/cygwin/Makefile.in,v retrieving revision 1.2 retrieving revision 1.3 diff -c -r1.2 -r1.3 *** tcl/cygwin/Makefile.in 16 Feb 2003 01:31:26 -0000 1.2 --- tcl/cygwin/Makefile.in 23 May 2009 21:48:26 -0000 1.3 *************** *** 32,38 **** includedir = @includedir@ oldincludedir = /usr/include ! DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ --- 32,38 ---- includedir = @includedir@ oldincludedir = /usr/include ! DESTDIR = $(DESTDIR) pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ Index: tcl/unix/Makefile.in =================================================================== RCS file: /cvs/cvsfiles/gnupro/tcl/unix/Makefile.in,v retrieving revision 1.2 retrieving revision 1.3 diff -c -r1.2 -r1.3 *** tcl/unix/Makefile.in 16 Feb 2003 01:31:34 -0000 1.2 --- tcl/unix/Makefile.in 23 May 2009 20:20:01 -0000 1.3 *************** *** 38,44 **** # to be different than those used for actually reference files at # run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix # when installing files. ! INSTALL_ROOT = # Path for the platform independent Tcl scripting libraries: # REDHAT LOCAL --- 38,44 ---- # to be different than those used for actually reference files at # run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix # when installing files. ! INSTALL_ROOT = $(DESTDIR) # Path for the platform independent Tcl scripting libraries: # REDHAT LOCAL Index: tcl/win/Makefile.in =================================================================== RCS file: /cvs/cvsfiles/gnupro/tcl/win/Makefile.in,v retrieving revision 1.2 retrieving revision 1.3 diff -c -r1.2 -r1.3 *** tcl/win/Makefile.in 16 Feb 2003 01:31:35 -0000 1.2 --- tcl/win/Makefile.in 23 May 2009 21:50:31 -0000 1.3 *************** *** 34,40 **** # to be different than those used for actually reference files at # run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix # when installing files. ! INSTALL_ROOT = # Directory from which applications will reference the library of Tcl # scripts (note: you can set the TCL_LIBRARY environment variable at --- 34,40 ---- # to be different than those used for actually reference files at # run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix # when installing files. ! INSTALL_ROOT = $(DESTDIR) # Directory from which applications will reference the library of Tcl # scripts (note: you can set the TCL_LIBRARY environment variable at Index: tk/unix/Makefile.in =================================================================== RCS file: /cvs/cvsfiles/gnupro/tk/unix/Makefile.in,v retrieving revision 1.2 retrieving revision 1.3 diff -c -r1.2 -r1.3 *** tk/unix/Makefile.in 16 Feb 2003 05:31:30 -0000 1.2 --- tk/unix/Makefile.in 23 May 2009 20:20:01 -0000 1.3 *************** *** 41,47 **** # to be different than those used for actually reference files at # run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix # when installing files. ! INSTALL_ROOT = # Directory from which applications will reference the library of Tcl # scripts (note: you can set the TK_LIBRARY environment variable at --- 41,47 ---- # to be different than those used for actually reference files at # run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix # when installing files. ! INSTALL_ROOT = $(DESTDIR) # Directory from which applications will reference the library of Tcl # scripts (note: you can set the TK_LIBRARY environment variable at Index: tk/win/Makefile.in =================================================================== RCS file: /cvs/cvsfiles/gnupro/tk/win/Makefile.in,v retrieving revision 1.3 retrieving revision 1.4 diff -c -r1.3 -r1.4 *** tk/win/Makefile.in 17 Dec 2003 21:39:03 -0000 1.3 --- tk/win/Makefile.in 23 May 2009 21:50:31 -0000 1.4 *************** *** 34,40 **** # to be different than those used for actually reference files at # run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix # when installing files. ! INSTALL_ROOT = # Directory from which applications will reference the library of Tk # scripts (note: you can set the TK_LIBRARY environment variable at --- 34,40 ---- # to be different than those used for actually reference files at # run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix # when installing files. ! INSTALL_ROOT = $(DESTDIR) # Directory from which applications will reference the library of Tk # scripts (note: you can set the TK_LIBRARY environment variable at --------------000200060601050106090802--