From 3a80a48386ac12d04aa98802cf497a394d0bb74c Mon Sep 17 00:00:00 2001 From: Ulf Samuelsson Date: Mon, 6 Mar 2023 14:31:58 +0100 Subject: [PATCH] Build ldint Signed-off-by: Ulf Samuelsson --- ld/Makefile.am | 16 +++++++++++++-- ld/Makefile.in | 53 ++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 61 insertions(+), 8 deletions(-) diff --git a/ld/Makefile.am b/ld/Makefile.am index 813f19b354a..00118f8da13 100644 --- a/ld/Makefile.am +++ b/ld/Makefile.am @@ -128,7 +128,7 @@ CXXFLAGS_FOR_TARGET = `echo $(CXXFLAGS) | sed -e 's/-fsanitize=[^ ]*//g'` transform = s/^ld-new$$/$(installed_linker)/;@program_transform_name@ bin_PROGRAMS = ld-new -info_TEXINFOS = ld.texi +info_TEXINFOS = ld.texi ldint.texi ld_TEXINFOS = configdoc.texi noinst_TEXINFOS = ldint.texi man_MANS = ld.1 @@ -1060,7 +1060,19 @@ ld.1: $(srcdir)/ld.texi configdoc.texi (rm -f $@.T$$$$ && exit 1) $(AM_V_at)rm -f ld.pod -MAINTAINERCLEANFILES = configdoc.texi ld.1 +# Build the man page from the texinfo file +# The sed command removes the no-adjust Nroff command so that +# the man output looks standard. +ldint.1: $(srcdir)/ldint.texi configdoc.texi + $(AM_V_GEN)touch $@ + $(AM_V_at)-$(TEXI2POD) $(MANCONF) < $(srcdir)/ldint.texi > ldint.pod + $(AM_V_at)-($(POD2MAN) ldint.pod | \ + sed -e '/^.if n .na/d' > $@.T$$$$ && \ + mv -f $@.T$$$$ $@) || \ + (rm -f $@.T$$$$ && exit 1) + $(AM_V_at)rm -f ldint.pod + +MAINTAINERCLEANFILES = configdoc.texi ld.1 ldint.1 # We want to reconfigure if configure.host or configure.tgt changes. # development.sh is used to determine -Werror default. diff --git a/ld/Makefile.in b/ld/Makefile.in index 6ec916aa629..7bf51bffa54 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -305,11 +305,11 @@ am__v_texidevnull_0 = > /dev/null am__v_texidevnull_1 = INFO_DEPS = ld.info am__TEXINFO_TEX_DIR = $(srcdir)/../texinfo -DVIS = ld.dvi -PDFS = ld.pdf -PSS = ld.ps -HTMLS = ld.html -TEXINFOS = ld.texi +DVIS = ld.dvi ldint.dvi +PDFS = ld.pdf ldint.pdf +PSS = ld.ps ldint.ps +HTMLS = ld.html ldint.html +TEXINFOS = ld.texi ldint.texi TEXI2PDF = $(TEXI2DVI) --pdf --batch MAKEINFOHTML = $(MAKEINFO) --html AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) @@ -1682,18 +1682,48 @@ ld.info: ld.texi $(ld_TEXINFOS) fi; \ rm -rf $$backupdir; exit $$rc +ldint.info: ld.texi $(ld_TEXINFOS) + $(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am$$$$" && \ + rm -rf $$backupdir && mkdir $$backupdir && \ + if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ + for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ + if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ + done; \ + else :; fi && \ + if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + -o $@ `test -f 'ldint.texi' || echo '$(srcdir)/'`ldint.texi; \ + then \ + rc=0; \ + else \ + rc=$$?; \ + $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ + fi; \ + rm -rf $$backupdir; exit $$rc + ld.dvi: ld.texi $(ld_TEXINFOS) $(AM_V_TEXI2DVI)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ $(TEXI2DVI) $(AM_V_texinfo) --build-dir=$(@:.dvi=.t2d) -o $@ $(AM_V_texidevnull) \ `test -f 'ld.texi' || echo '$(srcdir)/'`ld.texi -ld.pdf: ld.texi $(ld_TEXINFOS) +ldint.dvi: ldint.texi $(ld_TEXINFOS) + $(AM_V_TEXI2DVI)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ + MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ + $(TEXI2DVI) $(AM_V_texinfo) --build-dir=$(@:.dvi=.t2d) -o $@ $(AM_V_texidevnull) \ + `test -f 'ldint.texi' || echo '$(srcdir)/'`ldint.texi + +ld.pdf: ld.texi $(ld_TEXINFOS) $(AM_V_TEXI2PDF)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ $(TEXI2PDF) $(AM_V_texinfo) --build-dir=$(@:.pdf=.t2p) -o $@ $(AM_V_texidevnull) \ `test -f 'ld.texi' || echo '$(srcdir)/'`ld.texi +ldint.pdf: ldint.texi $(ld_TEXINFOS) + $(AM_V_TEXI2PDF)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ + MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ + $(TEXI2PDF) $(AM_V_texinfo) --build-dir=$(@:.pdf=.t2p) -o $@ $(AM_V_texidevnull) \ + `test -f 'ldint.texi' || echo '$(srcdir)/'`ldint.texi + ld.html: ld.texi $(ld_TEXINFOS) $(AM_V_MAKEINFO)rm -rf $(@:.html=.htp) $(AM_V_at)if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ @@ -1703,6 +1733,17 @@ ld.html: ld.texi $(ld_TEXINFOS) else \ rm -rf $(@:.html=.htp); exit 1; \ fi + +ldint.html: ldint.texi $(ld_TEXINFOS) + $(AM_V_MAKEINFO)rm -rf $(@:.html=.htp) + $(AM_V_at)if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + -o $(@:.html=.htp) `test -f 'ldint.texi' || echo '$(srcdir)/'`ldint.texi; \ + then \ + rm -rf $@ && mv $(@:.html=.htp) $@; \ + else \ + rm -rf $(@:.html=.htp); exit 1; \ + fi + .dvi.ps: $(AM_V_DVIPS)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ $(DVIPS) $(AM_V_texinfo) -o $@ $< -- 2.30.2