lean2/src/builtin/lean2h.sh
Leonardo de Moura 5fb718c03a fix(build): broken dependencies between lean executable and .olean, *_decls.cpp and *_decls.h files
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-10 10:58:35 -08:00

13 lines
410 B
Bash
Executable file

#!/bin/sh
LEAN=$1 # Lean executable
SOURCE_DIR=$2 # Where the .lean and .lua auxiliary files are located
LEAN_FILE=$3 # Lean file to be exported
DEST=$4 # where to put the CPP file
ARGS=$5 # extra arguments
if $LEAN -q $ARGS $LEAN_FILE $SOURCE_DIR/name_conv.lua $SOURCE_DIR/lean2h.lean > $DEST.tmp
then
mv $DEST.tmp $DEST
else
echo "Failed to generate $DEST"
exit 1
fi