2015-12-19 02:35:13 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [[ -z ${QMCCHEM_PATH} ]]
|
|
|
|
then
|
|
|
|
echo "Error: qmcchemrc not loaded"
|
|
|
|
exit -1
|
|
|
|
fi
|
|
|
|
|
2015-12-20 01:09:14 +01:00
|
|
|
cd ${QMCCHEM_PATH}/ocaml || exit -1
|
|
|
|
cp ${QMCCHEM_PATH}/EZFIO/Ocaml/ezfio.ml . || exit -1
|
2015-12-19 02:35:13 +01:00
|
|
|
|
|
|
|
LSMD5_FILE=${QMCCHEM_PATH}/ocaml/.ls_md5
|
|
|
|
FILES="*.ml *.mli"
|
|
|
|
MD5=$(ls -ltr --full-time ${FILES} 2>/dev/null | md5sum | cut -d ' ' -f 1)
|
|
|
|
|
|
|
|
REF=0
|
|
|
|
|
|
|
|
if [[ -f ${LSMD5_FILE} ]]
|
|
|
|
then
|
|
|
|
REF=$(cat ${LSMD5_FILE})
|
|
|
|
fi
|
|
|
|
|
2015-12-20 01:09:14 +01:00
|
|
|
|
2015-12-19 02:35:13 +01:00
|
|
|
if [[ ${MD5} != ${REF} ]]
|
|
|
|
then
|
|
|
|
echo ${MD5} > ${LSMD5_FILE}
|
|
|
|
echo Finding dependencies in OCaml files
|
2018-07-09 14:40:45 +02:00
|
|
|
python2 ./ninja_ocaml.py
|
2015-12-19 02:35:13 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
ninja ${@}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|