Ignore:
Timestamp:
Jun 30, 2009, 5:57:27 AM (12 years ago)
Author:
Peter Johansson
Message:

refs #388

Create a sub-directory 'lib/yat' in which files from yat are
placed. The files may be updated via 'make fetch', see file README for
more details on how to change which files are updated/copied through
this mechanism.

The reason we do not use subversion's external mechanism is that we
don't want the files to be synchronised with yat automatically. We
want the update to be moderated by some developer.

I chose to fetch files using the svn client rather than wget because
the svn allows us to get an Id string with information from the yat
repository. 'wget' would just download the file as it appears on the
server that is the string is not expanded.

The file 'config_public.h' is created by configure just as in
yat. This implies that automake adds $(top_builddir)/lib/yat to the
include path so unless in a VPATH build $(top_srcdir)/lib/yat is in
the include path. As we have already added $(top_srcdir)/lib to the
include path, and there are both a lib/utility.h and a
lib/yat/utility.h it is not obvious which file is included when having
'include "utility.h"'. For this reason, when being in bin/ and test/
it is needed to include "../lib/utility.h" rather than "utility.h"
when we want to include 'lib/utility.h'.

Location:
trunk/lib/yat
Files:
1 added
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/lib/yat/Option.cc

    • Property svn:keywords deleted
    r792 r795  
    1 // $Id$
     1// $Id: Option.cc 1797 2009-02-12 18:07:10Z peter $
    22
    33/*
    4   Copyright (C) 2007 Jari Häkkinen, Peter Johansson
    5   Copyright (C) 2008 Peter Johansson
     4  Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
     5  Copyright (C) 2009 Peter Johansson
    66
    7   This file is part of svndigest, http://dev.thep.lu.se/svndigest
     7  This file is part of the yat library, http://dev.thep.lu.se/yat
    88
    9   svndigest is free software; you can redistribute it and/or modify it
    10   under the terms of the GNU General Public License as published by
    11   the Free Software Foundation; either version 3 of the License, or
    12   (at your option) any later version.
     9  The yat library is free software; you can redistribute it and/or
     10  modify it under the terms of the GNU General Public License as
     11  published by the Free Software Foundation; either version 3 of the
     12  License, or (at your option) any later version.
    1313
    14   svndigest is distributed in the hope that it will be useful, but
    15   WITHOUT ANY WARRANTY; without even the implied warranty of
     14  The yat library is distributed in the hope that it will be useful,
     15  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1616  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    1717  General Public License for more details.
    1818
    1919  You should have received a copy of the GNU General Public License
    20   along with svndigest. If not, see <http://www.gnu.org/licenses/>.
     20  along with yat. If not, see <http://www.gnu.org/licenses/>.
    2121*/
    2222
     
    3030
    3131namespace theplu {
    32 namespace svndigest {
     32namespace yat {
     33namespace utility {
     34
    3335
    3436  Option::Option(CommandLine& cmd, std::string flag, std::string desc)
     
    3638  {
    3739    if (flag.empty())
    38       throw std::runtime_error("svndigest: Option: given flag is empty");
     40      throw std::runtime_error("yat: Option: given flag is empty");
    3941    if (flag.size()==1 || (flag.size()==2 && flag[1]==','))
    4042      short_name_ = flag[0];
     
    8688  bool Option::present(void) const
    8789  {
     90    if (!cmd().parsed()) {
     91      std::string s("Option::present called before Commandline was parsed");
     92      throw std::logic_error(s);
     93    }
    8894    return present_;
    8995  }
     
    147153  }
    148154
    149 }} // of namespace svndigest and theplu
     155}}} // of namespace utility, yat, and theplu
Note: See TracChangeset for help on using the changeset viewer.