From e42869a09412f7ef3c29f043a85329a6fd3af38a Mon Sep 17 00:00:00 2001
From: Virgile Prevosto <virgile.prevosto@m4x.org>
Date: Thu, 20 Apr 2017 19:04:15 +0200
Subject: [PATCH] manuals take Frama-C's version number for an internal release

---
 src/plugins/e-acsl/doc/refman/Makefile         | 8 ++++++--
 src/plugins/e-acsl/doc/refman/eacslversion.tex | 2 +-
 src/plugins/e-acsl/doc/refman/main.tex         | 4 ++--
 src/plugins/e-acsl/doc/userman/Makefile        | 6 ++++++
 src/plugins/e-acsl/doc/userman/main.tex        | 5 +++--
 5 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/src/plugins/e-acsl/doc/refman/Makefile b/src/plugins/e-acsl/doc/refman/Makefile
index cc121c29657..2746df6846d 100644
--- a/src/plugins/e-acsl/doc/refman/Makefile
+++ b/src/plugins/e-acsl/doc/refman/Makefile
@@ -2,7 +2,11 @@
 # Inputs #
 ##########
 
+# If in internal mode, use Frama-C's VERSION
+VERSION_FILE=$(wildcard ../../../../../VERSION)
+ifeq ("$(VERSION_FILE)","")
 VERSION_FILE=../../VERSION
+endif
 EACSL_VERSION=$(shell cat $(VERSION_FILE))
 
 MAIN=main
@@ -22,8 +26,8 @@ DEPS_MODERN=macros_modern.tex eacslversion.tex biblio.bib \
 ##############
 
 .PHONY: all e-acsl default
-default: e-acsl.pdf
-e-acsl: e-acsl-implementation.pdf e-acsl.pdf main.pdf
+default: all
+e-acsl: e-acsl-implementation.pdf e-acsl.pdf
 all: e-acsl
 
 e-acsl-implementation.pdf: $(DEPS_MODERN)
diff --git a/src/plugins/e-acsl/doc/refman/eacslversion.tex b/src/plugins/e-acsl/doc/refman/eacslversion.tex
index b931906930c..a59b2e01486 100644
--- a/src/plugins/e-acsl/doc/refman/eacslversion.tex
+++ b/src/plugins/e-acsl/doc/refman/eacslversion.tex
@@ -1 +1 @@
-\newcommand{\eacslversion}{0.8+dev}
+\newcommand{\eacslversion}{Phosphorus-20170501-beta1}
diff --git a/src/plugins/e-acsl/doc/refman/main.tex b/src/plugins/e-acsl/doc/refman/main.tex
index fad5ef6f5c8..78a65233dce 100644
--- a/src/plugins/e-acsl/doc/refman/main.tex
+++ b/src/plugins/e-acsl/doc/refman/main.tex
@@ -37,8 +37,8 @@
 
 \ifthenelse{\boolean{PrintImplementationRq}}%
   {\coverpage{\vbox{\mbox{E-ACSL Version \version}\\[5mm]
-\mbox{\huge{Implementation in Frama-C plug-in E-ACSL 
-    version \eacslversion{}}}}}}%
+\mbox{\huge{Implementation in Frama-C plug-in E-ACSL}}\\[2mm]
+\mbox{\huge{version \eacslversion{}}}}}}%
   {\coverpage{\vbox{\mbox{E-ACSL}\\[2mm]\vbox{\mbox{\huge{Executable ANSI/ISO C
           Specification Language}}}\\[2mm]
         \mbox{Version \version}}}}
diff --git a/src/plugins/e-acsl/doc/userman/Makefile b/src/plugins/e-acsl/doc/userman/Makefile
index c57604ecb34..b5e7003817f 100644
--- a/src/plugins/e-acsl/doc/userman/Makefile
+++ b/src/plugins/e-acsl/doc/userman/Makefile
@@ -1,8 +1,14 @@
 MAIN=main
 
 C_CODE=$(wildcard examples/*.[ci])
+VERSION_FILE=../../../../../VERSION
+ifeq ("$(wildcard $(VERSION_FILE))", "")
 VERSION_FILE=../../VERSION
 FC_VERSION= Silicon
+else
+#internal mode
+FC_VERSION=$(shell cat $(VERSION_FILE))
+endif
 EACSL_VERSION= $(shell cat $(VERSION_FILE))
 
 DEPS_MODERN=eacslversion.tex biblio.bib macros.tex \
diff --git a/src/plugins/e-acsl/doc/userman/main.tex b/src/plugins/e-acsl/doc/userman/main.tex
index 11d07531f41..f87476d001d 100644
--- a/src/plugins/e-acsl/doc/userman/main.tex
+++ b/src/plugins/e-acsl/doc/userman/main.tex
@@ -17,8 +17,9 @@
 \includegraphics[height=14mm]{cealistlogo.jpg}
 \end{flushleft}
 \vfill
-\title{\eacsl Plug-in}{Release \eacslversion compatible
-  with \framac \fcversion}
+\title{\eacsl Plug-in}{Release \eacslversion
+ \ifthenelse{\equal{\eacslversion}{\fcversion}}{}{
+   compatible with \framac \fcversion}}
 \author{Julien Signoles and Kostyantyn Vorobyov}
 \begin{tabular}{l}
 CEA LIST, Software Safety Laboratory, Saclay, F-91191 \\
-- 
GitLab