[RFA] Use VPATH to find info files for installation.
Chris Faylor
cgf@cygnus.com
Fri Jun 30 07:33:00 GMT 2000
On Fri, Jun 30, 2000 at 10:18:45AM -0400, Chris Faylor wrote:
>Even if that is the case, since the Makefile builds the info files in
>the build directory via the 'gdb.info' rule, blindly cd'ing to the
>source directory can't be the correct way to handle this.
>
>IMO, the files should be found VPATH.
How about this?
cgf
Fri Jun 30 10:26:38 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in (install-info): Find files to install via VPATH since
info files can be in either the source or the build directory.
Index: 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/06/30 14:32:01
@@ -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 $$i*; do \
+ $(INSTALL_DATA) $$i $(infodir)/$$i ; \
+ 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 $?; do \
echo " install-info --info-dir=$(infodir) $(infodir)/$$file";\
install-info --info-dir=$(infodir) $(infodir)/$$file || :;\
done; \
More information about the Gdb-patches
mailing list