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

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

Apply [1412] in stable-branch where it was intended. Using sha256 after feedback from port maintainer.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.7 KB
Line 
1## Process this file with automake to produce Makefile.in
2##
3## $Id: Makefile.am 1414 2011-10-23 15:43:27Z 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 check-openssl
66
67.PHONY: check-svn_revision check-openssl
68
69FORCE:
70
71check-openssl:
72  @openssl version > /dev/null || exit 1
73
74check-svn_revision:
75  @$(SVNVERSION) | $(EGREP) '^[0-9]+$$' || \
76  { echo incorrect svn revision - expected single unmodified revision 1>&2; \
77    exit 1; }
78
79# run in end of release target
80RELEASE_HOOK = build_support/Portfile.diff
81
82macport_url = http://svn.macports.org/repository/macports/trunk/dports/devel/svndigest
83
84build_support/Portfile.diff: build_support/Portfile FORCE
85  test -e build_support/macport \
86  || svn co $(macport_url) build_support/macport
87  svn revert -R build_support/macport
88  svn update build_support/macport
89  cp build_support/Portfile build_support/macport/Portfile
90  svn diff build_support/macport/Portfile > $@
91  svn revert build_support/macport/Portfile
92
93edit = $(SED) \
94  -e 's|@PACKAGE_URL[@]|$(PACKAGE_URL)|g' \
95  -e 's|@VERSION[@]|$(VERSION)|g'
96
97build_support/Portfile: $(distdir).tar.gz Makefile build_support/Portfile.in check-openssl
98  @rm -f $@ $@.t
99  @openssl sha256 $(distdir).tar.gz > $(distdir).tar.gz.sha256
100  @openssl rmd160 $(distdir).tar.gz > $(distdir).tar.gz.rmd160
101  @sha256=`cut -f 2 -d ' ' $(distdir).tar.gz.sha256`;\
102  rmd160=`cut -f 2 -d ' ' $(distdir).tar.gz.rmd160`;\
103  $(edit) -e "s|@SHA256SUM[@]|$$sha256|g" \
104  -e "s|@RMD160SUM[@]|$$rmd160|g" \
105  '$(srcdir)/build_support/Portfile.in' > $@.t
106  @chmod a-w $@.t
107  @mv $@.t $@
108  @echo "creating $@"
109
110# create a tag from current stable branch; depends on check-version to
111# ensure that version is macro.minor.micro (no pre suffix), that wc is
112# pristine and updated.
113svn-tag: check-version check-svn-diff
114  svn copy \
115  ^/branches/$(SVNDIGEST_MAJOR_VERSION).$(SVNDIGEST_MINOR_VERSION)-stable\
116  ^/tags/$(VERSION) -m "tagging version $(VERSION)"
Note: See TracBrowser for help on using the repository browser.