This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[RFA] Revised doc/Makefile.in patch


On Sat, Jul 01, 2000 at 06:44:12PM +1000, Andrew Cagney wrote:
>Chris Faylor wrote:
>> 
>> On Fri, Jun 30, 2000 at 04:46:53AM -0400, Eli Zaretskii wrote:
>> >> From: Chris Faylor <cgf@cygnus.com>
>> >> Date: Fri, 30 Jun 2000 01:06:35 -0400
>> >>
>> >> I've just been bitten by this patch and I don't really understand it.
>> >>
>> >> The .info files that should be installed come from the build directory
>> >> not from the source directory.  I don't see any .info* files in gdb/doc
>> >> at all.
>> >
>> >Did you look in the source distribution on ftp.gnu.org, or somewhere
>> >else?  I just looked in the GDB 5.0 distribution as downloaded from
>> >the GNU site, and the Info files are there in gdb/doc directory.
>> 
>> I looked in the directory that I've checked out via CVS.  AFAICT, there are
>> no *.info files there.
>
>Just FYI, The info files are created as part of the release process used
>when constructing either a snapshot or a true release.
>
>See the target src/Makefile.in:tgz: .

I assume that you mean the 'taz' target.  I haven't tried this but it
does seem to create info files in the source directory.  That's really
not what I'm looking to do, though.

It's my contention that one should be able to:

    mkdir /foo
    cd /foo
    cvs -d :ext:sourceware.cygnus.com:/cvs/src co gdb
    mkdir /build
    cd /build
    /foo/src/gdb/configure
    make
    make install
    make install-info

and that every step should work (please, if I have something wrong
above, I don't need to be corrected -- you get what I mean).  I'm able
to do this with binutils and gcc but, currently, it fails with gdb.

If doc/Makefile install-info is designed to only work with snapshots
then the install-info target should not cause an error for people who
have not installed a snapshot.  I suppose it could just be a no-op,
although that really doesn't make sense either.

Tom Tromey has informed me that install-info does the right thing
in automake (which I should have known), so I'd like to suggest that
my patch be incorporated for now.  The whole target will be removed
when we move to automake for gdb so this will be a non-issue then.

I've modified the patch to deal with the problems and concerns that
were previously raised.  I think that I've only used non-gnu-make
constructs in it.  It "works for me" but then so did my previous broken
version.

If this is not acceptable then maybe someone should see how Makefile.am
does things and just copy everything from a Makefile.in generated
from a Makefile.am.

cgf

	* Makefile.in (install-info): Find files to install via VPATH since
	info files can be in either the source or the build directory.

Index: doc/Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/doc/Makefile.in,v
retrieving revision 1.10
diff -u -p -r1.10 Makefile.in
--- Makefile.in	2000/06/25 08:12:30	1.10
+++ Makefile.in	2000/07/01 16:09:55
@@ -62,6 +62,9 @@ GDBMI_DIR = ${gdbdir}/mi
 SET_TEXINPUTS = \
    TEXINPUTS=${TEXIDIR}:.:$(srcdir):$(READLINE_DIR):$(GDBMI_DIR):$$TEXINPUTS
 
+# Files which should be generated via 'info' and installed by 'install-info'
+INFO_FILES = gdb.info gdbint.info stabs.info
+
 # There may be alternate predefined collections of switches to configure
 # the GDB manual.  Normally this is not done in synch with the software
 # config system, since this choice tends to be independent; most people
@@ -108,7 +111,7 @@ SFILES_DOC = $(SFILES_LOCAL) $(GDBMI_DIR
 
 all install:
 
-info: gdb.info gdbint.info stabs.info
+info: $(INFO_FILES)
 dvi: gdb.dvi gdbint.dvi stabs.dvi refcard.dvi
 ps: gdb.ps gdbint.ps stabs.ps refcard.ps
 html: gdb_toc.html gdbint_toc.html stabs_toc.html
@@ -116,15 +119,15 @@ pdf: gdb.pdf gdbint.pdf stabs.pdf
 all-doc: info dvi ps # pdf
 diststuff: info
 
-install-info: info
+install-info: $(INFO_FILES)
 	$(SHELL) $(srcdir)/../../mkinstalldirs $(infodir)
-	(cd $(srcdir); \
-	for i in *.info* ; do \
-		$(INSTALL_DATA) $$i $(infodir)/$$i ; \
-	done)
+	for j in $?; do \
+		for i in $$j*; do \
+			$(INSTALL_DATA) $$i $(infodir) ; \
+		done; \
+	done
 	@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
-	  list='gdb.info gdbint.info stabs.info'; \
-	  for file in $$list; do \
+	  for file in $(INFO_FILES); do \
 	    echo " install-info --info-dir=$(infodir) $(infodir)/$$file";\
 	    install-info --info-dir=$(infodir) $(infodir)/$$file || :;\
 	  done; \

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]