Skip to content

Commit 7c9d067

Browse files
committed
minor updates to build.sh script.
1 parent 7423813 commit 7c9d067

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

build.sh

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
PROJECTNAME='pyplot-fortran' # project name for robodoc
88
MODCODE='pyplot_module.f90' # module file name
9+
FORDMD='pyplot-fortran.md' # FORD settings file
910
LIBOUT='libpyplot.a' # name of library
1011
DOCDIR='./doc/' # build directory for documentation
1112
SRCDIR='./src/' # library source directory
@@ -17,16 +18,20 @@ LIBDIR='./lib/' # build directory for library
1718
FCOMPILER='gnu' #Set default compiler to gfortran
1819
FCOMPILERFLAGS='-c -O2 -fbacktrace -Wall -Wextra -Wno-maybe-uninitialized -Wno-unused-function -pedantic -std=f2008'
1920

20-
#build the library and example:
21+
#build the library and example using FoBiS:
2122

22-
FoBiS.py build -compiler ${FCOMPILER} -cflags "${FCOMPILERFLAGS}" -dbld ${LIBDIR} -s ${SRCDIR} -dmod ./ -dobj ./ -t ${MODCODE} -o ${LIBOUT} -mklib static -colors
23-
FoBiS.py build -compiler ${FCOMPILER} -cflags "${FCOMPILERFLAGS}" -dbld ${BINDIR} -s ${SRCDIR} -dmod ./ -dobj ./ -colors
23+
if hash FoBiS.py 2>/dev/null; then
24+
FoBiS.py build -compiler ${FCOMPILER} -cflags "${FCOMPILERFLAGS}" -dbld ${LIBDIR} -s ${SRCDIR} -dmod ./ -dobj ./ -t ${MODCODE} -o ${LIBOUT} -mklib static -colors
25+
FoBiS.py build -compiler ${FCOMPILER} -cflags "${FCOMPILERFLAGS}" -dbld ${BINDIR} -s ${SRCDIR} -dmod ./ -dobj ./ -colors
26+
else
27+
echo "FoBiS.py not found! Cannot build library. Install using: sudo pip install FoBiS.py"
28+
fi
2429

25-
# build the documentation:
30+
# build the documentation using FORD:
2631

2732
if hash ford 2>/dev/null; then
28-
echo "Building documentation..."
29-
ford pyplot-fortran.md
33+
echo "Building documentation..."
34+
ford ${FORDMD}
3035
else
31-
echo "FORD not found! Cannot build documentation. To install, run: sudo pip install ford"
32-
fi
36+
echo "FORD not found! Cannot build documentation. To install, run: sudo pip install ford"
37+
fi

0 commit comments

Comments
 (0)