source: trunk/Makefile.am @ 2449

Last change on this file since 2449 was 2449, checked in by Peter, 12 years ago

fix maintainer-check

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.7 KB
Line 
1## Process this file with automake to produce Makefile.in
2##
3
4# $Id: Makefile.am 2449 2011-03-28 18:57:54Z peter $
5#
6# Copyright (C) 2003 Daniel Dalevi, Jari Häkkinen
7# Copyright (C) 2005 Peter Johansson
8# Copyright (C) 2006 Jari Häkkinen
9# Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
10# Copyright (C) 2009, 2010, 2011 Peter Johansson
11#
12# This file is part of the yat library, http://dev.thep.lu.se/yat
13#
14# The yat library is free software; you can redistribute it and/or
15# modify it under the terms of the GNU General Public License as
16# published by the Free Software Foundation; either version 3 of the
17# License, or (at your option) any later version.
18#
19# The yat library is distributed in the hope that it will be useful,
20# but WITHOUT ANY WARRANTY; without even the implied warranty of
21# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22# General Public License for more details.
23#
24# You should have received a copy of the GNU General Public License
25# along with yat. If not, see <http://www.gnu.org/licenses/>.
26
27# -I arg should be the same as arg in AC_CONFIG_MACRO_DIR in configure.ac
28ACLOCAL_AMFLAGS = -I m4
29
30SUBDIRS = build_support m4 yat test doc
31
32.PHONY: doc doxygen_mk maintainer-check news-check svn-check svn-clean release
33doc: doxygen_mk
34  @(cd doc; $(MAKE) $(AM_MAKEFLAGS) $@)
35
36doxygen_mk:; @(cd yat; $(MAKE) $(AM_MAKEFLAGS) $@)
37
38lazycheck recheck: all
39  @(cd test && $(MAKE) $(AM_MAKEFLAGS) $@)
40
41
42# like the normal install target, but does not update header files
43# (and its time stamps) if the content did not change.
44install-modified:
45  $(MAKE) install $(AM_MAKEFLAGS) INSTALL_HEADER="$(install_sh_DATA) -C"
46
47###############################################################
48##
49## Some targets useful for the maintainer
50##
51MAINTAINER_CHECK_LOCAL = maintainer-check-local yat-pc-check
52RELEASE_LOCAL = ltversion-check
53
54.PHONY: maintainer-check-local ltversion-check
55
56ltversion-check:
57  @case `sed 200q $(srcdir)/m4/version.m4` in \
58  *yat-$(VERSION)*$(YAT_LT_VERSION)*);; \
59  *) \
60    echo "version.m4: YAT_LT_VERSION not updated;" 1>&2;\
61    echo "  expected to find 'yat-$(VERSION)  $(YAT_LT_VERSION)'" 1>&2;\
62    exit 1;; \
63  esac
64
65maintainer-check-local:
66  mkdir _inst
67  @mcl_install=`cd _inst && pwd` \
68  && $(MAKE) $(AM_MAKEFLAGS) clean \
69  && $(MAKE) $(AM_MAKEFLAGS) prefix=$$mcl_install \
70  && $(MAKE) $(AM_MAKEFLAGS) prefix=$$mcl_install install \
71  && cd test && $(MAKE) $(AM_MAKEFLAGS) prefix=$$mcl_install installcheck
72
73# check that yat.pc is correctly generated with different combinations
74# of ./configure; make. This target is typically used within
75# mainatiner-check; if used outside mainatiner-check, please note that
76# the target calls configure possibly with other arguments, so it's
77# probably a good a idea to re-configure afterwards.
78yat-pc-check:
79  $(SHELL) $(srcdir)/configure $(DISTCHECK_CONFIGURE_FLAGS) \
80  && cd build_support \
81  && rm -f yat.pc && make \
82  && $(GREP) '^prefix=/usr/local' yat.pc \
83  && $(GREP) '^exec_prefix=$${prefix}' yat.pc \
84  && $(GREP) '^libdir=$${exec_prefix}/lib' yat.pc \
85  && $(GREP) '^includedir=$${prefix}/include' yat.pc \
86  && rm -f yat.pc && make prefix=foo \
87  && $(GREP) '^prefix=foo' yat.pc \
88  && $(GREP) '^exec_prefix=$${prefix}' yat.pc \
89  && $(GREP) '^libdir=$${exec_prefix}/lib' yat.pc \
90  && $(GREP) '^includedir=$${prefix}/include' yat.pc \
91  && rm -f yat.pc && make prefix=foo exec_prefix=bar \
92  && $(GREP) '^prefix=foo' yat.pc \
93  && $(GREP) '^exec_prefix=bar' yat.pc \
94  && $(GREP) '^libdir=$${exec_prefix}/lib' yat.pc \
95  && $(GREP) '^includedir=$${prefix}/include' yat.pc \
96  && rm -f yat.pc && make prefix=foo exec_prefix=bar libdir=baz includedir=quz\
97  && $(GREP) '^prefix=foo' yat.pc \
98  && $(GREP) '^exec_prefix=bar' yat.pc \
99  && $(GREP) '^libdir=baz' yat.pc \
100  && $(GREP) '^includedir=quz' yat.pc \
101  && cd .. \
102  && $(SHELL) $(srcdir)/configure $(DISTCHECK_CONFIGURE_FLAGS) exec_prefix=/t \
103  && cd build_support \
104  && rm -f yat.pc && make \
105  && $(GREP) '^prefix=/usr/local' yat.pc \
106  && $(GREP) '^exec_prefix=/t' yat.pc \
107  && $(GREP) '^libdir=$${exec_prefix}/lib' yat.pc \
108  && $(GREP) '^includedir=$${prefix}/include' yat.pc \
109  && rm -f yat.pc && make prefix=foo \
110  && $(GREP) '^prefix=foo' yat.pc \
111  && $(GREP) '^exec_prefix=/t' yat.pc \
112  && $(GREP) '^libdir=$${exec_prefix}/lib' yat.pc \
113  && $(GREP) '^includedir=$${prefix}/include' yat.pc \
114  && rm -f yat.pc && make prefix=foo exec_prefix=bar \
115  && $(GREP) '^prefix=foo' yat.pc \
116  && $(GREP) '^exec_prefix=bar' yat.pc \
117  && $(GREP) '^libdir=$${exec_prefix}/lib' yat.pc \
118  && $(GREP) '^includedir=$${prefix}/include' yat.pc \
119  && rm -f yat.pc && make prefix=foo exec_prefix=bar libdir=baz includedir=quz\
120  && $(GREP) '^prefix=foo' yat.pc \
121  && $(GREP) '^exec_prefix=bar' yat.pc \
122  && $(GREP) '^libdir=baz' yat.pc \
123  && $(GREP) '^includedir=quz' yat.pc 
124
125
126include $(srcdir)/am/maintainer.am
Note: See TracBrowser for help on using the repository browser.