Commit 20b37a04 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

updated build.sh and makefiles

parent 07ef8502
defaults: all
all:
@../scripts/build.sh
all:
@+../scripts/build.sh
clean:
@rm -rf output* compare* latex simplify
purge:
@rm -rf output* compare* latex simplify *.pdf
purge: clean
@rm -rf *.pdf
defaults: all
all:
@../scripts/build.sh
all:
@+../scripts/build.sh
clean:
@rm -rf output* compare* latex simplify
purge:
@rm -rf output* compare* latex simplify *.pdf
purge: clean
@rm -rf *.pdf
defaults: all
all:
@../scripts/build.sh
all:
@+../scripts/build.sh
clean:
@rm -rf output* compare* latex simplify
purge:
@rm -rf output* compare* latex simplify *.pdf
purge: clean
@rm -rf *.pdf
defaults: all
all:
@../scripts/build.sh
all:
@+../scripts/build.sh
clean:
@rm -rf output* compare* latex simplify
purge:
@rm -rf output* compare* latex simplify *.pdf
purge: clean
@rm -rf *.pdf
defaults: all
all:
@../scripts/build.sh
all:
@+../scripts/build.sh
clean:
@rm -rf output* compare* latex simplify
purge:
@rm -rf output* compare* latex simplify *.pdf
purge: clean
@rm -rf *.pdf
defaults: all
all:
@../scripts/build.sh
all:
@+../scripts/build.sh
clean:
@rm -rf output* compare* latex simplify
purge:
@rm -rf output* compare* latex simplify *.pdf
purge: clean
@rm -rf *.pdf
#!/bin/bash
CODEDIR=".."
# exit whenever a command fails
set -e
CODEDIR="../src"
check_existence()
{
make -C "$CODEDIR" "$@"
# check whether $(CODEDIR)/lbmat_$(MODEL) exists
EXE=${CODEDIR}/${1}
if [[ ! -f "${EXE}" ]]; then
echo "${EXE} does not exist -> calling make"
make -C .. ${1}
if [[ ! -f ${EXE} ]]; then
echo "${EXE} still does not exist -> check manually"
exit
for target in "$@"; do
target="$CODEDIR/$target"
if [[ ! -f "$target" ]]; then
echo "$target still does not exist -> check manually"
exit 1
fi
fi
done
}
#echo $(realpath $0)
......@@ -26,23 +29,21 @@ MODEL=${RP1##*/}
echo model: ${MODEL}
check_existence lbmat_${MODEL}
check_existence simplify
check_existence export_latex
check_existence export_latex_compare
# make all necessary binaries
check_existence lbmat_${MODEL} simplify export_latex export_latex_compare
# execute lbmat_${MODEL} to create output directories
${CODEDIR}/lbmat_${MODEL}
# make symlinks
[[ ! -f simplify ]] && ln "${CODEDIR}/simplify" simplify -s
[[ ! -d latex ]] && ln "${CODEDIR}/latex" latex -s
[[ ! -d latex ]] && ln "../latex" latex -s
# symbolic substitutions
for a in output*symbolic; do
if [ ! -f "${a}/spatial_EPDE/pde_00.tex" ]; then
../scripts/script_backsubst_searcher.py ${a}
../export_latex ${a}
"$CODEDIR/export_latex" ${a}
# check whether latex files exist
if [ ! -f "${a}/spatial_EPDE/pde_00.tex" ]; then
echo "${a}/spatial_EPDE/pde_00.tex not found"
......@@ -52,7 +53,7 @@ for a in output*symbolic; do
done
# compare latex
../export_latex_compare output_${MODEL}
"$CODEDIR/export_latex_compare" output_${MODEL}
# call latex
buf_size=100000000
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment