Go to file
Andrew Burgess 1a5dfba4ef gdb/doc: allow for version.subst in the source tree
In a git checkout of the source code we don't have a version.subst
file in the gdb/doc directory.  When building the GDB docs the
version.subst file is generated on demand (we have a recipe for that).

However, in a release tar file we do include a copy of the
version.subst file in the source tree, as a result the version.subst
recipe will not be run.

If, in a release build, we force the running of any recipe that
depends on version.subst then we run into a problem.  For example,
slightly confusingly, if we 'touch gdb/doc/version.subst' within the
unpacked source tree of a release, then 'make -C gdb/doc GDBvn.texi'
in the build tree, we'll see:

  make: Entering directory '/tmp/build/build/gdb/doc'
    GEN    GDBvn.texi
  sed: can't read version.subst: No such file or directory
  make: Leaving directory '/tmp/build/build/gdb/doc'

The problem is that every reference to version.subst in GDB's Makefile
assumes that the version.subst file will always be in the build
directory.

Handily version.subst is always the first dependency in every recipe
that uses that file.  As such we can replace references to
version.subst with $<, make will expand this to the location where the
dependency was found.

In the case of the man page generation, the reference to version.subst
is hidden inside POD2MAN.  It seemed a little confusing adding a use
of  $< within POD2MAN, so I've moved the use into the recipe, which I
think is clearer.

I've also added comments for the two rules that I've modified to
explain our use of $<.

After this change it is possible to rebuild the man pages even when
version.subst is located in the source tree.

Approved-By: Tom Tromey <tom@tromey.com>
2024-06-24 12:13:41 +01:00
bfd Automatic date update in version.in 2024-06-24 00:00:29 +00:00
binutils Revert "Remove LIBINTL_DEP" 2024-06-20 21:15:27 +09:30
config Revert "Remove LIBINTL_DEP" 2024-06-20 21:15:27 +09:30
contrib
cpu
elfcpp
etc
gas aarch64: Enable +cssc for armv8.9-a 2024-06-23 13:59:01 +01:00
gdb gdb/doc: allow for version.subst in the source tree 2024-06-24 12:13:41 +01:00
gdbserver Revert "Remove LIBINTL_DEP" 2024-06-20 21:15:27 +09:30
gdbsupport Revert "Remove LIBINTL_DEP" 2024-06-20 21:15:27 +09:30
gnulib autoupdate: replace obsolete macros AC_CONFIG_HEADER 2024-06-10 08:25:55 +09:30
gold Revert "Remove LIBINTL_DEP" 2024-06-20 21:15:27 +09:30
gprof Revert "Remove LIBINTL_DEP" 2024-06-20 21:15:27 +09:30
gprofng autoupdate: add square brackets around arguments of AC_INIT 2024-06-10 08:25:56 +09:30
include aarch64: Enable +cssc for armv8.9-a 2024-06-23 13:59:01 +01:00
ld Revert "Remove LIBINTL_DEP" 2024-06-20 21:15:27 +09:30
libbacktrace autoupdate: regen after replacing obsolete macros 2024-06-10 08:25:56 +09:30
libctf Revert "Remove LIBINTL_DEP" 2024-06-20 21:15:27 +09:30
libdecnumber
libiberty autoupdate: regen after replacing obsolete macros 2024-06-10 08:25:56 +09:30
libsframe autoupdate: add square brackets around arguments of AC_INIT 2024-06-10 08:25:56 +09:30
opcodes x86: optimize {,V}PEXTR{D,Q} with immediate of 0 2024-06-21 14:40:44 +02:00
readline autoupdate: add square brackets around arguments of AC_INIT 2024-06-10 08:25:56 +09:30
sim regen sim/frv files for copyright update 2024-06-10 08:25:56 +09:30
texinfo
zlib autoupdate: regen after replacing obsolete macros 2024-06-10 08:25:56 +09:30
.cvsignore
.editorconfig
.gitattributes
.gitignore .gitignore: ignore .vscode 2024-05-30 12:09:35 +01:00
.pre-commit-config.yaml gdb: bump black version to 24.4.2 2024-05-16 11:34:40 -04:00
ar-lib
ChangeLog
compile
config-ml.in
config.guess
config.rpath
config.sub
configure autoupdate: regen after replacing obsolete macros 2024-06-10 08:25:56 +09:30
configure.ac autoupdate: replace old version of AC_INIT by the new one 2024-06-10 08:25:55 +09:30
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.LIBGLOSS
COPYING.NEWLIB
depcomp
djunpack.bat
install-sh
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS
Makefile.def
Makefile.in
Makefile.tpl
makefile.vms
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
README-maintainer-mode
SECURITY.txt
setup.com
src-release.sh src-release.sh: don't take untracked files into account in the uncommitted changes check 2024-06-10 12:40:06 +01:00
symlink-tree
test-driver
ylwrap

		   README for GNU development tools

This directory contains various GNU compilers, assemblers, linkers, 
debuggers, etc., plus their support routines, definitions, and documentation.

If you are receiving this as part of a GDB release, see the file gdb/README.
If with a binutils release, see binutils/README;  if with a libg++ release,
see libg++/README, etc.  That'll give you info about this
package -- supported targets, how to use it, how to report bugs, etc.

It is now possible to automatically configure and build a variety of
tools with one command.  To build all of the tools contained herein,
run the ``configure'' script here, e.g.:

	./configure 
	make

To install them (by default in /usr/local/bin, /usr/local/lib, etc),
then do:
	make install

(If the configure script can't determine your type of computer, give it
the name as an argument, for instance ``./configure sun4''.  You can
use the script ``config.sub'' to test whether a name is recognized; if
it is, config.sub translates it to a triplet specifying CPU, vendor,
and OS.)

If you have more than one compiler on your system, it is often best to
explicitly set CC in the environment before running configure, and to
also set CC when running make.  For example (assuming sh/bash/ksh):

	CC=gcc ./configure
	make

A similar example using csh:

	setenv CC gcc
	./configure
	make

Much of the code and documentation enclosed is copyright by
the Free Software Foundation, Inc.  See the file COPYING or
COPYING.LIB in the various directories, for a description of the
GNU General Public License terms under which you can copy the files.

REPORTING BUGS: Again, see gdb/README, binutils/README, etc., for info
on where and how to report problems.