source: branches/0.9-stable/Makefile.am @ 1345

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

convenience target for maintainer

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.2 KB
Line 
1## Process this file with automake to produce Makefile.in
2##
3## $Id: Makefile.am 1345 2011-03-04 03:00:56Z peter $
4
5# Copyright (C) 2005, 2006 Jari Häkkinen
6# Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
7# Copyright (C) 2009, 2010, 2011 Peter Johansson
8#
9# This file is part of svndigest, http://dev.thep.lu.se/svndigest
10#
11# svndigest is free software; you can redistribute it and/or modify it
12# under the terms of the GNU General Public License as published by
13# the Free Software Foundation; either version 3 of the License, or
14# (at your option) any later version.
15#
16# svndigest is distributed in the hope that it will be useful, but
17# WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19# General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with svndigest. If not, see <http://www.gnu.org/licenses/>.
23
24# -I arg should be the same as arg in AC_CONFIG_MACRO_DIR in configure.ac
25ACLOCAL_AMFLAGS = -I m4
26
27SUBDIRS = yat lib bin man test
28
29EXTRA_DIST = build_support/move-if-change .release_year
30MOVE_IF_CHANGE = $(SHELL) $(top_srcdir)/build_support/move-if-change
31
32lazycheck recheck: all
33  cd test && $(MAKE) $(AM_MAKEFLAGS) $@
34
35clean-local:
36  rm -rf svndigest *~
37
38.PHONY: .release_year.tmp recheck
39if HAVE_SVN_WC
40# update copyright year automatically (if we build from svn wc)
41$(srcdir)/.release_year: $(builddir)/.release_year.tmp
42  @$(MOVE_IF_CHANGE) $(builddir)/.release_year.tmp $@
43
44$(builddir)/.release_year.tmp:
45  @if ($(SVNVERSION) $(top_srcdir) | $(GREP) M > /dev/null); then \
46     date -u "+%Y" > $@; \
47  else \
48     cp $(srcdir)/.release_year $@; \
49  fi
50endif
51
52
53##############################################################
54##
55## Some rules useful for maintainer
56##
57
58include $(srcdir)/maintainer.am
59
60# called within maintainer-check
61## We do wanna run all tests here since test repository is not
62## included in tarball, and thus some tests are skiped in distcheck.
63MAINTAINER_CHECK_LOCAL = check
64# extra check in release rule
65RELEASE_LOCAL = check-svn_revision
66
67.PHONY: check-svn_revision
68
69check-svn_revision:
70  @$(SVNVERSION) | $(EGREP) '^[0-9]+$$' || \
71  { echo incorrect svn revision - expected single unmodified revision 1>&2; \
72    exit 1; }
73
74# run in end of release target
75RELEASE_HOOK = build_support/Portfile.v$(VERSION)
76
77edit = $(SED) \
78  -e 's|@PACKAGE_URL[@]|$(PACKAGE_URL)|g' \
79  -e 's|@VERSION[@]|$(VERSION)|g'
80
81build_support/Portfile.v$(VERSION): Makefile build_support/Portfile.in
82  @rm -f $@ $@.t
83  @openssl version > /dev/null || exit 1
84  @openssl sha1 $(distdir).tar.gz > $(distdir).tar.gz.sha1
85  @openssl rmd160 $(distdir).tar.gz > $(distdir).tar.gz.rmd160
86  @sha1=`cut -f 2 -d ' ' $(distdir).tar.gz.sha1`;\
87  rmd160=`cut -f 2 -d ' ' $(distdir).tar.gz.rmd160`;\
88  $(edit) -e "s|@SHA1SUM[@]|$$sha1|g" -e "s|@RMD160SUM[@]|$$rmd160|g" \
89  '$(srcdir)/build_support/Portfile.in' > $@.t
90  @chmod a-w $@.t
91  @mv $@.t $@
92  @echo "creating $@"
93
94# create a tag from current stable branch; depends on check-version to
95# ensure that version is macro.minor.micro (no pre suffix), that wc is
96# pristine and updated.
97svn-tag: check-version check-svn-diff
98  svn copy \
99  ^/branches/$(SVNDIGEST_MAJOR_VERSION).$(SVNDIGEST_MINOR_VERSION)-stable\
100  ^/tags/$(VERSION) -m "tagging version $(VERSION)"
Note: See TracBrowser for help on using the repository browser.