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>
$(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 $@; \
)
$(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 $@; \
)