source: trunk/lib/Makefile.am @ 834

Last change on this file since 834 was 795, checked in by Peter Johansson, 12 years ago

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'.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.9 KB
Line 
1## Process this file with automake to produce Makefile.in
2##
3## $Id: Makefile.am 795 2009-06-30 03:57:27Z peter $
4
5# Copyright (C) 2005 Jari Häkkinen
6# Copyright (C) 2006 Jari Häkkinen, Peter Johansson
7# Copyright (C) 2007, 2008 Peter Johansson
8# Copyright (C) 2008 Jari Häkkinen, Peter Johansson
9# Copyright (C) 2009 Peter Johansson
10#
11# This file is part of svndigest, http://dev.thep.lu.se/svndigest
12#
13# svndigest is free software; you can redistribute it and/or modify it
14# under the terms of the GNU General Public License as published by
15# the Free Software Foundation; either version 3 of the License, or
16# (at your option) any later version.
17#
18# svndigest is distributed in the hope that it will be useful, but
19# WITHOUT ANY WARRANTY; without even the implied warranty of
20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21# General Public License for more details.
22#
23# You should have received a copy of the GNU General Public License
24# along with svndigest. If not, see <http://www.gnu.org/licenses/>.
25
26SUBDIRS = yat .
27
28AM_CPPFLAGS = $(SVNDIGEST_CPPFLAGS)
29AM_CXXFLAGS = $(SVNDIGEST_CXXFLAGS)
30
31noinst_LIBRARIES = libsvndigest.a
32
33noinst_HEADERS = AddStats.h Alias.h BlameStats.h ClassicStats.h \
34  Commitment.h Configuration.h copyright_year.h css.h\
35  Date.h Directory.h File.h first_page.h Functor.h \
36  Gnuplot.h GnuplotFE.h \
37  HtmlBuf.h HtmlStream.h html_utility.h LineTypeParser.h \
38  Node.h
39  OptionVersion.h rmdirhier.h \
40  Stats.h StatsCollection.h subversion_info.h SVN.h SVNblame.h  \
41  SVNinfo.h SVNlog.h SVNproperty.h Trac.h utility.h
42
43libsvndigest_a_SOURCES = AddStats.cc Alias.cc BlameStats.cc \
44  ClassicStats.cc \
45  Commitment.cc Configuration.cc copyright_year.cc \
46  css.cc Date.cc Directory.cc File.cc first_page.cc\
47  Functor.cc Gnuplot.cc GnuplotFE.cc  HtmlBuf.cc HtmlStream.cc \
48  html_utility.cc LineTypeParser.cc Node.cc \
49  OptionVersion.cc \
50  rmdirhier.cc Stats.cc StatsCollection.cc subversion_info.cc SVN.cc \
51  SVNblame.cc SVNinfo.cc SVNlog.cc SVNproperty.cc Trac.cc utility.cc
52
53
54
55
56clean-local:
57  rm -rf *~
58
59all-local:
60
61if HAVE_SVN_WC
62$(srcdir)/subversion_info.cc: subversion_info.cc.tmp
63  @$(SHELL) $(top_srcdir)/build_support/move-if-change subversion_info.cc.tmp \
64  $(srcdir)/subversion_info.cc
65
66subversion_info.cc.tmp: FORCE
67  @echo '// subversion_info.cc generated from subversion_info.cc.in.' > $@ ;\
68  revision=`$(SVNVERSION) $(top_srcdir)` ;\
69  $(SED) -e 's/sub_2_svn_revision/r'$$revision'/g' \
70  $(srcdir)/subversion_info.cc.in >> $@ ;
71
72# update copyright year automatically (if we build from svn wc)
73$(srcdir)/copyright_year.cc: copyright_year.cc.tmp
74  @$(SHELL) $(top_srcdir)/build_support/move-if-change $< $@
75
76copyright_year.cc.tmp: FORCE
77  @year=`svn info $(top_srcdir)|$(SED) -n  's/.*Date: \(.*\)-..-.*/\1/p'`;\
78  $(SED) -e 's/"20[0-9][0-9]"/'\"$$year\"'/g' $(srcdir)/copyright_year.cc > $@ ;
79
80else
81# this is needed in 'svn export' build
82$(srcdir)/subversion_info.cc:
83  $(SED) -e 's/sub_2_svn_revision//g' \
84  $(srcdir)/subversion_info.cc.in >> $@ ;
85
86endif
87
88FORCE:
Note: See TracBrowser for help on using the repository browser.