source: palm/trunk/SCRIPTS/generate_documentation @ 2809

Last change on this file since 2809 was 2718, checked in by maronga, 7 years ago

deleting of deprecated files; headers updated where needed

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 2.7 KB
RevLine 
[1714]1#!/bin/bash
2#--------------------------------------------------------------------------------#
[2696]3# This file is part of the PALM model system.
[1714]4#
5# PALM is free software: you can redistribute it and/or modify it under the terms
6# of the GNU General Public License as published by the Free Software Foundation,
7# either version 3 of the License, or (at your option) any later version.
8#
9# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
10# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
11# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License along with
14# PALM. If not, see <http://www.gnu.org/licenses/>.
15#
[2718]16# Copyright 1997-2018  Leibniz Universitaet Hannover
[1714]17#--------------------------------------------------------------------------------#
18#
19# Current revisions:
20# ------------------
21#
[1758]22#
[1714]23# Former revisions:
24# -----------------
[2716]25# $Id: generate_documentation 2718 2018-01-02 08:49:38Z schwenkel $
26# Corrected "Former revisions" section
27# svn propset keyword
28#
29#
[1714]30#
[2716]31# 2696 2017-12-14 17:12:51Z kanani
32# Change in file header (GPL part)
[1758]33#
[2716]34# 1714 knoop
[1758]35# Initial revision
36#
[1714]37#--------------------------------------------------------------------------------#
38# generate_documentation - script for generating the PALM code documentation
39#--------------------------------------------------------------------------------#
40
41echo "Generating PALM source code documentation..."
42
43# Checking if the environment variable PALM_BIN is set.
44if [[ -z $PALM_BIN ]]; then
45   echo "PALM_BIN is not set."
46   exit 1
47fi
48
[1715]49doc_dir=$PALM_BIN/../../documentation
50
[1714]51# Checking for doxygen
52if type -t doxygen; then
53
54   # Removing old documentation
[1715]55   if [[ -d $doc_dir ]];then
[1714]56      echo "Remove old documentation"
[1715]57      rm -r $doc_dir
[1714]58   fi
59   # Generating HTML documentation
60   echo "found doxygen. Continuing..."
61   cd $PALM_BIN/../DOC
62   doxygen palm2doxygen.config
63   if [[ $? -ne 0 ]];then
64      echo "doxygen detected an error."
65      exit 1
66   fi
[1715]67   cd $doc_dir
68   doc_dir=$(pwd)
[1714]69   ln -s $(pwd)/html/index.html PALM_doc.html
70   echo "HTML source code documentation generated."
71   
72   # Checking for pdflatex
73   if type -t pdflatex; then
74   
75      # Generating PDF documentation
[1715]76      cd $doc_dir/latex
[1714]77      make pdf
[1715]78      cd $doc_dir
[1714]79      ln -s $(pwd)/latex/refman.pdf PALM_doc.pdf
80      echo "PDF source code documentation generated."
81   
82   else
83      echo "ERROR: pdflatex not found."
84      echo "Skipping PDF documentation generation. Terminating!"
85      exit 1
86   fi
87else
88   echo "ERROR: doxygen not found."
89   echo "Skipping PALM documentation generation. Terminating!"
90   exit 1
91fi
92
[1715]93echo "The PALM source code documentation is located in: $doc_dir"
94echo "Done."
Note: See TracBrowser for help on using the repository browser.