]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
bfd: fix unnecessary bfd.info regen
authorAlexey Izbyshev <izbyshev@ispras.ru>
Wed, 2 Oct 2024 19:58:08 +0000 (22:58 +0300)
committerAlan Modra <amodra@gmail.com>
Thu, 3 Oct 2024 03:28:50 +0000 (12:58 +0930)
When building from an unmodified release tarball, a REGEN_TEXI
invocation is supposed to create a symlink to the .texi file
in the source directory and discard the newly generated .tmp file.
However, after commit bd32be01c997 ("bfd: merge doc subdir up a level")
it creates the symlink at the wrong level, and then a .texi with
a fresh timestamp, which in turn forces bfd.info regeneration.
This breaks builds in environments without makeinfo program.

Fix this by creating the symlink at the level of the target stamp.

Fixes: bd32be01c997 ("bfd: merge doc subdir up a level")
Signed-off-by: Alexey Izbyshev <izbyshev@ispras.ru>
bfd/Makefile.in
bfd/doc/local.mk

index b3d97d478eacc03769bbbb73384cc0d039ec6792..e9b479a8bdceeccbde06e42c2a3e315186e4ffa3 100644 (file)
@@ -1322,7 +1322,7 @@ REGEN_TEXI = \
        $(MKDOC) -f $(srcdir)/doc/doc.str < $< > $@.tmp; \
        texi=$@; \
        texi=$${texi%.stamp}.texi; \
-       test -e $$texi || test ! -f $(srcdir)/$$texi || $(LN_S) $(srcdir)/$$texi .; \
+       test -e $$texi || test ! -f $(srcdir)/$$texi || $(LN_S) $(srcdir)/$$texi $$texi; \
        $(SHELL) $(srcdir)/../move-if-change $@.tmp $$texi; \
        touch $@; \
        )
index 5e8f486f200fe630c32b4cd1d8652636aa21dade..9767e583f182d7d2c069ec562ae5ce7bc9a9bb56 100644 (file)
@@ -101,7 +101,7 @@ REGEN_TEXI = \
        $(MKDOC) -f $(srcdir)/%D%/doc.str < $< > $@.tmp; \
        texi=$@; \
        texi=$${texi%.stamp}.texi; \
-       test -e $$texi || test ! -f $(srcdir)/$$texi || $(LN_S) $(srcdir)/$$texi .; \
+       test -e $$texi || test ! -f $(srcdir)/$$texi || $(LN_S) $(srcdir)/$$texi $$texi; \
        $(SHELL) $(srcdir)/../move-if-change $@.tmp $$texi; \
        touch $@; \
        )