Changeset 1998


Ignore:
Timestamp:
Jun 13, 2009, 2:34:19 AM (12 years ago)
Author:
Peter
Message:

Merged patch release 0.5.4 to the trunk. Delta 0.5.4 - 0.5.3

Location:
trunk
Files:
13 edited
4 copied

Legend:

Unmodified
Added
Removed
  • trunk/Makefile.am

    r1905 r1998  
    3838if ENABLE_SVN_SUPPORT
    3939include build_support/svn_support.am
     40else
     41release:
     42  @echo "ERROR: target 'release' not activated."
     43  @echo "       You need to run configure with '--enable-svn-support'."
     44  @exit 1
    4045endif
    4146
  • trunk/NEWS

    r1954 r1998  
    1111  A complete list of closed tickets can be found here [[br]]
    1212  http://dev.thep.lu.se/yat/query?status=closed&milestone=yat+0.6
     13
     14Version 0.5.4 (released 12 June 2009)
     15
     16  - Disable dvi ps and pdf documentation in case of doxygen 1.5.8 (issue #548)
     17  - improved uninstalled yat-config so it works in VPATH build (issue #539)
     18  - improved documentation
     19
     20  A complete list of closed tickets can be found here [[br]]
     21  http://dev.thep.lu.se/yat/query?status=closed&milestone=yat+0.5.4
    1322
    1423Version 0.5.3 (released 7 May 2009)
     
    117126{{{
    118127Copyright (C) 2003, 2006 Jari Häkkinen
    119 Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
    120 Copyright (C) 2009 Peter Johansson
     128Copyright (C) 2007, 2008, 2009 Jari Häkkinen, Peter Johansson
    121129
    122130This file is part of yat library, http://dev.thep.lu.se/yat
  • trunk/build_support/svn_support.am

    r1958 r1998  
    8989
    9090release: svn-check news-check version-check maintainer-check readme-check
    91   md5sum $(distdir).tar.gz > $(distdir).tar.gz.MD5
     91  $(MD5) $(distdir).tar.gz > $(distdir).tar.gz.MD5
  • trunk/build_support/yat-config.in

    r1914 r1998  
    2424libdir="@libdir@"
    2525includedir="@includedir@"
     26
     27abs_top_builddir="@abs_top_builddir@"
     28abs_top_srcdir="@abs_top_srcdir@"
    2629
    2730installed=no
     
    123126       fi
    124127    else
    125        # second part is for VPATH builds. No need to separate the
    126        # cases because redundancy will be removed by unique filtering
    127        # below.
    128        flags="$flags -I@abs_top_srcdir@ -I@abs_top_builddir@"
     128       flags="$flags -I$abs_top_srcdir"
     129       # For VPATH build we need to add path to some generated files
     130       # The second part is to allow header files in `yat/utility' to
     131       # include generated files simply as "generated.h".
     132       if test "x$abs_top_builddir" != "x$abs_top_srcdir"; then
     133          flags="$flags -I$abs_top_builddir"
     134          flags="$flags -I$abs_top_builddir/yat/utility"
     135       fi
    129136    fi
    130137    flags="$flags $YAT_CPPFLAGS $CPPFLAGS"
  • trunk/configure.ac

    r1978 r1998  
    7575AC_SUBST(ECHO)
    7676
     77AC_CHECK_PROGS([MD5], [md5sum md5 md5deep], [no])
     78
    7779AC_MSG_NOTICE(dnl
    7880[checking whether tools for generating documentation are available])
    7981
    80 have_dox_tools="yes"
     82have_doxygen=no
     83dx_enable_latex=no
     84dx_enable_dvi=no
     85dx_enable_ps=no
     86dx_enable_pdf=no
    8187AC_PATH_PROG([DOXYGEN], [doxygen], [no])
    8288if test "$DOXYGEN" = "no"; then
    8389   AC_MSG_WARN([unable to find doxygen application])
    84    have_dox_tools=no
    8590else
    8691   doxygen_min_version=1.5
    8792   AC_MSG_CHECKING([if doxygen is at least $doxygen_min_version])
    8893   doxygen_version=`$DOXYGEN --version`
    89    AX_COMPARE_VERSION([$doxygen_version], [ge], [$doxygen_min_version], ,
    90                       [have_dox_tools=no])
     94   AX_COMPARE_VERSION([$doxygen_version], [ge], [$doxygen_min_version],
     95                      [have_doxygen=yes])
    9196   AC_MSG_RESULT([$doxygen_version])
    92 fi
    93 AC_CHECK_PROG([have_epstopdf], [epstopdf], [yes], [no])
    94 if test "$have_epstopdf" != "yes"; then
    95    AC_MSG_WARN([unable to find epstopdf application])
    96    have_dox_tools=no
    97 fi
    98 AC_CHECK_PROG([have_latex], [latex], [yes], [no])
    99 if test "$have_latex" != "yes"; then
    100    AC_MSG_WARN([unable to find latex application])
    101 fi
    102 AC_CHECK_PROG([have_makeindex], [makeindex], [yes], [no])
    103 if test "$have_makeindex" != "yes"; then
    104    AC_MSG_WARN([unable to find makeindex application])
    105    have_dox_tools=no
    106 fi
    107 AC_CHECK_PROG([have_pdflatex], [pdflatex], [yes], [no])
    108 if test "$have_pdflatex" != "yes"; then
    109    AC_MSG_WARN([unable to find pdflatex application])
    110    have_dox_tools=no
    111 fi
    112 
    113 AC_SUBST(have_dox_tools)
    114 AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_dox_tools" = "yes"])
     97   dx_enable_latex=yes
     98   # doxygen 1.5.8 has a bug for latex output and enums
     99   AS_IF([test $have_doxygen = yes],
     100         [AX_COMPARE_VERSION([$doxygen_version], [eq], [1.5.8],
     101                             [dx_enable_latex=no])])
     102fi
     103
     104# we need latex output to generate dvi, ps, and pdf
     105AS_IF([test $dx_enable_latex = yes],
     106  [dx_enable_pdf=yes
     107   ACLTX_PROG_PDFLATEX([dx_enable_pdf=no])
     108   ACLTX_PROG_MAKEINDEX([dx_enable_pdf=no])
     109   dx_enable_dvi=yes
     110   ACLTX_PROG_LATEX([dx_enable_dvi=no])
     111   # ps needs dvi
     112   dx_enable_ps=$dx_enable_dvi
     113   ACLTX_PROG_DVIPS([dx_enable_ps=no])
     114  ]
     115)
     116
     117AC_SUBST(have_doxygen)
     118AM_CONDITIONAL([DX_ENABLE_HTML], [test x$have_doxygen = xyes])
     119AM_CONDITIONAL([DX_ENABLE_LATEX], [test x$dx_enable_latex = xyes])
     120AM_CONDITIONAL([DX_ENABLE_DVI], [test x$dx_enable_dvi = xyes])
     121AM_CONDITIONAL([DX_ENABLE_PS], [test x$dx_enable_ps = xyes])
     122AM_CONDITIONAL([DX_ENABLE_PDF], [test x$dx_enable_pdf = xyes])
    115123AC_CONFIG_FILES([test/documentation_test.sh],
    116124                [chmod +x test/documentation_test.sh])
     
    180188if test "x$enable_svn-support" = "xyes"; then
    181189  svn_error_msg="svn support cannot be enabled:"
     190  AS_IF([test "x$MD5" = "xno"],
     191        [AC_MSG_ERROR([$svn_error_msg tool to create md5 file not found])])
     192
    182193  AC_CHECK_FILE([$srcdir/.svn], ,
    183194                AC_MSG_ERROR([$svn_error_msg `$srcdir' is not an svn wc.]))
     
    290301AC_CONFIG_HEADER([yat/utility/config_public.h])
    291302
    292 # warning about missing doxygen
    293 if (test "$have_dox_tools" != "yes") ; then
    294   AC_MSG_WARN([
    295   Some pre-requisites for generating documentation were not
    296   fulfilled. The build will not create any documentation.
    297   Please consult the 'README' file for more information about
    298   what is needed to generate documentation and refer to above
    299   warning messages.
    300   ])
    301 fi
    302 
    303303# Print failure status information about selected items, and exit if
    304304# fatal errors were encountered. No output will be created if
     
    381381AC_MSG_NOTICE([])
    382382AC_MSG_NOTICE([ Ready to compile the yat library])
     383AS_IF([test x$have_doxygen = xyes],
     384  [AC_MSG_NOTICE([ Documentation will be generated in the following formats:])
     385   AC_MSG_NOTICE([   html])
     386   AS_IF([test x$dx_enable_pdf = xyes], [AC_MSG_NOTICE([   pdf])])
     387   AS_IF([test x$dx_enable_ps = xyes],  [AC_MSG_NOTICE([   ps])])
     388   AS_IF([test x$dx_enable_dvi = xyes], [AC_MSG_NOTICE([   dvi])])
     389  ],
     390  [AC_MSG_NOTICE([Generation of documentation is disabled])
     391   AC_MSG_NOTICE([doxygen could not be found])
     392  ])
     393AC_MSG_NOTICE()
    383394AC_MSG_NOTICE([ The following flags and libraries will be used:])
    384395AC_MSG_NOTICE([ +++++++++++++++++++++++++++++++++++++++++++++++])
  • trunk/doc/Makefile.am

    r1906 r1998  
    5656doc: html dvi ps pdf
    5757
    58 if HAVE_DOXYGEN
    59 
    6058
    6159# these are supported by automake and *-local will add target to *
     60if DX_ENABLE_DVI
    6261dvi-local: $(PACKAGE).dvi
     62endif
     63if DX_ENABLE_PS
    6364ps-local: $(PACKAGE).ps
     65endif
     66if DX_ENABLE_PDF
    6467pdf-local: $(PACKAGE).pdf
     68endif
     69if DX_ENABLE_HTML
    6570html-local: $(DX_HTML_OUTPUT)/index.html
     71endif
    6672
    6773# this is not supported by automake - there is no target latex
     74if DX_ENABLE_LATEX
    6875latex-local: $(DX_LATEX_OUTPUT)/refman.tex
     76endif
    6977
    7078$(DX_HTML_OUTPUT)/index.html: $(DOXYGEN_DEPS)
     
    7785
    7886$(PACKAGE).dvi: $(DX_LATEX_OUTPUT)/refman.tex
    79   cd $(DX_LATEX_OUTPUT) && latex refman.tex && latex refman.tex
     87  cd $(DX_LATEX_OUTPUT) && $(latex) refman.tex && $(latex) refman.tex
    8088  cp $(DX_LATEX_OUTPUT)/refman.dvi $(PACKAGE).dvi
    8189
    8290$(PACKAGE).ps: $(PACKAGE).dvi
    83   cd $(DX_LATEX_OUTPUT) && dvips -q -o refman.ps refman.dvi;
     91  cd $(DX_LATEX_OUTPUT) && $(dvips) -q -o refman.ps refman.dvi;
    8492  cp $(DX_LATEX_OUTPUT)/refman.ps $(PACKAGE).ps
    8593
     
    8896  cp $(DX_LATEX_OUTPUT)/refman.pdf $(PACKAGE).pdf
    8997
    90 endif
    9198
    9299install-data-hook:
  • trunk/m4/version.m4

    r1954 r1998  
    11## $Id$
    22#
    3 # Copyright (C) 2008 Jari Häkkinen, Peter Johansson
    4 # Copyright (C) 2009 Peter Johansson
     3# Copyright (C) 2008, 2009 Jari Häkkinen, Peter Johansson
    54#
    65# This file is part of the yat library, http://dev.thep.lu.se/yat
     
    5857# yat-0.5.2  2:1:0
    5958# yat-0.5.3  2:2:0
     59# yat-0.5.4  2:3:0
    6060#
    6161# *Accidently, the libtool number was not updated for yat 0.5
  • trunk/test/Suite.cc

    r1797 r1998  
    33/*
    44  Copyright (C) 2008 Jari Häkkinen, Peter Johansson
     5  Copyright (C) 2009 Peter Johansson
    56
    67  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    2930#include <sstream>
    3031#include <string>
     32
     33#include <sys/stat.h>
    3134
    3235namespace theplu {
     
    152155
    153156
     157  bool run_as_root(void)
     158  {
     159    std::string file("write_protected_file.txt");
     160    std::ofstream os(file.c_str());
     161    os.close();
     162    chmod(file.c_str(), S_IRUSR);
     163    os.open(file.c_str());
     164    bool status = os.good();
     165    chmod(file.c_str(), S_IWUSR);
     166    unlink(file.c_str());
     167    return status;
     168  }
     169
     170
    154171  bool Suite::xadd(bool ok)
    155172  {
  • trunk/test/Suite.h

    r1877 r1998  
    191191  }
    192192
     193
     194  // return true if we can write to a write-protected file
     195  bool run_as_root(void);
    193196
    194197  template<class T>
  • trunk/test/commandline_test.cc

    r1954 r1998  
    502502  suite.err() << "Testing OptionOutFile... ";
    503503
     504  if (yat::test::run_as_root()) {
     505    suite.err() << "skipped because user is root\n";
     506    // skipping means test should still be successful
     507    return true;
     508  }
     509
    504510  // Peter, creation of this directory should perhaps be in a more central place
    505511  FileUtil dir("testSubDir");
     
    520526    }
    521527
     528  FileUtil file("testSubDir/commandline_test.dir/out.txt");
     529  if (file.exists()) {
     530    suite.err() << "FileUtil::exists returns true unexpectedly\n";
     531    return false;
     532  }
     533  if (file.permissions("w")==0) {
     534    suite.err() << "FileUtil::permission(\"w\") returns 0 while "
     535                << "-1 was expected\n";
     536    return false;
     537  }
     538
    522539  bool ok=true;
    523540  CommandLine cmd;
     
    532549      cmd.parse(ac,av);
    533550      ok =false;
     551      suite.err() << "failed\n";
    534552    }
    535553    catch (cmd_error& e) {
    536       suite.err() << "ok\n";                                        \
     554      suite.err() << "ok\n";
    537555      suite.err() << "catch expected error: " << e.what() << "\n";
    538556    }
  • trunk/test/documentation_test.sh.in

    r1907 r1998  
    55
    66# Copyright (C) 2008 Jari Häkkinen, Peter Johansson
     7# Copyright (C) 2009 Peter Johansson
    78#
    89# This file is part of the yat library, http://dev.thep.lu.se/yat
     
    2223#
    2324
    24 have_dox_tools="@have_dox_tools@"
     25have_doxygen="@have_doxygen@"
    2526
    2627while test $# -gt 0; do
     
    3738fi
    3839
    39 if test $have_dox_tools = "no"; then
     40if test $have_doxygen = "no"; then
    4041    echo Skipped;
    4142    exit 77;
     
    4445echo @ECHO_N@ "doxygen "
    4546@DOXYGEN@ --version
    46 (cd @abs_top_builddir@/doc && make html > /dev/null )
     47(cd @abs_top_builddir@/doc && make doc > /dev/null 2>&1 )
    4748if test ! -e @abs_top_builddir@/doc/doxygen.error; then
    4849    echo Cannot find file: @abs_top_builddir@/doc/doxygen.error
  • trunk/yat/statistics/utility.h

    r1874 r1998  
    117117  /// can be const_iterators.
    118118  ///
    119   /// Requirements: T should be an iterator over a range of doubles (or
    120   /// any type being convertable to double).
     119  /// Requirements: \c T should either be unweighted with value type
     120  /// convertible to \c double or \c T should be weighted with value
     121  /// type convertible to utility::DataWeight
    121122  ///
    122123  /// @return median of range
  • trunk/yat/utility/stl_utility.h

    r1970 r1998  
    131131     Functor class to exponentiate values using std::exp
    132132
     133     T should be either \c float, \c double, or \c long \c double
     134
    133135     \since New in yat 0.5
    134136  */
     
    241243  /**
    242244     Functor class to take logarithm
     245
     246     T should be either \c float, \c double, or \c long \c double
    243247
    244248     \since New in yat 0.5
Note: See TracChangeset for help on using the changeset viewer.