Skip to content
Snippets Groups Projects
Commit 0d5315d6 authored by Andre Maroneze's avatar Andre Maroneze
Browse files

[Release] fixes to script for generating manuals

parent 6d3f12f5
No related branches found
No related tags found
No related merge requests found
...@@ -28,7 +28,13 @@ mkdir -p manuals ...@@ -28,7 +28,13 @@ mkdir -p manuals
FC_SUFFIX=$(cat ../VERSION)-$(cat ../VERSION_CODENAME) FC_SUFFIX=$(cat ../VERSION)-$(cat ../VERSION_CODENAME)
ACSL_SUFFIX=$(grep acslversion acsl/version.tex | sed 's/.*{\([^{}].*\)}.*/\1/') ACSL_SUFFIX=$(grep acslversion acsl/version.tex | sed 's/.*{\([^{}\\]*\).*/\1/')
EACSL_SUFFIX=$(grep 'newcommand{\\eacsllangversion' ../src/plugins/e-acsl/doc/refman/main.tex | sed 's/.*{\([^{}\\]*\).*/\1/')
# sanity check
if [ "$EACSL_SUFFIX" = "" ]; then
echo "error: could not retrive E-ACSL version from ../src/plugins/e-acsl/doc/refman/main.tex"
exit 1
fi
build () { build () {
...@@ -36,7 +42,8 @@ build () { ...@@ -36,7 +42,8 @@ build () {
make -C $(dirname $1) $(basename $1) || \ make -C $(dirname $1) $(basename $1) || \
(echo "######### $1 failed" ; exit 1) (echo "######### $1 failed" ; exit 1)
echo "##### $1 done" echo "##### $1 done"
MANUAL=$(basename $2 .pdf)-$3.pdf # extract extension, add suffix, re-append extension
MANUAL=${2%.*}-$3.${2##*.}
cp -f $1 manuals/$MANUAL cp -f $1 manuals/$MANUAL
echo "##### $MANUAL copied" echo "##### $MANUAL copied"
ln -srf manuals/$MANUAL manuals/$2 ln -srf manuals/$MANUAL manuals/$2
...@@ -45,16 +52,29 @@ build () { ...@@ -45,16 +52,29 @@ build () {
EACSL_DOC=../src/plugins/e-acsl/doc EACSL_DOC=../src/plugins/e-acsl/doc
export -f build export -f build
SHELL=(type -p bash) parallel -j 4 --csv build {1} {2} {3} ::: \
# Note: The makefiles of ACSL/E-ACSL are not parallelizable when producing both
# acsl.pdf and acsl-implementation.pdf (race conditions in intermediary files,
# leading to non-deterministic errors).
# Therefore, we perform a second call to parellel for these files.
SHELL=(type -p bash) parallel --halt soon,fail=1 --csv build {1} {2} {3} ::: \
userman/userman.pdf,user-manual.pdf,$FC_SUFFIX \ userman/userman.pdf,user-manual.pdf,$FC_SUFFIX \
developer/developer.pdf,plugin-development-guide.pdf,$FC_SUFFIX \ developer/developer.pdf,plugin-development-guide.pdf,$FC_SUFFIX \
rte/main.pdf,rte-manual.pdf,$FC_SUFFIX \ rte/main.pdf,rte-manual.pdf,$FC_SUFFIX \
aorai/main.pdf,aorai-manual.pdf,$FC_SUFFIX \ aorai/main.pdf,aorai-manual.pdf,$FC_SUFFIX \
aorai/aorai-example.tgz,aorai-example.tgz,$FC_SUFFIX \
value/main.pdf,eva-manual.pdf,$FC_SUFFIX \ value/main.pdf,eva-manual.pdf,$FC_SUFFIX \
metrics/metrics.pdf,metrics-manual.pdf,$FC_SUFFIX \ metrics/metrics.pdf,metrics-manual.pdf,$FC_SUFFIX \
../src/plugins/wp/doc/manual/wp.pdf,wp-manual.pdf,$FC_SUFFIX \ ../src/plugins/wp/doc/manual/wp.pdf,wp-manual.pdf,$FC_SUFFIX \
acsl/acsl-implementation.pdf,acsl-implementation.pdf,$FC_SUFFIX \ acsl/acsl-implementation.pdf,acsl-implementation.pdf,$FC_SUFFIX \
$EACSL_DOC/refman/e-acsl-implementation.pdf,e-acsl-implementation.pdf,$FC_SUFFIX \ $EACSL_DOC/refman/e-acsl-implementation.pdf,e-acsl-implementation.pdf,$FC_SUFFIX \
$EACSL_DOC/userman/main.pdf,e-acsl-manual.pdf,$FC_SUFFIX \ $EACSL_DOC/userman/main.pdf,e-acsl-manual.pdf,$FC_SUFFIX \
SHELL=(type -p bash) parallel --halt soon,fail=1 --csv build {1} {2} {3} ::: \
acsl/acsl.pdf,acsl.pdf,$ACSL_SUFFIX \ acsl/acsl.pdf,acsl.pdf,$ACSL_SUFFIX \
$EACSL_DOC/refman/e-acsl.pdf,e-acsl.pdf,$ACSL_SUFFIX $EACSL_DOC/refman/e-acsl.pdf,e-acsl.pdf,$EACSL_SUFFIX
# Sanity check: version differences between Frama-C, ACSL and E-ACSL
if [ "$ACSL_SUFFIX" != "$EACSL_SUFFIX" ]; then
echo "WARNING: different versions for ACSL and E-ACSL manuals: $ACSL_SUFFIX versus $EACSL_SUFFIX"
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment