From: Brooks Moses <brooks.moses@codesourcery.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [patch] Implement "make pdf" and "make install-pdf" targets.
Date: Fri, 23 Feb 2007 09:26:00 -0000 [thread overview]
Message-ID: <45DEB333.3040500@codesourcery.com> (raw)
In-Reply-To: <45DE9FE6.8090507@codesourcery.com>
[-- Attachment #1: Type: text/plain, Size: 1427 bytes --]
Brooks Moses wrote:
> The attached patch implements "make pdf" in all of the parts of src/
> included in the GDB source tarball, and also implements "make
> install-pdf" within src/gdb.
[...]
> etc/ChangeLog -------------------------------------------------
> 2007-02-20 Brooks Moses <brooks.moses@codesourcery.com>
>
> * Makefile.in: Add support for a "pdf" target.
Argh -- I just realized that this bit of the patch doesn't actually do
what it's supposed to, though the "make dvi" rules in etc/Makefile.in
that I copied are too clever by half and thus fail silently rather than
breaking. The attached revised patch does the right thing, and also
implements an "install-pdf" target (based off the "install-info"
target). Thus, the revised ChangeLog line:
etc/ChangeLog -------------------------------------------------
2007-02-20 Brooks Moses <brooks.moses@codesourcery.com>
* Makefile.in: Add support for "pdf" and "install-pdf" targets.
---------------------------------------------------------------
One relevant note is that this now depends on epstopdf to generate the
figures for configure.pdf from the .eps versions. This is a script
included with the standard TeX distribution (needed for texi2dvi to
run), though, so I don't think it's a worrisome extra dependency.
Again, tested on i686-pc-linux-gnu, and this time I made sure _all_ the
pdf files were generated correctly! :)
- Brooks
[-- Attachment #2: etc-make-pdf-3.diff --]
[-- Type: text/x-patch, Size: 2982 bytes --]
Index: etc/Makefile.in
===================================================================
RCS file: /cvs/src/src/etc/Makefile.in,v
retrieving revision 1.6
diff -U3 -r1.6 Makefile.in
--- etc/Makefile.in 6 Apr 2006 21:49:30 -0000 1.6
+++ etc/Makefile.in 23 Feb 2007 09:09:03 -0000
@@ -28,6 +28,7 @@
datarootdir = @datarootdir@
docdir = @docdir@
infodir = @infodir@
+pdfdir = @docdir@
htmldir = @htmldir@
SHELL = /bin/sh
@@ -42,6 +43,9 @@
TEXI2DVI = `if [ -f ../texinfo/util/texi2dvi ]; \
then echo ../texinfo/util/texi2dvi; \
else echo texi2dvi; fi`
+TEXI2PDF = `if [ -f ../texinfo/util/texi2dvi ]; \
+ then echo "../texinfo/util/texi2dvi --pdf"; \
+ else echo "texi2dvi --pdf"; fi`
TEXI2HTML = `if [ -f ../texinfo/makeinfo/makeinfo ]; \
then echo "../texinfo/makeinfo/makeinfo --html"; \
else echo "makeinfo --html"; fi`
@@ -56,6 +60,7 @@
INFOFILES = standards.info configure.info
DVIFILES = standards.dvi configure.dvi
+PDFFILES = standards.pdf configure.pdf
HTMLFILES = standards.html configure.html
all: info
@@ -126,6 +131,32 @@
fi; \
done
+pdf:
+ for f in $(PDFFILES); do \
+ if test -f $(srcdir)/`echo $$f | sed -e 's/.pdf$$/.texi/'`; then \
+ if $(MAKE) "TEXI2PDF=$(TEXI2PDF)" $$f; then \
+ true; \
+ else \
+ exit 1; \
+ fi; \
+ fi; \
+ done
+
+install-pdf: pdf
+ $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(pdfdir)/etc
+ if test ! -f standards.pdf; then cd $(srcdir); fi; \
+ if test -f standards.pdf; then \
+ for i in standards.pdf*; do \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(pdfdir)/etc/$$i; \
+ done; \
+ fi
+ if test ! -f configure.pdf; then cd $(srcdir); fi; \
+ if test -f configure.pdf; then \
+ for i in configure.pdf*; do \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(pdfdir)/etc/$$i; \
+ done; \
+ fi
+
standards.info: $(srcdir)/standards.texi $(srcdir)/make-stds.texi
$(MAKEINFO) --no-split -I$(srcdir) -o standards.info $(srcdir)/standards.texi
@@ -138,6 +169,9 @@
standards.ps: standards.dvi
$(DVIPS) standards.dvi -o standards.ps
+standards.pdf: $(srcdir)/standards.texi
+ TEXINPUTS=$(TEXIDIR):$$TEXINPUTS $(TEXI2PDF) $(srcdir)/standards.texi
+
# makeinfo requires images to be in the current directory.
configure.info: $(srcdir)/configure.texi $(srcdir)/configdev.tin $(srcdir)/configbuild.tin
rm -f configdev.txt configbuild.txt
@@ -166,6 +200,13 @@
$(DVIPS) configure.dvi -o configure.ps
rm -f configdev.eps configbuild.eps
+configure.pdf: $(srcdir)/configure.texi $(srcdir)/configdev.tin $(srcdir)/configbuild.tin $(srcdir)/configdev.ein $(srcdir)/configbuild.ein
+ rm -f configdev.pdf configbuild.pdf
+ epstopdf $(srcdir)/configdev.ein -outfile=configdev.pdf
+ epstopdf $(srcdir)/configbuild.ein -outfile=configbuild.pdf
+ TEXINPUTS=$(TEXIDIR):$$TEXINPUTS $(TEXI2PDF) $(srcdir)/configure.texi
+ rm -f configdev.pdf configbuild.pdf
+
configure.html: $(srcdir)/configure.texi
cp $(srcdir)/configdev.jin configdev.jpg
cp $(srcdir)/configbuild.jin configbuild.jpg
next prev parent reply other threads:[~2007-02-23 9:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-23 8:28 Brooks Moses
2007-02-23 9:26 ` Brooks Moses [this message]
2007-02-27 17:28 ` Daniel Jacobowitz
2007-02-27 20:14 ` Brooks Moses
2007-02-27 20:37 ` Eli Zaretskii
2007-02-27 20:50 ` Daniel Jacobowitz
2007-03-27 18:10 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45DEB333.3040500@codesourcery.com \
--to=brooks.moses@codesourcery.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox