swh:1:snp:d80eec3f654c152adbdd6e641362bcb340d39fe2
Tip revision: 803947f4ee9c45922fe71fb265ebffc1813da838 authored by betanalpha on 25 April 2016, 13:14:26 UTC
Add score function for diagnostic
Add score function for diagnostic
Tip revision: 803947f
manual
.PHONY: manual $(STAN)src/docs/stan-reference/stan-reference.tex $(STAN)src/docs/stan-reference/stan-functions.txt
STAN_MAJOR := $(shell grep "\#define STAN_MAJOR" $(STAN)src/stan/version.hpp | sed -e 's/.*STAN_MAJOR \(.*\)/\1/')
STAN_MINOR := $(shell grep "\#define STAN_MINOR" $(STAN)src/stan/version.hpp | sed -e 's/.*STAN_MINOR \(.*\)/\1/')
STAN_PATCH := $(shell grep "\#define STAN_PATCH" $(STAN)src/stan/version.hpp | sed -e 's/.*STAN_PATCH \(.*\)/\1/')
VERSION_STRING := $(STAN_MAJOR).$(STAN_MINOR).$(STAN_PATCH)
manual: $(STAN)src/docs/stan-reference/stan-reference.pdf $(STAN)src/docs/stan-reference/stan-functions.txt
@mkdir -p doc/
$(foreach artifact, $^, cp $(artifact) doc/$(basename $(notdir $(artifact)))-$(VERSION_STRING)$(suffix $(artifact));)
$(STAN)src/docs/stan-reference/stan-functions.txt: $(STAN)src/docs/stan-reference/stan-reference.pdf
@echo ' building $@'
@echo '# This file is semicolon delimited' > $@
@echo 'StanFunction; Arguments; ReturnType; Page' >> $@
@sed 's/^\\indexentry{{\\tt \\bfseries //g' $(STAN)src/docs/stan-reference/stan-reference.idx | \
sed 's/ }!{\\tt /;/g' | \
sed 's/{\\tt \\slshape //g' | \
sed 's/:.*T}\[.*\]}/;T\[\]/g' | \
sed 's/:.*em}/;/g' | \
sed 's/}|hyperpage}{/;/g' | \
sed 's/ }!sampling statement|hyperpage}{/;~;real;/g' | \
sed 's/|hyperpage/;/g' | \
sed 's/}//g' | \
sed 's/\\_/_/g' | \
sed 's/^ //g' | \
sed 's/"\(.*\)"/\1/g' | \
sed 's/"!/!/g' | \
sed 's/{\\\&\\\&/\&\&/g' | \
sed 's/{//g' | \
sed 's/\\textasciicircum/\^/g' | \
sed 's/\\textbackslash /\\/g' | \
sed 's/@.*(/;(/g' | \
sed 's/ ;/;/g' | \
sed 's/^phi/Phi/g' | \
sort >> $@
MANUAL_FLAGS=
%.pdf: %.tex
cd $(dir $@); latexmk -pdf -pdflatex="pdflatex -file-line-error" -use-make $(notdir $^)