diff options
author | Andrew Burgess <aburgess@redhat.com> | 2024-05-11 09:44:07 +0100 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2024-05-14 16:53:29 +0100 |
commit | ad666becfe075ca7c831ebbf4b44526994395e97 (patch) | |
tree | 9ad7b5c8b255adc76ccbd90bae5c5f253d933782 /gdb | |
parent | c2b915e2a5cdb2ef79124e1a558f67959c78cc62 (diff) | |
download | gdb-ad666becfe075ca7c831ebbf4b44526994395e97.zip gdb-ad666becfe075ca7c831ebbf4b44526994395e97.tar.gz gdb-ad666becfe075ca7c831ebbf4b44526994395e97.tar.bz2 |
gdb/doc: don't delete *.pod files too early
When doing 'make -C gdb/doc man' to build the man pages, I noticed
that the outputs were being rebuilt each time the make command was
rerun, even when the input files hadn't changed.
This was caused by this commit:
commit 824083f34c222aa7419e2ea58e82d6f230d5f531
Date: Fri Apr 12 17:47:20 2024 +0100
gdb/doc: use silent-rules.mk in the Makefile
Which split the generation of the .pod file from the actual creation
of the man page file. Prior to this split it was OK to delete the
.pod file at the end of the recipe, the rule depending on the .texi
input file, and output was the .1 or .5 man page file.
Now however, with the split, the man page creation depends on the .pod
file, if we delete this after creating the .1 or .5 man page file then
the next time we run 'make' the .pod file is missing and is
regenerated, which in turn triggers the regeneration of the man page
file.
Fix this by leaving the .pod file around, and only cleaning up these
files in the 'mostlyclean' target.
Which leads to a second problem, the POD_FILE_TMPS is not created
correctly, so we don't actually clean up the .pod files! This too is
fixed in this commit.
After this commit running 'make -C gdb/doc man' will build the manual
pages the first time, and each subsequent run will do nothing.
Running 'make -C gdb/doc mostlyclean' will now delete the .pod files.
Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/doc/Makefile.in | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in index 28d829f..3f3fe7b 100644 --- a/gdb/doc/Makefile.in +++ b/gdb/doc/Makefile.in @@ -190,8 +190,8 @@ MANS = $(MAN1S) $(MAN5S) # The pod files that are generated as a side effect of creating the # man pages. -POD_FILE_TMPS = $(patsubst %.1,%.pod,$MAN1S) \ - $(patsubst %.5,%.pod,$MAN1S) +POD_FILE_TMPS = $(patsubst %.1,%.pod,$(MAN1S)) \ + $(patsubst %.5,%.pod,$(MAN5S)) HAVE_NATIVE_GCORE_TARGET = @HAVE_NATIVE_GCORE_TARGET@ HAVE_NATIVE_GCORE_HOST = @HAVE_NATIVE_GCORE_HOST@ @@ -665,12 +665,10 @@ annotate/index.html: $(ANNOTATE_DOC_FILES) $(MAN1S) : %.1 : %.pod $(GDB_DOC_FILES) $(ECHO_TEXI2MAN) ($(POD2MAN1) $*.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) - $(SILENCE) rm -f $*.pod $(MAN5S) : %.5 : %.pod $(GDB_DOC_FILES) $(ECHO_TEXI2MAN) ($(POD2MAN1) $*.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) - $(SILENCE) rm -f $*.pod force: |