Commit 86ed5559 authored by Dr. Nandor Tamaskovics's avatar Dr. Nandor Tamaskovics
Browse files

The bash shell script doxygen.sh has been revised.

parent 26d6f6d1
Loading
Loading
Loading
Loading
+52 −72
Original line number Diff line number Diff line
@@ -21,55 +21,41 @@ FIG2DEV=`which fig2dev` ;
DOXYGEN=`which doxygen` ;


error=0;


if [[ -d ${LAMMPSSRC} && -d ${LAMMPSDEVELOPERDOC} && -d ${LAMMPSDOC} && -f ${LAMMPSDOCMAKE} && -d ${LAMMPSDOXYGEN} && -f ${LAMMPSDOXYFILE} ]] ;
 then
   cd ${LAMMPSSRC} ;
   make no-all ;
   cd ${LAMMPSBASE} ;
 else
  error=1 ;
  echo "Cannot configure LAMMPS sources - Please run doxygen.sh from the LAMMPS root directory."
   echo "Cannot configure LAMMPS sources - Please run doxygen.sh from the LAMMPS root directory." >&2 ;
   exit 1 ;
 fi ;


if [ ${error} == 0 ] ;
if [ ! -x ${FIG2DEV} ] ;
  then
    if [[ ! -x ${FIG2DEV} ]] ;
      then
        error=1 ;
        echo "${FIG2DEV} not found - Please install ${FIG2DEV} for Your operating system." ;
      fi ;
    echo "${FIG2DEV} not found - Please install ${FIG2DEV} for Your operating system." >&2 ;
    exit 1 ;
  fi ;


if [ ${error} == 0 ] ;
  then
    if [[ -d ${LAMMPSDEVELOPERDOC} ]] ;
if [ -d ${LAMMPSDEVELOPERDOC} ] ;
  then
    ${FIG2DEV} -L png ${LAMMPSDEVELOPERDOC}/classes.fig > tools/doxygen/classes.png ;
    ${FIG2DEV} -L eps ${LAMMPSDEVELOPERDOC}/classes.fig > tools/doxygen/classes.eps ;
  else
        error=1 ;
        echo "LAMMPS developer documentation not found - Please control Your LAMMPS installation." ;
      fi;
    echo "LAMMPS developer documentation not found - Please control Your LAMMPS installation." >&2 ;
    exit 1 ;
  fi ;


if [ ${error} == 0 ] ;
if [ ! -x ${DOXYGEN} ] ;
  then
    if [[ ! -x ${DOXYGEN} ]] ;
      then
        error=1;
        echo "doxygen not found - Please install doxygen for Your operating system." ;
      fi ;
    echo "doxygen not found - Please install doxygen for Your operating system." >&2 ;
    exit 1 ;
  fi ;


if [ ${error} == 0 ] ;
  then
if [[ -d ${LAMMPSSRC} && -f ${LAMMPSDOXYFILE} && -f ${LAMMPSDEVELOPERDOXFILE} ]] ;
  then
    ICS=' ';
@@ -81,35 +67,30 @@ if [ ${error} == 0 ] ;
    sed -i "s/LAMMPS_VERSION/${version}/g"  ${DEVELOPERDOXFILE} ;
    ${DOXYGEN} ${DOXYFILE} ;
  else
        echo "Doxyfile prototype not found - Please control Your LAMMPS installation." ;
      fi ;
    echo "Doxyfile prototype not found - Please control Your LAMMPS installation." >&2 ;
    exit 1 ;
  fi ;


if [ ${error} == 0 ] ;
  then
if [[ -d ${LAMMPSDOC} && -f ${LAMMPSDOCMAKE} ]] ;
  then
    cd ${LAMMPSDOC} ;
        if [ -d ${LAMMPSDOCTMP} ] ;
         then
          rm -vrf ${LAMMPSDOCTMP} ;
         fi ;
    for d in ${LAMMPSDOCTMP} ;
      do
        rm -vrf $d;
      done ;
    make clean ;
    make html ;
    make pdf ;
    cd ${LAMMPSBASE} ;
    echo "${LAMMPSDOC} exists." ;
  else
      error=1 ;
      echo "Cannot build LAMMPS native documentation - Please run doxygen.sh from the LAMMPS root directory." ;
    fi ;
    echo "Cannot build LAMMPS native documentation - Please run doxygen.sh from the LAMMPS root directory."i >&2 ;
    exit 1 ;
  fi ;


if [ ${error} == 0 ] ;
  then
    if [[ ${error} == 0 && -d ${LAMMPSDOCHTML} ]] ;
if [ -d ${LAMMPSDOCHTML} ] ;
  then
    if [ -d ${LAMMPSDOXYGENDOCMANUAL} ] ;
      then
@@ -120,8 +101,7 @@ if [ ${error} == 0 ] ;
    cp -av ${LAMMPSDOC}/*.pdf ${LAMMPSDOXYGENDOCMANUAL} ;
    echo "${LAMMPSDOXYGENDOCMANUAL} copied." ;
  else
          error=1 ;
          echo "Cannot include LAMMPS native documentation into the doxygen documentation - Please run doxygen.sh from the LAMMPS root directory." ;
    fi ;
    echo "Cannot include LAMMPS native documentation into the doxygen documentation - Please run doxygen.sh from the LAMMPS root directory." >&2 ;
    exit 1 ;
  fi ;