[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New documentation targets (pdf & txt)
From: |
Derek R. Price |
Subject: |
Re: New documentation targets (pdf & txt) |
Date: |
Fri, 19 Oct 2001 00:04:17 -0400 |
address@hidden wrote:
> On Tue, Sep 18, 2001 at 03:26:39PM -0400, Derek Robert Price wrote:
> > Derek Robert Price wrote:
> >
> > > *.texinfo files in case anyone is interested. Both rules use makeinfo
> > > so they shouldn't create any new dependencies and the input and output
> >
> > Excuse me. The PDF rule does use texi2dvi as well, but that seems to be
> > used in Automake generated `Makefile.in's already for the `.texi.dvi:'
> > targets.
>
> Please, add --batch too. All the version of texi2dvi supporting --pdf
> support --batch.
Okay, I did. I also got motivated and made the whole kit and kiboodle work,
right down to the clean targets.
I got partway through making generic am_(MOSTLY|DIST)?CLEANFILES variables
that could be added to using `+=' like RECURSIVE_TARGETS, but I couldn't get
it to work right and gave up. It shouldn't be too hard to finish that if
variable_pretty_output worked correctly from handle_clean. I couldn't get it
to - which is probably my fault.
I did notice something strange while working on this. I didn't test it, but
it looks like info targets can only be created in leaf dirs - or rather, not
when SUBDIRS has any content.
Let me know if you need anything else.
Derek
--
Derek Price CVS Solutions Architect ( http://CVSHome.org )
mailto:address@hidden CollabNet ( http://collab.net )
--
Metaphors be with you.
2001-10-18 Derek Price <address@hidden>
* automake.in (handle_texinfo_helper): Output $(PDFS),
$(POSTSCRIPTS),
and $(TXTS) variables.
(handle_clean): Transform ?am_info_CLEAN?.
* lib/am/texibuild.am: Add texi to pdf & txt suffix rules.
* lib/am/texinfos.am: Add pdf, ps, and txt targets.
* lib/am/clean.am (clean-generic): Clean dvis, pdfs, postscripts, and
txts.
* tests/info.test: Check for DVIS, PDFS, POSTSCRIPTS, & TXTS.
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1182
diff -u -r1.1182 automake.in
--- automake.in 2001/10/17 17:00:39 1.1182
+++ automake.in 2001/10/19 02:57:16
@@ -3047,7 +3047,8 @@
my @texis = &variable_value_as_list_recursive ('info_TEXINFOS', 'all');
- my (@info_deps_list, @dvis_list, @texi_deps);
+ my (@info_deps_list, @dvis_list, @pdfs_list, @pss_list, @txts_list,
+ @texi_deps);
my %versions;
my $done = 0;
my @texi_cleans;
@@ -3138,6 +3139,9 @@
push (@info_deps_list, $out_file);
push (@dvis_list, $infobase . '.dvi');
+ push (@pdfs_list, $infobase . '.pdf');
+ push (@pss_list, $infobase . '.ps');
+ push (@txts_list, $infobase . '.txt');
}
# Handle location of texinfo.tex.
@@ -3189,6 +3193,9 @@
&define_variable ("INFO_DEPS", join (' ', @info_deps_list));
&define_variable ("DVIS", join (' ', @dvis_list));
+ &define_variable ("PDFS", join (' ', @pdfs_list));
+ &define_variable ("POSTSCRIPTS", join (' ', @pss_list));
+ &define_variable ("TXTS", join (' ', @txts_list));
# This next isn't strictly needed now -- the places that look here
# could easily be changed to look in info_TEXINFOS. But this is
# probably better, in case noinst_TEXINFOS is ever supported.
@@ -4143,7 +4150,7 @@
my %transform;
# Don't include `MAINTAINER'; it is handled specially below.
- foreach my $name ('MOSTLY', '', 'DIST')
+ foreach my $name ('MOSTLY', '', 'DIST', 'am_info_')
{
$transform{"${name}CLEAN"} = &variable_defined ("${name}CLEANFILES");
}
Index: lib/am/clean.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/clean.am,v
retrieving revision 1.40
diff -u -r1.40 clean.am
--- clean.am 2001/05/17 03:02:38 1.40
+++ clean.am 2001/10/19 02:57:17
@@ -25,6 +25,7 @@
clean-am: clean-generic mostlyclean-am
clean-generic:
+?am_info_CLEAN? -test -z "$(am_info_CLEANFILES)" || rm -f
$(am_info_CLEANFILES)
?CLEAN? -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-am: distclean-generic clean-am
Index: lib/am/texibuild.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/texibuild.am,v
retrieving revision 1.4
diff -u -r1.4 texibuild.am
--- texibuild.am 2001/09/23 10:16:51 1.4
+++ texibuild.am 2001/10/19 02:57:17
@@ -39,7 +39,20 @@
## Must set MAKEINFO like this so that version.texi will be found even
## if it is in srcdir.
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I
$(srcdir)' \
- $(TEXI2DVI) $<
+ $(TEXI2DVI) --batch $<
+
+.%SUFFIX%.pdf:
+## PDF targets for those who want them
+ TEXINPUTS="%TEXINFODIR%$(PATH_SEPARATOR)$$TEXINPUTS" \
+## Must set MAKEINFO like this so that version.texi will be found even
+## if it is in srcdir.
+ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I
$(srcdir)' \
+ $(TEXI2DVI) --pdf --batch $<
+
+.%SUFFIX%.txt:
+## ASCII targets for those who want them
+ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+ $< --no-headers -o $@
.%SUFFIX%:
## We want to force the .info file to be built in srcdir. This is
Index: lib/am/texinfos.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/texinfos.am,v
retrieving revision 1.91
diff -u -r1.91 texinfos.am
--- texinfos.am 2001/10/02 16:00:04 1.91
+++ texinfos.am 2001/10/19 02:57:17
@@ -58,20 +58,33 @@
.PHONY: info info-am dvi dvi-am
if %?SUBDIRS%
-RECURSIVE_TARGETS += info-recursive dvi-recursive
+RECURSIVE_TARGETS += info-recursive dvi-recursive pdf-recursive ps-recursive
txt-recursive
.PHONY info: info-recursive
.PHONY dvi: dvi-recursive
+.PHONY pdf: pdf-recursive
+.PHONY ps: ps-recursive
+.PHONY txt: txt-recursive
else !%?SUBDIRS%
info: info-am
dvi: dvi-am
+pdf: pdf-am
+ps: ps-am
+txt: txt-am
endif !%?SUBDIRS%
if %?LOCAL-TEXIS%
+am_info_CLEANFILES = $(DVIS) $(PDFS) $(POSTSCRIPTS) $(TXTS)
info-am: $(INFO_DEPS)
dvi-am: $(DVIS)
+pdf-am: $(PDFS)
+ps-am: $(POSTSCRIPTS)
+txt-am: $(TXTS)
else ! %?LOCAL-TEXIS%
info-am:
dvi-am:
+pdf-am:
+ps-am:
+txt-am:
endif ! %?LOCAL-TEXIS%
Index: tests/info.test
===================================================================
RCS file: /cvs/automake/automake/tests/info.test,v
retrieving revision 1.2
diff -u -r1.2 info.test
--- info.test 1997/02/23 19:41:19 1.2
+++ info.test 2001/10/19 03:53:36
@@ -6,9 +6,6 @@
cat > Makefile.am << 'END'
info_TEXINFOS = foo.texi
-
-magic:
- @echo $(INFOS)
END
echo '@setfilename foo.info' > foo.texi
@@ -17,6 +14,50 @@
$AUTOMAKE || exit 1
for i in `grep '^INFOS =' Makefile.in | sed -e 's/^INFOS = //'`; do
+ echo $i
+ case "$i" in
+ foo*)
+ ;;
+ *)
+ exit 1
+ ;;
+ esac
+done
+
+for i in `grep '^DVIS =' Makefile.in | sed -e 's/^DVIS = //'`; do
+ echo $i
+ case "$i" in
+ foo*)
+ ;;
+ *)
+ exit 1
+ ;;
+ esac
+done
+
+for i in `grep '^PDFS =' Makefile.in | sed -e 's/^PDFS = //'`; do
+ echo $i
+ case "$i" in
+ foo*)
+ ;;
+ *)
+ exit 1
+ ;;
+ esac
+done
+
+for i in `grep '^POSTSCRIPTS =' Makefile.in | sed -e 's/^POSTSCRIPTS = //'`; do
+ echo $i
+ case "$i" in
+ foo*)
+ ;;
+ *)
+ exit 1
+ ;;
+ esac
+done
+
+for i in `grep '^TXTS =' Makefile.in | sed -e 's/^TXTS = //'`; do
echo $i
case "$i" in
foo*)