# HG changeset patch # User Rik # Date 1259626624 28800 # Node ID 609726a258772fd32fe6e3c92843e75442dd2d43 # Parent ac69e6f4b33d43e3779259969db5aed2af15eb4a Correctly generate *.texi doc files when running in a newly cloned source tree Also, stop distributing .texi files since they are derived files rather than primary sources. diff -r ac69e6f4b33d -r 609726a25877 doc/ChangeLog --- a/doc/ChangeLog Tue Dec 01 00:49:07 2009 +0100 +++ b/doc/ChangeLog Mon Nov 30 16:17:04 2009 -0800 @@ -1,3 +1,9 @@ +2009-11-30 Rik + + * interpreter/Makefile.am: + Overhaul Makefile to correctly generate *.texi files and to stop their + distribution when running 'make dist' + 2009-11-30 John W. Eaton * interpreter/munge-texi.cc (process_texi_input_file): Double @ in diff -r ac69e6f4b33d -r 609726a25877 doc/interpreter/Makefile.am --- a/doc/interpreter/Makefile.am Tue Dec 01 00:49:07 2009 +0100 +++ b/doc/interpreter/Makefile.am Mon Nov 30 16:17:04 2009 -0800 @@ -42,7 +42,6 @@ ## The following example files are listed for dependencies. ## They should not be distributed from this directory. - EXAMPLE_FILES = \ $(top_srcdir)/examples/@polynomial/display.m \ $(top_srcdir)/examples/@polynomial/double.m \ @@ -83,79 +82,80 @@ IMAGES = $(IMAGES_EPS) $(IMAGES_PDF) $(IMAGES_PNG) $(IMAGES_TXT) -MUNGED_TEXI_SRC = \ - arith.texi \ - audio.texi \ - basics.texi \ - bugs.texi \ - container.texi \ - contrib.texi \ - cp-idx.texi \ - data.texi \ - debug.texi \ - diffeq.texi \ - diagperm.texi \ - dynamic.texi \ - emacs.texi \ - errors.texi \ - eval.texi \ - expr.texi \ - fn-idx.texi \ - func.texi \ - geometry.texi \ - gpl.texi \ - grammar.texi \ - image.texi \ - install.texi \ - interp.texi \ - intro.texi \ - io.texi \ - linalg.texi \ - matrix.texi \ - nonlin.texi \ - numbers.texi \ - oop.texi \ - op-idx.texi \ - optim.texi \ - package.texi \ - plot.texi \ - poly.texi \ - preface.texi \ - quad.texi \ - set.texi \ - signal.texi \ - sparse.texi \ - stats.texi \ - stmt.texi \ - strings.texi \ - system.texi \ - testfun.texi \ - tips.texi \ - var.texi +TXI_SRC = \ + arith.txi \ + audio.txi \ + basics.txi \ + bugs.txi \ + container.txi \ + contrib.txi \ + cp-idx.txi \ + data.txi \ + debug.txi \ + diffeq.txi \ + diagperm.txi \ + dynamic.txi \ + emacs.txi \ + errors.txi \ + eval.txi \ + expr.txi \ + fn-idx.txi \ + func.txi \ + geometry.txi \ + gpl.txi \ + grammar.txi \ + image.txi \ + install.txi \ + interp.txi \ + intro.txi \ + io.txi \ + linalg.txi \ + matrix.txi \ + nonlin.txi \ + numbers.txi \ + oop.txi \ + op-idx.txi \ + optim.txi \ + package.txi \ + plot.txi \ + poly.txi \ + preface.txi \ + quad.txi \ + set.txi \ + signal.txi \ + sparse.txi \ + stats.txi \ + stmt.txi \ + strings.txi \ + system.txi \ + testfun.txi \ + tips.txi \ + var.txi + +MUNGED_TEXI_SRC = $(TXI_SRC:.txi=.texi) info_TEXINFOS = octave.texi -nodist_octave_TEXINFOS = ../conf.texi contributors.texi $(MUNGED_TEXI_SRC) + +nodist_octave_TEXINFOS = \ + ../conf.texi -all_octave_TEXINFOS = \ - $(info_TEXINFOS) \ - $(nodist_octave_TEXINFOS) - -TXI_SRC = $(MUNGED_TEXI_SRC:.texi=.txi) - -DISTCLEANFILES = $(MUNGED_TEXI_SRC) +octave_TEXINFOS = \ + contributors.texi \ + $(MUNGED_TEXI_SRC) ../conf.texi: $(MAKE) -C .. conf.texi -$(srcdir)/octave.info: $(all_octave_TEXINFOS) $(IMAGES_TXT) $(EXAMPLE_FILES) +octave.info octave.dvi octave.pdf octave.html: $(nodist_octave_TEXINFOS) $(octave_TEXINFOS) $(EXAMPLE_FILES) -octave.dvi: $(all_octave_TEXINFOS) $(IMAGES_EPS) $(EXAMPLE_FILES) +octave.info: $(IMAGES_TXT) -octave.ps: octave.dvi $(IMAGES_EPS) +octave.dvi octave.ps: $(IMAGES_EPS) -octave.pdf: $(all_octave_TEXINFOS) $(IMAGES_PDF) $(EXAMPLE_FILES) +octave.pdf: $(IMAGES_PDF) -octave.html: $(all_octave_TEXINFOS) $(IMAGES_PNG) $(EXAMPLE_FILES) +octave.html: $(IMAGES_PNG) + all-local: dvi html pdf ps doc-cache @@ -167,30 +167,6 @@ uninstall-local: rm -f $(DESTDIR)$(octetcdir)/doc-cache -EXTRA_DIST = \ - config-images.sh \ - contributors.in \ - images \ - images.mk \ - mk_doc_cache.m \ - mkcontrib.awk \ - munge-texi.cc \ - octave.dvi \ - octave.html \ - octave.pdf \ - octave.ps \ - $(IMAGES) \ - $(IMAGES_SRC) \ - $(TXI_SRC) - -MAN_SRC = mkoctfile.1 octave.1 octave-bug.1 octave-config.1 - -# FIXME -- need to include generated figures here... -#DISTFILES = $(addprefix $(srcdir)/, Makefile.in contributors.in \ -# mkcontrib.awk dir munge-texi.cc $(MAN_SRC) $(SOURCES) $(MAIN_TEXINFO)) \ -# $(SUB_TEXINFO) contributors.texi $(FORMATTED) $(IMAGES) mk_doc_cache.m \ -# doc-cache stmp-html - DOCSTRING_FILES = $(TOPDIR)/src/DOCSTRINGS $(TOPDIR)/scripts/DOCSTRINGS $(TOPDIR)/src/DOCSTRINGS: @@ -207,14 +183,14 @@ munge-texi$(BUILD_EXEEXT): munge-texi.cc $(BUILD_CXX) $(BUILD_CXXFLAGS) -o $@ $^ $(BUILD_LDFLAGS) +.txi.texi: + ./munge-texi $(DOCSTRING_FILES) < $< > $@-t + mv $@-t $@ + contributors.texi: contributors.in $(AWK) -f $(srcdir)/mkcontrib.awk $(srcdir)/contributors.in > $@-t mv $@-t $@ -.txi.texi: - ./munge-texi $(DOCSTRING_FILES) < $< > $@-t - mv $@-t $@ - ../../INSTALL.OCTAVE: install.texi rm -f INSTALL -$(MAKEINFO) -D INSTALLONLY \ @@ -229,4 +205,31 @@ -I.. -I$(srcdir) -I$(srcdir)/.. $< mv BUGS ../../BUGS +EXTRA_DIST = \ + config-images.sh \ + contributors.in \ + images \ + images.mk \ + mk_doc_cache.m \ + mkcontrib.awk \ + munge-texi.cc \ + $(IMAGES) \ + $(IMAGES_SRC) \ + $(TXI_SRC) + +DISTCLEANFILES = $(octave_TEXINFOS) doc-cache munge-texi$(BUILD_EXEEXT) + +MAINTAINERCLEANFILES = $(IMAGES) + +## .texi files are generated files, not primary sources, and should not +## be distributed. Automake, however, does not create rules to generate +## pdf and html documentation unless the info and texi files will be +## distributed. Various hacks, including using the nodist_ prefix and +## DISTCLEANFILES, do not work. The current solution is to build the texi +## files and create the correct Makefile rules and then use the dist-hook +## feature to remove the .texi files from the distribution just before it +## is archived in a tar file. +dist-hook: + ( cd $(distdir) ; rm -f $(octave_TEXINFOS) ; ) + .NOTPARALLEL: