File tree Expand file tree Collapse file tree 1 file changed +26
-6
lines changed Expand file tree Collapse file tree 1 file changed +26
-6
lines changed Original file line number Diff line number Diff line change 1- #! /bin/sh
1+ #! /bin/bash
22
33#
4- # This is just a simple script to
5- # build the json-fortran library and
6- # example program on Linux and Mac.
4+ # This is just a simple script to build the json-fortran library and example program on Linux and Mac.
5+ #
6+ # It also builds the documentation using RoboDoc
77#
88# Jacob Williams : 2/8/2014
99#
1414SRCDIR=' src/'
1515BUILDDIR=' lib/'
1616BINDIR=' bin/'
17+ DOCDIR=' documentation/'
1718
1819# Intel compiler
1920FCOMPILER=' ifort'
@@ -27,6 +28,7 @@ FCOMPILERFLAGS='-O2 -warn -stand f08 -diag-disable 7601 -traceback'
2728FCMODULEPATHFLAG=' -module '
2829
2930# GFortran (must be >= 4.9)
31+ # FCOMPILER='gfortran'
3032# FCOMPILER='/opt/local/bin/gfortran-mp-4.9'
3133# FCOMPILERFLAGS='-O2 -fbacktrace -Wall -Wextra -Wno-maybe-uninitialized -pedantic -std=f2008'
3234# FCMODULEPATHFLAG='-J'
@@ -46,19 +48,37 @@ EXEOUT='json'
4648MODCODE=' json_module'
4749EXAMPLECODE=' json_example'
4850
51+ ROBODOC=' robodoc'
52+ ROBOFLAGS=" --src ${SRCDIR} --doc ${DOCDIR} --multidoc --html --ignore_case_when_linking --syntaxcolors --source_line_numbers --index --tabsize 4"
53+
4954# output directories:
5055mkdir -p $BUILDDIR
5156mkdir -p $BINDIR
57+ mkdir -p $DOCDIR
5258
5359# clean build:
5460rm -f $BUILDDIR$WC$OBJEXT
5561rm -f $BUILDDIR$WC$MODEXT
5662rm -f $BUILDDIR$WC$LIBEXT
63+ rm -rf $DOCDIR$WC
64+
65+ #
66+ # build library:
67+ #
5768
58- # build library:
5969$FCOMPILER $FCOMPILERFLAGS -c $SRCDIR$MODCODE$FEXT $FCMODULEPATHFLAG$BUILDDIR
6070mv $MODCODE$OBJEXT $BUILDDIR
6171$ARCHIVER $ARCHIVERFLAGS $BUILDDIR$LIBOUT$LIBEXT $BUILDDIR$MODCODE$OBJEXT
6272
63- # build example:
73+ #
74+ # build example:
75+ #
76+
6477$FCOMPILER $FCOMPILERFLAGS -o $BINDIR$EXEOUT $FCMODULEPATHFLAG$BUILDDIR $SRCDIR$EXAMPLECODE$FEXT $BUILDDIR$LIBOUT$LIBEXT
78+
79+ #
80+ # build documentation:
81+ #
82+
83+ $ROBODOC $ROBOFLAGS
84+
You can’t perform that action at this time.
0 commit comments