Skip to content

Commit

Permalink
Split the build script
Browse files Browse the repository at this point in the history
  • Loading branch information
certik committed Sep 30, 2018
1 parent f561580 commit e45d07c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
12 changes: 2 additions & 10 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@
set -e
set -x

# Generate a Fortran AST from Fortran.asdl
python grammar/asdl_py.py
./build0.sh

# Generate a parse tree from fortran.g4
antlr4="java org.antlr.v4.Tool"
(cd grammar; $antlr4 -Dlanguage=Python3 -no-listener -visitor fortran.g4 -o ../liblfort/parser)

# Compile LFort runtime library
CFLAGS="-Wall -g"
gcc $CFLAGS -o lfort_intrinsics.o -c lfort_intrinsics.c
ar rcs liblfort.a lfort_intrinsics.o
./build1.sh
11 changes: 11 additions & 0 deletions build0.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

set -e
set -x

# Generate a Fortran AST from Fortran.asdl
python grammar/asdl_py.py

# Generate a parse tree from fortran.g4
antlr4="java org.antlr.v4.Tool"
(cd grammar; $antlr4 -Dlanguage=Python3 -no-listener -visitor fortran.g4 -o ../liblfort/parser)
9 changes: 9 additions & 0 deletions build1.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

set -e
set -x

# Compile LFort runtime library
CFLAGS="-Wall -g"
gcc $CFLAGS -o lfort_intrinsics.o -c lfort_intrinsics.c
ar rcs liblfort.a lfort_intrinsics.o

0 comments on commit e45d07c

Please sign in to comment.