Skip to content
Snippets Groups Projects
Makefile 2.52 KiB
Newer Older
Julien Signoles's avatar
Julien Signoles committed
VERSION_FILE=../../VERSION

MAIN=main
DEPS_MODERN=macros_modern.tex eacslversion.tex biblio.bib \
	intro_modern.tex speclang_modern.tex \
	libraries_modern.tex concl_modern.tex changes_modern.tex \
	term_modern.bnf binders_modern.bnf predicate_modern.bnf \
	fn_behavior_modern.bnf oldandresult_modern.bnf \
	loc_modern.bnf memory_modern.bnf list-gram.bnf \
	assertions_modern.bnf loops_modern.bnf st_contracts_modern.bnf \
	logic_modern.bnf data_invariants_modern.bnf model_modern.bnf \
	ghost_modern.bnf generalinvariants_modern.bnf iterator_modern.bnf \
	bsearch.c bsearch2.c link.c

.PHONY: all e-acsl default

default: e-acsl.pdf

e-acsl: e-acsl-implementation.pdf e-acsl.pdf main.pdf

all: e-acsl

LANGUAGE_VERSION=1.9
Julien Signoles's avatar
Julien Signoles committed
EACSL_VERSION=$(shell cat $(VERSION_FILE))
DISTRIB_DIR=$(HOME)/frama-c/doc/www/distrib
install: e-acsl-implementation.pdf e-acsl.pdf
	cp -f $^ $(EACSL_DIR)/doc/manuals
	# cp -f e-acsl.pdf \
	#   $(DISTRIB_DIR)/download/e-acsl/e-acsl-$(LANGUAGE_VERSION).pdf
	# cp -f e-acsl-implementation.pdf \
	#   $(DISTRIB_DIR)/download/e-acsl/e-acsl-implementation-$(EACSL_VERSION).pdf
include $(EACSL_DIR)/doc/support/MakeLaTeXModern
Julien Signoles's avatar
Julien Signoles committed
eacslversion.tex: Makefile $(VERSION_FILE)
	rm -f $@
	echo '\\newcommand{\\eacslversion}{$(EACSL_VERSION)}' > $@
	chmod a-w $@

%.1: %.mp
	mpost -interaction=batchmode $<

%.mps: %.1
	mv $< $@

%.pp: %.tex pp
	./pp -utf8 $< > $@

%.pp: %.c pp
	./pp -utf8 -c $< > $@

%.tex: %.ctex pp
	rm -f $@
	./pp $< > $@
	chmod a-w $@

%.bnf: %.tex transf
	rm -f $@
	./transf $< > $@
	chmod a-w $@

%_modern.bnf: %.tex transf
	rm -f $@
	./transf -modern $< > $@
	chmod a-w $@

%.ml: %.mll
	ocamllex $<

%.pdf: %.tex
	pdflatex $*
	makeindex $*
	bibtex $*
	pdflatex $*
	pdflatex $*

%.cmo: %.ml
	ocamlc -c $<

pp: pp.ml
	ocamlopt -o $@ str.cmxa $^

transf: transf.cmo transfmain.cmo
	ocamlc -o $@ $^

transfmain.cmo: transf.cmo

.PHONY: clean

clean:
	rm -rf *~ *.aux *.log *.nav *.out *.snm *.toc *.lof *.pp *.bnf \
		*.haux  *.hbbl *.htoc \
                *.cb *.cm? *.bbl *.blg *.idx *.ind *.ilg \
		transf trans.ml pp.ml pp

# version WEB lie  ce qui est implement
e-acsl-implementation.pdf: $(DEPS_MODERN)

e-acsl-implementation.tex: $(MAIN).tex Makefile
	rm -f $@
	sed -e '/PrintRemarks/s/%--//' $^ > $@
	chmod a-w $@

# version WEB du langage E-ACSL
e-acsl.pdf: $(DEPS_MODERN)

e-acsl.tex: e-acsl-implementation.tex Makefile
	rm -f $@
	sed -e '/PrintImplementationRq/s/%--//' \
	    -e '/ColorImplementationRq/s/%--//' \
	    $^ > $@
	chmod a-w $@

# version pour le goupe de travail E-ACSL
$(MAIN).pdf: $(DEPS_MODERN)