summaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2007-03-27 18:09:36 +0000
committerDaniel Jacobowitz <dan@debian.org>2007-03-27 18:09:36 +0000
commit74f044f576b8209dca6fa9eab6121d2fd037d0f7 (patch)
tree47e56796e9b98b6dbc40aafb2bf0e4c3767f3f9a /gdb
parent0d3b3d239dd28f0772e46f27cad6a1e4a8c29cee (diff)
downloadgdb-74f044f576b8209dca6fa9eab6121d2fd037d0f7.tar.gz
Add "make pdf" and "make install-pdf", from Brooks Moses
<brooks.moses@codesourcery.com>.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/Makefile.in4
-rw-r--r--gdb/doc/ChangeLog7
-rw-r--r--gdb/doc/Makefile.in32
-rw-r--r--gdb/doc/refcard.tex6
-rw-r--r--gdb/gdbserver/ChangeLog4
-rw-r--r--gdb/gdbserver/Makefile.in3
-rw-r--r--gdb/testsuite/ChangeLog4
-rw-r--r--gdb/testsuite/Makefile.in2
9 files changed, 62 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index bdb281fa4c6..b69d208eb31 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
+
+ * Makefile.in: Add support for a "pdf" target.
+
2007-03-27 Daniel Jacobowitz <dan@codesourcery.com>
* amd64-tdep.c (amd64_init_frame_cache): New function.
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 041f2ebefa8..199715c2097 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -42,6 +42,7 @@ man7dir = $(mandir)/man7
man8dir = $(mandir)/man8
man9dir = $(mandir)/man9
infodir = @infodir@
+pdfdir = $(prefix)/share/doc/gdb
htmldir = $(prefix)/html
includedir = @includedir@
@@ -435,6 +436,7 @@ FLAGS_TO_PASS = \
"prefix=$(prefix)" \
"exec_prefix=$(exec_prefix)" \
"infodir=$(infodir)" \
+ "pdfdir=$(pdfdir)" \
"libdir=$(libdir)" \
"mandir=$(mandir)" \
"datadir=$(datadir)" \
@@ -1055,7 +1057,7 @@ check//%: force
"$$target"; \
else true; fi
-info dvi install-info clean-info html install-html: force
+info install-info clean-info dvi pdf install-pdf html install-html: force
@$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
gdb.z:gdb.1
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index ad8c031c708..61d07089d52 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,10 @@
+2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
+
+ * Makefile.in: Add "pdfdir" installation
+ directory, PDFTEX macro, support for "install-pdf" target,
+ and rules for making a pdf version of refcard.texi.
+ * refcard.tex: Specify paper size for PDF output.
+
2007-03-26 Bob Wilson <bob.wilson@acm.org>
* gdb.texinfo (Omissions from Ada, Additions to Ada): Wrap long lines.
diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in
index 2f5eed5c24b..e15939a912b 100644
--- a/gdb/doc/Makefile.in
+++ b/gdb/doc/Makefile.in
@@ -24,6 +24,7 @@ VPATH = @srcdir@
prefix = @prefix@
infodir = @infodir@
+pdfdir = $(prefix)/share/doc/gdb
htmldir = $(prefix)/html
SHELL = @SHELL@
@@ -34,6 +35,8 @@ INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
+mkinstalldirs = $(SHELL) $(srcdir)/../../mkinstalldirs
+
# main GDB source directory
gdbdir = $(srcdir)/..
@@ -69,6 +72,9 @@ SET_TEXINPUTS = \
# Files which should be generated via 'info' and installed by 'install-info'
INFO_DEPS = gdb.info gdbint.info stabs.info annotate.info
+# Files which should be generated via 'pdf' and installed by 'install-pdf'
+PDFFILES = gdb.pdf gdbint.pdf stabs.pdf refcard.pdf annotate.pdf
+
# There may be alternate predefined collections of switches to configure
# the GDB manual. Normally this is not done in synch with the software
# config system, since this choice tends to be independent; most people
@@ -92,6 +98,7 @@ REFEDITS =
# Don Knuth's TeX formatter
TEX = tex
+PDFTEX = pdftex
# Program to generate Postscript files from DVI files.
DVIPS = dvips
@@ -151,7 +158,7 @@ info: $(INFO_DEPS)
dvi: gdb.dvi gdbint.dvi stabs.dvi refcard.dvi annotate.dvi
ps: gdb.ps gdbint.ps stabs.ps refcard.ps annotate.ps
html: gdb_toc.html gdbint_toc.html stabs_toc.html annotate_toc.html
-pdf: gdb.pdf gdbint.pdf stabs.pdf annotate.pdf
+pdf: $(PDFFILES)
all-doc: info dvi ps # pdf
diststuff: info
@@ -197,6 +204,18 @@ install-html: html
$(INSTALL_DATA) $$i $(DESTDIR)$(htmldir)/$$i ; \
done
+pdf__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+
+install-pdf: $(PDFFILES)
+ @$(NORMAL_INSTALL)
+ test -z "$(pdfdir)" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)"
+ @list='$(PDFFILES)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(pdf__strip_dir) \
+ echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \
+ done
+
STAGESTUFF = *.info* gdb-all.texi GDBvn.texi *.ps *.dvi *.pdf
# Copy the object files from a particular stage into a subdirectory.
@@ -244,6 +263,17 @@ refcard.dvi : refcard.tex $(REFEDITS)
refcard.ps : refcard.dvi
$(DVIPS) -t landscape -o $@ $?
+refcard.pdf : refcard.tex $(REFEDITS)
+ echo > tmp.sed
+ for f in x $(REFEDITS) ; do \
+ test x$$f = xx && continue ; \
+ cat $(srcdir)/$$f >>tmp.sed ; \
+ done
+ sed -f tmp.sed $(srcdir)/refcard.tex >sedref.tex
+ $(SET_TEXINPUTS) $(PDFTEX) sedref.tex
+ mv sedref.pdf refcard.pdf
+ rm -f sedref.log sedref.tex tmp.sed
+
# File to record current GDB version number (copied from main dir version.in)
GDBvn.texi : ${gdbdir}/version.in
echo "@set GDBVN `sed q $(srcdir)/../version.in`" > ./GDBvn.new
diff --git a/gdb/doc/refcard.tex b/gdb/doc/refcard.tex
index f6f0a0f1f6b..6d4830275ae 100644
--- a/gdb/doc/refcard.tex
+++ b/gdb/doc/refcard.tex
@@ -1,7 +1,7 @@
%%%%%%%%%%%%%%%% gdb-refcard.tex %%%%%%%%%%%%%%%%
%This file is TeX source for a reference card describing GDB, the GNU debugger.
-%Copyright (C) 1991, 1992, 1993, 1996, 1998, 1999, 2000
+%Copyright (C) 1991, 1992, 1993, 1996, 1998, 1999, 2000, 2007
%Free Software Foundation, Inc.
%Permission is granted to make and distribute verbatim copies of
%this reference provided the copyright notices and permission notices
@@ -98,6 +98,10 @@
\vmargin=.25in % vertical margin width
\secskip=1pc % space between refcard secs
\lskip=2pt % extra skip between \sec entries
+\ifx\pdfoutput\undefined\else % check if we are using pdfTeX
+ \pdfpagewidth=\totalwidth % width of paper in pdf output
+ \pdfpageheight=\totalheight % height of paper in pdf output
+\fi
%------- end papersize params
%%
%% change according to personal taste, not papersize dependent
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 4d60b8760f4..eb596801d0e 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,7 @@
+2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
+
+ * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
+
2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
* terminal.h: Check HAVE_SGTTY_H.
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index dfb08032ffa..5b2a3ed0e2e 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -177,8 +177,9 @@ uninstall: force
installcheck:
check:
-info dvi:
+info dvi pdf:
install-info:
+install-pdf:
html:
install-html:
clean-info:
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index bc82912d630..3d3af041411 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
+
+ * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
+
2007-03-27 Daniel Jacobowitz <dan@codesourcery.com>
* config/gdbserver.exp (gdbserver_gdb_load): Update argument list.
diff --git a/gdb/testsuite/Makefile.in b/gdb/testsuite/Makefile.in
index 44dc0a1336b..edcd35cfb42 100644
--- a/gdb/testsuite/Makefile.in
+++ b/gdb/testsuite/Makefile.in
@@ -91,6 +91,8 @@ INFODIRS=doc
info:
install-info:
dvi:
+pdf:
+install-pdf:
html:
install-html: