Mercurial > hg > octave-nkf
view doc/interpreter/Makefile.in @ 7257:e8a3e3e33490
[project @ 2007-12-05 01:18:41 by jwe]
author | jwe |
---|---|
date | Wed, 05 Dec 2007 01:18:42 +0000 |
parents | 3aa50748a300 |
children | 25d42213953f |
line wrap: on
line source
# Makefile for octave's doc/interpreter directory # # Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, # 2002, 2003, 2005, 2006, 2007 John W. Eaton # # This file is part of Octave. # # Octave is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 3 of the License, or (at # your option) any later version. # # Octave is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU General Public License # along with Octave; see the file COPYING. If not, see # <http://www.gnu.org/licenses/>. TOPDIR = ../.. srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ include $(TOPDIR)/Makeconf INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ SCRIPT_SOURCES = sparseimages.m interpimages.m geometryimages.m plotimages.m EXAMPLE_FILES_NODIR = \ addtwomatrices.cc \ celldemo.cc \ firstmexdemo.c \ fortdemo.cc \ fortsub.f \ funcdemo.cc \ globaldemo.cc \ helloworld.cc \ mycell.c \ myfeval.c \ myfunc.c \ mypow2.c \ mysparse.c \ mystring.c \ mystruct.c \ paramdemo.cc \ stringdemo.cc \ structdemo.cc \ unwinddemo.cc EXAMPLE_FILES = $(addprefix $(top_srcdir)/examples/, $(EXAMPLE_FILES_NODIR)) GEOMETRYIMAGES = voronoi triplot griddata convhull delaunay inpolygon GEOMETRYIMAGES_EPS = $(addsuffix .eps, $(GEOMETRYIMAGES)) GEOMETRYIMAGES_PDF = $(addsuffix .pdf, $(GEOMETRYIMAGES)) GEOMETRYIMAGES_PNG = $(addsuffix .png, $(GEOMETRYIMAGES)) GEOMETRYIMAGES_TXT = $(addsuffix .txt, $(GEOMETRYIMAGES)) PLOTIMAGES = plot hist errorbar polar mesh plot3 extended PLOTIMAGES_EPS = $(addsuffix .eps, $(PLOTIMAGES)) PLOTIMAGES_PDF = $(addsuffix .pdf, $(PLOTIMAGES)) PLOTIMAGES_PNG = $(addsuffix .png, $(PLOTIMAGES)) PLOTIMAGES_TXT = $(addsuffix .txt, $(PLOTIMAGES)) INTERPIMAGES = interpft interpn interpderiv1 interpderiv2 INTERPIMAGES_EPS = $(addsuffix .eps, $(INTERPIMAGES)) INTERPIMAGES_PDF = $(addsuffix .pdf, $(INTERPIMAGES)) INTERPIMAGES_PNG = $(addsuffix .png, $(INTERPIMAGES)) INTERPIMAGES_TXT = $(addsuffix .txt, $(INTERPIMAGES)) SPARSEIMAGES_1 = gplot grid spmatrix spchol spcholperm SPARSEIMAGES_EPS = $(addsuffix .eps, $(SPARSEIMAGES_1)) SPARSEIMAGES_PDF = $(addsuffix .pdf, $(SPARSEIMAGES_1)) SPARSEIMAGES_PNG = $(addsuffix .png, $(SPARSEIMAGES_1)) SPARSEIMAGES_TXT = $(addsuffix .txt, $(SPARSEIMAGES_1)) IMAGES_EPS = $(SPARSEIMAGES_EPS) $(INTERPIMAGES_EPS) \ $(GEOMETRYIMAGES_EPS) $(PLOTIMAGES_EPS) IMAGES_PDF = $(SPARSEIMAGES_PDF) $(INTERPIMAGES_PDF) \ $(GEOMETRYIMAGES_PDF) $(PLOTIMAGES_PDF) IMAGES_PNG = $(SPARSEIMAGES_PNG) $(INTERPIMAGES_PNG) \ $(GEOMETRYIMAGES_PNG) $(PLOTIMAGES_PNG) IMAGES_TXT = $(SPARSEIMAGES_TXT) $(INTERPIMAGES_TXT) \ $(GEOMETRYIMAGES_TXT) $(PLOTIMAGES_TXT) HTML_IMAGES_PNG = $(addprefix HTML/, $(IMAGES_PNG)) IMAGES = $(IMAGES_EPS) $(IMAGES_PDF) $(IMAGES_PNG) $(IMAGES_TXT) SUB_SOURCE := arith.txi audio.txi basics.txi bugs.txi \ container.txi control.txi cp-idx.txi data.txi \ debug.txi diffeq.txi dynamic.txi emacs.txi errors.txi eval.txi \ expr.txi finance.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 \ op-idx.txi optim.txi package.txi plot.txi poly.txi preface.txi \ quad.txi quaternion.txi set.txi signal.txi sparse.txi stats.txi \ stmt.txi strings.txi system.txi testfun.txi tips.txi var.txi \ vr-idx.txi SOURCES := $(SUB_SOURCE) $(SCRIPT_SOURCES) MAIN_TEXINFO := $(srcdir)/octave.texi SUB_TEXINFO := $(SUB_SOURCE:.txi=.texi) # Don't list ../conf.texi here. TEXINFO_SOURCE := $(MAIN_TEXINFO) $(SUB_TEXINFO) contributors.texi TEXINFO := $(TEXINFO_SOURCE) ../conf.texi # Do not use --output option argument, because this is not supported # by MiKTeX (compilation under Windows/MSVC assumes the use of MiKTeX # to build the doc). Instead, copy the source .texi using the # targeted file name (e.g. to generate octave-a4.pdf, copy to # octave-a4.texi) and call texi2[dvi|pdf] on it. TEXI2DVICOMMAND = TEXINPUTS="..$(sepchar)$(srcdir)$(sepchar)$(srcdir)/..$(sepchar)$(TEXINPUTS)$(sepchar)" \ $(TEXI2DVI) TEXI2PDFCOMMAND = TEXINPUTS="..$(sepchar)$(srcdir)$(sepchar)$(srcdir)/..$(sepchar)$(TEXINPUTS)$(sepchar)" \ $(TEXI2PDF) FORMATTED = octave.info octave.pdf octave-a4.pdf octave.info-[0-9]* MAN_BASE := mkoctfile octave octave-bug octave-config MAN_SRC := $(addsuffix .1, $(MAN_BASE)) # 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) DISTDIRS = HTML DISTSUBDIRS := SUBDIRS := # Look for version.h to get version information. xfiles := $(TOPDIR)/src/version.h $(srcdir)/$(TOPDIR)/src/version.h version_file := $(firstword $(foreach file, $(xfiles), $(wildcard $(file)))) SPELL = $(patsubst %.texi, %.spell, $(TEXINFO)) %.spell : %.texi rm -f $@ $(SED) -e 's/@@/ at /g' -e 's/@[a-zA-Z]*//g' $< | spell > $@.tmp mv $@.tmp $@ all: octave.info octave.pdf octave-a4.pdf HTML/index.html .PHONY: all $(TEXINFO): src-DOCSTRINGS scripts-DOCSTRINGS munge-texi$(BUILD_EXEEXT) munge-texi$(BUILD_EXEEXT): munge-texi.cc $(BUILD_CXX) $(BUILD_CXXFLAGS) -o $@ $^ $(BUILD_LDFLAGS) src-DOCSTRINGS: $(MAKE) -C ../../src DOCSTRINGS .PHONY: src-DOCSTRINGS scripts-DOCSTRINGS: $(MAKE) -C ../../scripts DOCSTRINGS .PHONY: scripts-DOCSTRINGS contributors.texi: contributors.in $(AWK) -f $(srcdir)/mkcontrib.awk $(srcdir)/contributors.in > $@-t @$(simple-move-if-change-rule) octave-a4.texi: $(MAIN_TEXINFO) cp $< $@ octave-smallbook.texi: $(MAIN_TEXINFO) cp $< $@ $(SUB_TEXINFO) : %.texi : %.txi @echo making $@ from $< @./munge-texi \ -d $(TOPDIR)/src/DOCSTRINGS \ -d $(TOPDIR)/scripts/DOCSTRINGS < $< > $@-t @$(simple-move-if-change-rule) octave.info: $(IMAGES_TXT) $(TEXINFO) $(EXAMPLE_FILES) -$(MAKEINFO) -I.. -I$(srcdir) -I$(srcdir)/.. $(MAIN_TEXINFO) octave.dvi: $(IMAGES_EPS) $(TEXINFO) $(EXAMPLE_FILES) -TEXINPUTS="..$(sepchar)$(srcdir)$(sepchar)$(srcdir)/..$(sepchar)$(TEXINPUTS)$(sepchar)" \ $(TEXI2DVI) $(MAIN_TEXINFO) octave-a4.dvi: $(IMAGES_EPS) $(TEXINFO) $(EXAMPLE_FILES) octave-a4.texi -$(TEXI2DVICOMMAND) octave-a4.texi -t @afourpaper octave-smallbook.dvi: $(IMAGES_EPS) $(TEXINFO) $(EXAMPLE_FILES) octave-smallbook.texi -$(TEXI2DVICOMMAND) octave-smallbook.texi -t @smallbook octave.ps: octave.dvi -dvips -o $@ $< octave-a4.ps: octave-a4.dvi -dvips -o $@ $< octave-smallbook.ps: octave-smallbook.dvi -dvips -o $@ $< octave.pdf: $(IMAGES_PDF) $(TEXINFO) $(EXAMPLE_FILES) -$(TEXI2PDFCOMMAND) $(MAIN_TEXINFO) octave-a4.pdf: $(IMAGES_PDF) $(TEXINFO) $(EXAMPLE_FILES) octave-a4.texi -$(TEXI2PDFCOMMAND) octave-a4.texi -t @afourpaper octave-smallbook.pdf: $(IMAGES_PDF) $(TEXINFO) $(EXAMPLE_FILES) octave-smallbook.texi -$(TEXI2PDFCOMMAND) octave-smallbook.texi -t @smallbook ../../INSTALL.OCTAVE: install.texi rm -f INSTALL -$(MAKEINFO) -D INSTALLONLY \ --no-validate --no-headers --no-split --output INSTALL \ -I.. -I$(srcdir) -I$(srcdir)/.. $< mv INSTALL ../../INSTALL.OCTAVE ../../BUGS: bugs.texi rm -f BUGS -$(MAKEINFO) -D BUGSONLY \ --no-validate --no-headers --no-split --output BUGS \ -I.. -I$(srcdir) -I$(srcdir)/.. $< mv BUGS ../../BUGS HTML/index.html: $(HTML_IMAGES_PNG) $(TEXINFO) $(EXAMPLE_FILES) -$(MAKEINFO) --html --ifinfo --output=HTML -I.. -I$(srcdir) -I$(srcdir)/.. $(MAIN_TEXINFO) $(HTML_IMAGES_PNG): HTML/%.png : %.png @if [ -d HTML ]; then \ true; \ else \ echo "creating HTML directory"; \ mkdir HTML; \ fi cp $(filter-out html-dir, $<) HTML define run-octave $(TOPDIR)/run-octave -f -q -H -p $(srcdir) \ --eval "$(notdir $(basename $<)) ('$(notdir $(basename $@))', '$(patsubst .%,%, $(suffix $@))');" endef $(GEOMETRYIMAGES_EPS) $(GEOMETRYIMAGES_PNG) $(GEOMETRYIMAGES_TXT): geometryimages.m $(run-octave) $(PLOTIMAGES_EPS) $(PLOTIMAGES_PNG) $(PLOTIMAGES_TXT): plotimages.m $(run-octave) $(INTERPIMAGES_EPS) $(INTERPIMAGES_PNG) $(INTERPIMAGES_TXT): interpimages.m $(run-octave) $(SPARSEIMAGES_EPS) $(SPARSEIMAGES_PNG) $(SPARSEIMAGES_TXT): sparseimages.m $(run-octave) $(IMAGES_PDF) : %.pdf : %.eps if [ -f $< ] ; then $(GHOSTSCRIPT) -dBATCH -dEPSCrop -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=$@ $< ; fi check: all .PHONY: check install install-strip: all @$(subdir-for-command) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(man1dir) $(DESTDIR)$(infodir) @if test -d $(DESTDIR)$(man1dir); then \ for f in $(MAN_BASE); do \ rm -f $(DESTDIR)$(man1dir)/$$f$(man1ext); \ echo "installing $(srcdir)/$$f.1 in $(DESTDIR)$(man1dir)"; \ $(INSTALL_DATA) $(srcdir)/$$f.1 $(DESTDIR)$(man1dir)/$$f$(man1ext); \ done ; \ fi @if test -d $(DESTDIR)$(infodir); then \ rm -f $(DESTDIR)$(infodir)/octave.info*; \ echo "installing info files in $(DESTDIR)$(infodir)"; \ if test -f octave.info; then \ for f in octave.info*; do \ $(INSTALL_DATA) $$f $(DESTDIR)$(infodir)/$$f; \ done; \ else \ for f in $(srcdir)/octave.info*; do \ $(INSTALL_DATA) $$f $(DESTDIR)$(infodir)/`basename $$f`; \ done; \ fi; \ if test -f $(DESTDIR)$(infodir)/dir; then \ if grep "^\* Octave: (octave)." $(DESTDIR)$(infodir)/dir > /dev/null; then \ true; \ else \ echo ""; \ echo "You should add the following entry"; \ echo ""; \ echo "* Octave: (octave)."; \ echo " Interactive language for numerical computations."; \ echo ""; \ echo "to $(DESTDIR)$(infodir)/dir."; \ echo ""; \ fi; \ else \ echo "installing $(srcdir)/dir in $(DESTDIR)$(infodir)"; \ $(INSTALL_DATA) $(srcdir)/dir $(DESTDIR)$(infodir)/dir; \ fi; \ fi .PHONY: install install-strip uninstall: @$(subdir-for-command) rm -f $(infodir)/octave.info* for f in $(MAN_BASE); do rm -f $(DESTDIR)$(man1dir)/$$f$(man1ext); done .PHONY: uninstall tags: $(SOURCES) ctags $(SOURCES) TAGS: $(SOURCES) etags $(SOURCES) spell: $(SPELL) .PHONY: spell mostlyclean clean: @$(subdir-for-command) rm -f octave.cp octave.fn octave.in \ octave.ky octave.op octave.pg octave.rd octave.tp octave.vr \ octave.cps octave.fns octave.ins octave.kys octave.ops \ octave.pgs octave.rds octave.tps octave.vrs octave.aux \ octave.log octave.toc \ munge-texi$(BUILD_EXEEXT) munge-texi.o \ octave-a4.cp octave-a4.fn octave-a4.in \ octave-a4.ky octave-a4.op octave-a4.pg octave-a4.rd octave-a4.tp octave-a4.vr \ octave-a4.cps octave-a4.fns octave-a4.ins octave-a4.kys octave-a4.ops \ octave-a4.pgs octave-a4.rds octave-a4.tps octave-a4.vrs octave-a4.aux \ octave-a4.log octave-a4.toc \ octave-smallbook.cp octave-smallbook.fn octave-smallbook.in \ octave-smallbook.ky octave-smallbook.op octave-smallbook.pg octave-smallbook.rd octave-smallbook.tp octave-smallbook.vr \ octave-smallbook.cps octave-smallbook.fns octave-smallbook.ins octave-smallbook.kys octave-smallbook.ops \ octave-smallbook.pgs octave-smallbook.rds octave-smallbook.tps octave-smallbook.vrs octave-smallbook.aux \ octave-smallbook.log octave-smallbook.toc .PHONY: mostlyclean clean distclean: clean @$(subdir-for-command) rm -f Makefile .PHONY: distclean maintainer-clean: clean clean-texi rm -f Makefile tags TAGS $(FORMATTED) $(IMAGES) rm -rf HTML .PHONY: maintainer-clean clean-texi: rm -f $(SUB_TEXINFO) contributors.texi octave-a4.texi octave-smallbook.texi .PHONY: clean-texi dist: clean-texi all ln $(DISTFILES) ../../`cat ../../.fname`/doc/interpreter for dir in $(DISTDIRS); do \ mkdir ../../`cat ../../.fname`/doc/interpreter/$$dir; \ ln ../../doc/interpreter/$$dir/* ../../`cat ../../.fname`/doc/interpreter/$$dir; \ done for dir in $(DISTSUBDIRS); do mkdir ../../`cat ../../.fname`/doc/interpreter/$$dir; $(MAKE) -C $$dir $@; done .PHONY: dist