create_makefile.sh 930 Bytes
Newer Older
1 2
#!/bin/bash 

3
# options passed to `find` for locating relevant source files
4
FIND_OPTS=( . -name '*.v' ! -name '*#*' ! -path './.git/*' ! -path './with-proof-state/*' )
5

6 7 8 9
while ! [ -z "$1" ]
do
    case "$1" in
        --without-classic)
10 11 12
            FIND_OPTS+=( ! -path './classic/*' )
            ;;
        --only-classic)
13
            FIND_OPTS+=( ! -path './analysis/*' ! -path './behavior/*' ! -path './model/*'  ! -path './results/*')
14 15 16 17 18 19 20 21 22
            ;;
        *)
            echo "Unrecognized option: $1"
            exit 1
            ;;
    esac
    shift
done

23 24 25
FIND_OPTS+=( -print )

# Compile all relevant *.v files
26
coq_makefile -f _CoqProject $(find "${FIND_OPTS[@]}" | scripts/module-toc-order.py ) -o Makefile
27

28 29
# Patch HTML target to switch out color, and 
# so that it parses comments and has links to ssreflect.
30
# Also include Makefile.coqdocjs for 'htmlpretty' documentation target.
31
patch -s < scripts/Makefile.patch