Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

273 lines (215 sloc) 6.902 kB
# $Id$
MANPAGE_SRC = tsung.1.sgml tsplot.1.sgml tsung-recorder.1.sgml
MANPAGE = tsung.1 tsplot.1 tsung-recorder.1
TOPDIR=.
IMG_TOPDIR=.
LOGO_DIR=$(TOPDIR)/logos
FILES=$(wildcard *.tex)
# classe et styles latex
INCLUDES=shortcuts.sty TSUNG-en.cls
# chemin des fichiers de style
STYLE=$(TOPDIR)/styles
CSS=IDXDOC.css
# classe et styles hevea
HEVEA_INC=TSUNG.hva
HEVEAOPTS=-fix -I $(STYLE) -exec xxdate.exe -pedantic
LANGUAGE=
# logos
LOGOS_JPG=
LOGOS_EPS = $(LOGOS_JPG:.jpg=.eps)
##############
# remove image.tex generated by hevea
TEXFILES=$(sort $(subst image.,,$(FILES)))
DVIFILES=$(TEXFILES:.tex=.dvi)
PSFILES=$(TEXFILES:.tex=.ps)
PDFFILES=$(TEXFILES:.tex=.pdf)
HTMLFILES=$(TEXFILES:.tex=.html)
HTML_INDEXFILES=$(TEXFILES:.tex=_index.html)
# get figures to be generated from gnuplot file
PLOT_DIR = $(IMG_TOPDIR)/plot
PLOT_PS = $(shell grep -s output $(PLOT_DIR)/*.gplot | cut -f3 -d" " | perl -e '{ while (<>) {chomp; s/"//;s/"/ /; print} }')
PLOT=$(addprefix $(PLOT_DIR)/,$(PLOT_PS))
#PLOT = $(wildcard $(PLOT_DIR)/*.ps)
PLOT_PNG = $(PLOT:.ps=.png)
PLOT_PDF = $(PLOT:.ps=.pdf)
# figures
FIGURES_DIR = $(IMG_TOPDIR)/figures
FIGURES = $(wildcard $(FIGURES_DIR)/*.fig)
FIGURES_PNG = $(FIGURES:.fig=.png)
#FIGURES_JPG = $(FIGURES:.fig=.jpg)
FIGURES_EPS = $(FIGURES_PNG:.png=.eps)
# images
IMAGES_DIR = $(IMG_TOPDIR)/images
IMAGES_PNG = $(wildcard $(IMAGES_DIR)/*.png)
IMAGES_EPS = $(IMAGES_PNG:.png=.eps)
ALL_IMG = $(notdir $(FIGURES))
ALL_IMG += $(notdir $(IMAGES_PNG))
ALL_IMG += $(notdir $(PLOT))
# pour recompiler le doc latex autant de fois que necessaire :
RERUN = "(There were undefined references|Rerun to get (cross-references|the bars) right)"
RERUNBIB = "No file.*\.bbl|Citation.*undefined"
#'-nopostscript' afin de ne pas subir l'interprétation/rendu des fichiers PS inclus
XDVI=xdvi -s 0 -geometry -0+0 -margins 0cm -nopostscript
XPDF=xpdf -geometry 600x768+0+0 -z page
GV=gv
CONVERT=convert
GNUPLOT=gnuplot
PDFLATEX=pdflatex --interaction=batchmode
EPS2PDF=epstopdf
DVIPS=dvips
LATEX=latex --interaction=batchmode
BIBTEX=bibtex
FIG2DEV=fig2dev
VIEWER=gv
HEVEA=hevea
HACHA=hacha
IMAGEN=imagen
MAKEINDEX=makeindex
TIDY=tidy
XSLTPROC=xsltproc
XSL=$(HOME)/cvs/web/idealx3.org/xhtml.xsl
# On rajoute les fichiers templates de LaTeX dans le VPATH pour make
# et dans TEXINPUTS pour LaTeX
TEXINPUTS = :.:$(STYLE):$(LOGO_DIR):$(IMAGES_DIR):$(FIGURES_DIR):$(PLOT_DIR):
BSTINPUTS = :.:$(STYLE)
VPATH = $(TEXINPUTS)
# pour exporter TEXINPUTS
.EXPORT_ALL_VARIABLES:
.PHONY: clean distclean pdf dvi ps all html htmlsingle
# Stop GNU make from overzealous deletion of intermediate files
.PRECIOUS: %.dvi $(FIGURES_PNG) $(FIGURES_JPG) $(IMAGES_EPS) $(LOGOS_EPS) $(PLOT) $(PLOT_PNG) $(PLOT_PDF)
all: man
man: $(MANPAGE)
%.1: %.1.sgml
docbook2man $< >/dev/null 2>&1
psimages: $(FIGURES_EPS) $(IMAGES_EPS) $(LOGOS_EPS)
pngimages: $(FIGURES_PNG)
show:
@echo INC = $(INCLUDES)
@echo FIG = $(FIGURES_PNG)
@echo IMG= $(IMAGES_PNG)
@echo HEVEA= $(HEVEA_INC)
@echo PLOT= $(PLOT_PNG)
@echo TEX = $(TEXFILES)
@echo HTML = $(HTMLFILES)
@echo LOGOS = $(LOGOS_EPS)
@echo ALL_IMG = $(ALL_IMG)
@echo TEXINPUTS = $(TEXINPUTS)
dist: pdf html
tar zvcfh archive.tgz *.html *.pdf $(ALL_IMG) $(CSS)
dvi: $(DVIFILES)
ps: $(PSFILES)
pdf: $(PDFFILES)
html: $(HTMLFILES)
htmlsplit: $(HTML_INDEXFILES)
print: $(PSFILES)
@echo "printing $<"
a2ps $<
#glossaire:
# $(MAKEINDEX) -s tlglo.ist -o these.gls these.glo
# makeindex these
#makeindex -s tlglo.ist -o these.gls these.glo
%_index.html: %.html
@echo splitting $@ ...
@$(HACHA) $(LANGUAGE) -o $@ $<
#%.html: %.tex $(INCLUDES) $(FIGURES_PNG) $(IMAGES_PNG) $(HEVEA_INC) $(LOGOS_EPS) $(PLOT_PNG)
user_manual.html: user_manual.tex ../CHANGES $(INCLUDES) $(FIGURES_PNG) $(IMAGES_PNG) $(HEVEA_INC) $(LOGOS_EPS) $(PLOT_PNG)
@echo Generating $@...
@$(HEVEA) $(HEVEAOPTS) $(LANGUAGE) $(HEVEA_INC) $<
ifeq ($(strip $(IMAGES_PNG)),)
@echo no images
else
@echo Generating images for html...
@ln -sf $(IMAGES_DIR)/*.png .
endif
ifeq ($(strip $(FIGURES_PNG)),)
@echo no figures
else
@echo Generating figures for html...
@ln -sf $(FIGURES_DIR)/*.png .
endif
ifeq ($(strip $(PLOT_PNG)),)
@echo no plot
else
@echo Generating plot for html...
@ln -sf $(PLOT_DIR)/*.png .
endif
@echo done
%.xhtml: %.html
@echo "Generating XHTML"
@$(TIDY) -latin1 -f $*.tidy_log -c -asxml $*.html > $*.xhtml ; true
%.xml: %.xhtml $(XSL)
@echo Generating $@...
@$(XSLTPROC) -o $*.xml $(XSL) $*.xhtml
@perl -i -pe 's@idxwebml-xhtml.dtd">@../../idxwebml.dtd" [<!ENTITY leftbar SYSTEM "menu.xml">]>@g' $*.xml
@echo "done"
## remove builtin GNU-make implicit rule for dvi
%.dvi : %.tex
gv: ps
@$(GV) $(FILE) &
xpdf: pdf
@$(XPDF) $(FILE).pdf &
%.dvi: %.tex Makefile $(INCLUDES) $(LOGOS_EPS) $(FIGURES_EPS) $(IMAGES_EPS) $(PLOT)
@echo Generating $@...
@echo
@$(LATEX) $<
@egrep -c $(RERUNBIB) $*.log && ($(BIBTEX) $*;$(LATEX) $<) ; true
@egrep $(RERUN) $*.log && $(LATEX) $< ; true
@egrep $(RERUN) $*.log && $(LATEX) $< ; true
# Display relevant warnings
@egrep -i "(Reference|Citation).*undefined" $*.log ; true
%.ps: %.dvi
@echo Generating $@...
@dvips -q -t a4 -o $@ $<
@echo done.
%.pdf: %.tex ../CHANGES $(INCLUDES) $(LOGOS_JPG) $(FIGURES_PNG) $(IMAGES_PNG) $(PLOT_PDF)
@echo Generating $@...
@echo
@$(PDFLATEX) $<
@egrep -c $(RERUNBIB) $*.log && ($(BIBTEX) $*;$(LATEX) $<) ; true
@egrep $(RERUN) $*.log && $(PDFLATEX) $< ; true
@egrep $(RERUN) $*.log && $(PDFLATEX) $< ; true
# Display relevant warnings
@egrep -i "(Reference|Citation).*undefined" $*.log ; true
%.eps: %.jpg
@echo convert $< $@
@$(CONVERT) $< $@
%.eps: %.png
@echo convert $< $@
@$(CONVERT) $< $@
clean:
@echo -n Cleaning intermediate files...
@rm -f *.{aux,log,toc,bak,haux,lof,out,htoc,ps,links,refs,1} $(LOGOS_EPS)
@echo " done."
$(PLOT_DIR)/%.ps: $(PLOT_DIR)/*.gplot
@echo \* Producing ps files $< with data with gnuplot
@cd $(PLOT_DIR); $(GNUPLOT) *.gplot ; cd -
$(PLOT_DIR)/%.png: $(PLOT_DIR)/%.ps
@echo Generating $@
@$(CONVERT) $< $@
$(PLOT_DIR)/%.pdf: $(PLOT_DIR)/%.ps
@echo Generating $@
@$(EPS2PDF) $<
$(FIGURES_DIR)/%.png: $(FIGURES_DIR)/%.fig
@echo Generating $@
@$(FIG2DEV) -L png $< $@
$(FIGURES_DIR)/%.jpg: $(FIGURES_DIR)/%.fig
@echo Generating $@
@$(FIG2DEV) -L jpeg $< $@
$(FIGURES_DIR)/%.eps: $(FIGURES_DIR)/%.fig
@echo Generating $@
@$(FIG2DEV) -L eps $< $@
$(IMAGES_DIR)/%.jpg: $(IMAGES_DIR)/%.png
@echo Generating $@
@$(CONVERT) $< $@
$(IMAGES_DIR)/%.eps: $(IMAGES_DIR)/%.png
@echo Generating $@
@$(CONVERT) $< $@
$(LOGO_DIR)/%.eps: $(IMAGES_DIR)/%.jpg
@echo Generating $@
@$(CONVERT) $< $@
mrproper: distclean
distclean: clean
@echo -n Cleaning result files...
@rm -f $(DVIFILES) $(PSFILES) $(PDFFILES) $(LOGOS_EPS) $(FIGURES_EPS) $(FIGURES_PNG) *.html *motif.gif $(IMAGES_DIR)/*.eps *.png *.image.tex $(PLOT_PNG) $(PLOT_PDF) $(PLOT) *.bbl *.blg''
@echo " done."
Jump to Line
Something went wrong with that request. Please try again.