[2] | 1 | ## Process this file with automake to produce Makefile.in |
---|
| 2 | ## |
---|
| 3 | ## $Id: Makefile.am 1525 2012-10-01 06:31:07Z peter $ |
---|
| 4 | |
---|
[978] | 5 | # Copyright (C) 2005, 2006 Jari Häkkinen |
---|
| 6 | # Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson |
---|
[1495] | 7 | # Copyright (C) 2009, 2010, 2011, 2012 Peter Johansson |
---|
[84] | 8 | # |
---|
[687] | 9 | # This file is part of svndigest, http://dev.thep.lu.se/svndigest |
---|
[84] | 10 | # |
---|
[149] | 11 | # svndigest is free software; you can redistribute it and/or modify it |
---|
[84] | 12 | # under the terms of the GNU General Public License as published by |
---|
[693] | 13 | # the Free Software Foundation; either version 3 of the License, or |
---|
[84] | 14 | # (at your option) any later version. |
---|
| 15 | # |
---|
[149] | 16 | # svndigest is distributed in the hope that it will be useful, but |
---|
[84] | 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 |
---|
[693] | 22 | # along with svndigest. If not, see <http://www.gnu.org/licenses/>. |
---|
[84] | 23 | |
---|
[720] | 24 | # -I arg should be the same as arg in AC_CONFIG_MACRO_DIR in configure.ac |
---|
[821] | 25 | ACLOCAL_AMFLAGS = -I m4 |
---|
[720] | 26 | |
---|
[1337] | 27 | ## need to declare these variables here so they can be appended below |
---|
[1440] | 28 | BUILT_SOURCES = |
---|
| 29 | CLEANFILES = |
---|
| 30 | CONFIG_STATUS_DEPENDENCIES = |
---|
[1337] | 31 | DISTCLEANFILES = |
---|
[1440] | 32 | EXTRA_DIST = |
---|
[1525] | 33 | MAINTAINERCLEANFILES = |
---|
[909] | 34 | |
---|
[1525] | 35 | AM_CPPFLAGS = $(SVNDIGEST_CPPFLAGS) |
---|
| 36 | AM_CXXFLAGS = $(SVNDIGEST_CXXFLAGS) |
---|
| 37 | AM_LDFLAGS = $(SVNDIGEST_LDFLAGS) |
---|
| 38 | |
---|
| 39 | noinst_HEADERS = |
---|
| 40 | noinst_LIBRARIES = |
---|
| 41 | |
---|
| 42 | clean-local:; rm -rf test/testSubDir Fetchdir |
---|
| 43 | |
---|
| 44 | include bin/Makefile.am |
---|
| 45 | include lib/Makefile.am |
---|
| 46 | include man/Makefile.am |
---|
| 47 | include test/Makefile.am |
---|
| 48 | include yat/Makefile.am |
---|
| 49 | |
---|
[1337] | 50 | include $(top_srcdir)/svn_revision.am |
---|
| 51 | include $(top_srcdir)/svn_revision_header.am |
---|
[909] | 52 | |
---|
[1337] | 53 | include $(top_srcdir)/svn_release_year.am |
---|
| 54 | |
---|
[874] | 55 | ############################################################## |
---|
| 56 | ## |
---|
| 57 | ## Some rules useful for maintainer |
---|
| 58 | ## |
---|
| 59 | |
---|
| 60 | include $(srcdir)/maintainer.am |
---|
| 61 | |
---|
| 62 | # called within maintainer-check |
---|
| 63 | ## We do wanna run all tests here since test repository is not |
---|
[1452] | 64 | ## included in tarball, and thus some tests are skipped in distcheck. |
---|
[1063] | 65 | MAINTAINER_CHECK_LOCAL = check |
---|
[1452] | 66 | ## syntax-check called within maintainer-check |
---|
| 67 | MAINTAINER_CHECK_LOCAL += syntax-check |
---|
[874] | 68 | # extra check in release rule |
---|
[1470] | 69 | RELEASE_LOCAL = check-svn_revision check-readme check-openssl |
---|
[1003] | 70 | |
---|
[1470] | 71 | .PHONY: check-svn_revision check-openssl |
---|
[1003] | 72 | |
---|
[1392] | 73 | FORCE: |
---|
| 74 | |
---|
[1470] | 75 | check-openssl: |
---|
| 76 | @openssl version > /dev/null || exit 1 |
---|
| 77 | |
---|
[1003] | 78 | check-svn_revision: |
---|
| 79 | @$(SVNVERSION) | $(EGREP) '^[0-9]+$$' || \ |
---|
| 80 | { echo incorrect svn revision - expected single unmodified revision 1>&2; \ |
---|
[1182] | 81 | exit 1; } |
---|
| 82 | |
---|
[1308] | 83 | check-readme: |
---|
| 84 | (ver_am=1.11\ |
---|
| 85 | && $(GREP) "AM_INIT_AUTOMAKE.*$$ver_am" $(srcdir)/configure.ac \ |
---|
| 86 | && $(GREP) "Automake $$ver_am" $(srcdir)/README.developer)>/dev/null || exit 1 |
---|
| 87 | (ver_ac=2.63\ |
---|
| 88 | && $(GREP) "AC_PREREQ.*$$ver_ac" $(srcdir)/configure.ac \ |
---|
| 89 | && $(GREP) "Autoconf $$ver_ac" $(srcdir)/README.developer)>/dev/null || exit 1 |
---|
| 90 | |
---|
| 91 | |
---|
| 92 | |
---|
[1182] | 93 | # run in end of release target |
---|
[1392] | 94 | RELEASE_HOOK = build_support/Portfile.diff |
---|
[1182] | 95 | |
---|
[1392] | 96 | macport_url = http://svn.macports.org/repository/macports/trunk/dports/devel/svndigest |
---|
| 97 | |
---|
| 98 | build_support/Portfile.diff: build_support/Portfile FORCE |
---|
| 99 | test -e build_support/macport \ |
---|
| 100 | || svn co $(macport_url) build_support/macport |
---|
| 101 | svn revert -R build_support/macport |
---|
| 102 | svn update build_support/macport |
---|
[1440] | 103 | cp build_support/Portfile build_support/macport/Portfile |
---|
[1392] | 104 | svn diff build_support/macport/Portfile > $@ |
---|
| 105 | svn revert build_support/macport/Portfile |
---|
| 106 | |
---|
[1182] | 107 | edit = $(SED) \ |
---|
| 108 | -e 's|@PACKAGE_URL[@]|$(PACKAGE_URL)|g' \ |
---|
| 109 | -e 's|@VERSION[@]|$(VERSION)|g' |
---|
| 110 | |
---|
[1470] | 111 | build_support/Portfile: $(distdir).tar.gz Makefile build_support/Portfile.in check-openssl |
---|
[1182] | 112 | @rm -f $@ $@.t |
---|
[1470] | 113 | @openssl sha256 $(distdir).tar.gz > $(distdir).tar.gz.sha256 |
---|
[1264] | 114 | @openssl rmd160 $(distdir).tar.gz > $(distdir).tar.gz.rmd160 |
---|
[1470] | 115 | @sha256=`cut -f 2 -d ' ' $(distdir).tar.gz.sha256`;\ |
---|
[1264] | 116 | rmd160=`cut -f 2 -d ' ' $(distdir).tar.gz.rmd160`;\ |
---|
[1470] | 117 | $(edit) -e "s|@SHA256SUM[@]|$$sha256|g" \ |
---|
| 118 | -e "s|@RMD160SUM[@]|$$rmd160|g" \ |
---|
[1315] | 119 | '$(srcdir)/build_support/Portfile.in' > $@.t |
---|
[1182] | 120 | @chmod a-w $@.t |
---|
| 121 | @mv $@.t $@ |
---|
| 122 | @echo "creating $@" |
---|
[1373] | 123 | |
---|
[1495] | 124 | STABLE_VERSION = $(SVNDIGEST_MAJOR_VERSION).$(SVNDIGEST_MINOR_VERSION) |
---|
| 125 | STABLE_BRANCH = ^/branches/$(STABLE_VERSION)-stable |
---|
| 126 | |
---|
[1373] | 127 | # create a tag from current stable branch; depends on check-version to |
---|
| 128 | # ensure that version is macro.minor.micro (no pre suffix), that wc is |
---|
| 129 | # pristine and updated. |
---|
| 130 | svn-tag: check-version check-svn-diff |
---|
[1495] | 131 | svn copy $(STABLE_BRANCH) ^/tags/$(VERSION) \ |
---|
| 132 | -m "tagging version $(VERSION)" |
---|
[1440] | 133 | |
---|
[1495] | 134 | # create a stable-branch from trunk |
---|
| 135 | svn-stable-branch: check-svn-diff all |
---|
| 136 | svn copy ^/trunk $(STABLE_BRANCH) \ |
---|
| 137 | -m "New stable branch $(STABLE_VERSION)" \ |
---|
| 138 | && svn co $(STABLE_BRANCH) ../svndigest-$(STABLE_VERSION).x \ |
---|
| 139 | && bin/svndigest-copy-cache -v -t ../svndigest-$(STABLE_VERSION).x |
---|
| 140 | |
---|
[1440] | 141 | syntax-check: assert-header-without-use \ |
---|
| 142 | assert-without-header \ |
---|
| 143 | errno-header-without-use |
---|
| 144 | |
---|
| 145 | assert-header-without-use: |
---|
| 146 | @files=`grep -l "^#include *<cassert>" $(srcdir)/*/*.cc`;\ |
---|
| 147 | grep -L "assert *(" $$files | grep $(srcdir) && \ |
---|
| 148 | { echo "$@: in files listed above"; exit 1; } || :; |
---|
| 149 | |
---|
| 150 | assert-without-header: |
---|
| 151 | @files=`grep -l "assert *(" $(srcdir)/*/*.cc`;\ |
---|
| 152 | grep -L "^#include *<cassert>" $$files | grep $(srcdir) && \ |
---|
| 153 | { echo "$@: in files listed above"; exit 1; } || :; |
---|
| 154 | |
---|
| 155 | errno-header-without-use: |
---|
[1441] | 156 | @files=`grep -l "^#include *<cerrno>" $(srcdir)/*/*.cc`;\ |
---|
[1440] | 157 | test -n "$$files" || exit 0;\ |
---|
| 158 | grep -LE "[^ \t\(=]errno" $$files | grep $(srcdir) && \ |
---|
| 159 | { echo "$@: in files listed above"; exit 1; } || :; |
---|