public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] modula-2, doc: Build dvi, ps and pdf doc in the gcc/doc directory.
@ 2022-12-31 13:57 Iain Sandoe
  2023-01-04 12:00 ` Gaius Mulley
  0 siblings, 1 reply; 2+ messages in thread
From: Iain Sandoe @ 2022-12-31 13:57 UTC (permalink / raw)
  To: gcc-patches; +Cc: gaiusmod2

Tested on darwin21 with "make m2.pdf" and "make m2.dvi".
OK for trunk?
thanks.
Iain

--- 8< ---

This also uses the configured $(TEXI2DVI) and $(TEXI2PDF) to deal with those
targets (since we cannot assume to know what the user might have installed).

gcc/m2/ChangeLog:

	* Make-lang.in (dvi, ps, pdf): Build in the gcc/doc directory, also
	use the configured tools for texi -> dvi and texi -> pdf.
---
 gcc/m2/Make-lang.in | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/gcc/m2/Make-lang.in b/gcc/m2/Make-lang.in
index a134d3aca92..6c2b095bb7d 100644
--- a/gcc/m2/Make-lang.in
+++ b/gcc/m2/Make-lang.in
@@ -140,18 +140,22 @@ $(DESTDIR)$(man1dir)/$(GM2_INSTALL_NAME)$(man1ext): doc/m2.1 installdirs
 	-$(INSTALL_DATA) $< $@
 	-chmod a-x $@
 
-m2.dvi: $(TEXISRC)
+m2.dvi: doc/m2.dvi
+
+doc/m2.dvi: $(TEXISRC)
 	$(TEXI2DVI) -I $(objdir)/m2 -I $(srcdir)/doc/include $(srcdir)/doc/gm2.texi -o $@
 
-m2.ps: m2.dvi
+doc/m2.ps: doc/m2.dvi
 	dvips -o $@ $<
 
-m2.pdf: m2.ps
-	gs -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=$@ $<
+m2.pdf: doc/m2.pdf
+
+doc/m2.pdf: $(TEXISRC)
+	$(TEXI2PDF) -I $(objdir)/m2 -I $(srcdir)/doc/include $(srcdir)/doc/gm2.texi -o $@
 
 .INTERMEDIATE: m2.pod
 
-m2.pod: doc/gm2.texi $(TEXISRC)
+m2.pod: $(TEXISRC)
 	-$(TEXI2POD) -I $(objdir)/m2 -D m2 < $< > $@
 
 doc/m2.info: $(TEXISRC)
-- 
2.37.1 (Apple Git-137.1)


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] modula-2, doc: Build dvi, ps and pdf doc in the gcc/doc directory.
  2022-12-31 13:57 [PATCH] modula-2, doc: Build dvi, ps and pdf doc in the gcc/doc directory Iain Sandoe
@ 2023-01-04 12:00 ` Gaius Mulley
  0 siblings, 0 replies; 2+ messages in thread
From: Gaius Mulley @ 2023-01-04 12:00 UTC (permalink / raw)
  To: Iain Sandoe; +Cc: gcc-patches, iain

Iain Sandoe <iains.gcc@gmail.com> writes:

> Tested on darwin21 with "make m2.pdf" and "make m2.dvi".
> OK for trunk?
> thanks.
> Iain
>
> --- 8< ---
>
> This also uses the configured $(TEXI2DVI) and $(TEXI2PDF) to deal with those
> targets (since we cannot assume to know what the user might have installed).
>
> gcc/m2/ChangeLog:
>
> 	* Make-lang.in (dvi, ps, pdf): Build in the gcc/doc directory, also
> 	use the configured tools for texi -> dvi and texi -> pdf.
> ---
>  gcc/m2/Make-lang.in | 14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/gcc/m2/Make-lang.in b/gcc/m2/Make-lang.in
> index a134d3aca92..6c2b095bb7d 100644
> --- a/gcc/m2/Make-lang.in
> +++ b/gcc/m2/Make-lang.in
> @@ -140,18 +140,22 @@ $(DESTDIR)$(man1dir)/$(GM2_INSTALL_NAME)$(man1ext): doc/m2.1 installdirs
>  	-$(INSTALL_DATA) $< $@
>  	-chmod a-x $@
>  
> -m2.dvi: $(TEXISRC)
> +m2.dvi: doc/m2.dvi
> +
> +doc/m2.dvi: $(TEXISRC)
>  	$(TEXI2DVI) -I $(objdir)/m2 -I $(srcdir)/doc/include $(srcdir)/doc/gm2.texi -o $@
>  
> -m2.ps: m2.dvi
> +doc/m2.ps: doc/m2.dvi
>  	dvips -o $@ $<
>  
> -m2.pdf: m2.ps
> -	gs -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=$@ $<
> +m2.pdf: doc/m2.pdf
> +
> +doc/m2.pdf: $(TEXISRC)
> +	$(TEXI2PDF) -I $(objdir)/m2 -I $(srcdir)/doc/include $(srcdir)/doc/gm2.texi -o $@
>  
>  .INTERMEDIATE: m2.pod
>  
> -m2.pod: doc/gm2.texi $(TEXISRC)
> +m2.pod: $(TEXISRC)
>  	-$(TEXI2POD) -I $(objdir)/m2 -D m2 < $< > $@
>  
>  doc/m2.info: $(TEXISRC)

thanks LGTM -

regards,
Gaius

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-04 12:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-31 13:57 [PATCH] modula-2, doc: Build dvi, ps and pdf doc in the gcc/doc directory Iain Sandoe
2023-01-04 12:00 ` Gaius Mulley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).