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
2
2
3
3
#
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
7
7
#
8
8
# Jacob Williams : 2/8/2014
9
9
#
14
14
SRCDIR=' src/'
15
15
BUILDDIR=' lib/'
16
16
BINDIR=' bin/'
17
+ DOCDIR=' documentation/'
17
18
18
19
# Intel compiler
19
20
FCOMPILER=' ifort'
@@ -27,6 +28,7 @@ FCOMPILERFLAGS='-O2 -warn -stand f08 -diag-disable 7601 -traceback'
27
28
FCMODULEPATHFLAG=' -module '
28
29
29
30
# GFortran (must be >= 4.9)
31
+ # FCOMPILER='gfortran'
30
32
# FCOMPILER='/opt/local/bin/gfortran-mp-4.9'
31
33
# FCOMPILERFLAGS='-O2 -fbacktrace -Wall -Wextra -Wno-maybe-uninitialized -pedantic -std=f2008'
32
34
# FCMODULEPATHFLAG='-J'
@@ -46,19 +48,37 @@ EXEOUT='json'
46
48
MODCODE=' json_module'
47
49
EXAMPLECODE=' json_example'
48
50
51
+ ROBODOC=' robodoc'
52
+ ROBOFLAGS=" --src ${SRCDIR} --doc ${DOCDIR} --multidoc --html --ignore_case_when_linking --syntaxcolors --source_line_numbers --index --tabsize 4"
53
+
49
54
# output directories:
50
55
mkdir -p $BUILDDIR
51
56
mkdir -p $BINDIR
57
+ mkdir -p $DOCDIR
52
58
53
59
# clean build:
54
60
rm -f $BUILDDIR$WC$OBJEXT
55
61
rm -f $BUILDDIR$WC$MODEXT
56
62
rm -f $BUILDDIR$WC$LIBEXT
63
+ rm -rf $DOCDIR$WC
64
+
65
+ #
66
+ # build library:
67
+ #
57
68
58
- # build library:
59
69
$FCOMPILER $FCOMPILERFLAGS -c $SRCDIR$MODCODE$FEXT $FCMODULEPATHFLAG$BUILDDIR
60
70
mv $MODCODE$OBJEXT $BUILDDIR
61
71
$ARCHIVER $ARCHIVERFLAGS $BUILDDIR$LIBOUT$LIBEXT $BUILDDIR$MODCODE$OBJEXT
62
72
63
- # build example:
73
+ #
74
+ # build example:
75
+ #
76
+
64
77
$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