From 1d704764a636d3b1618224dbabdcd6e5ae031291 Mon Sep 17 00:00:00 2001 From: Brian Aker Date: Fri, 8 Jun 2012 13:21:10 +0100 Subject: [PATCH] Add in version information for YATL --- Makefile.am | 39 ------------------------------------- configure.ac | 4 +++- libhashkit-1.0/include.am | 4 ++-- libmemcached-1.0/include.am | 4 ++-- libmemcached-1.2/include.am | 4 ++-- libmemcached-2.0/include.am | 8 ++++---- libtest/include.am | 4 ++++ libtest/version.h.in | 12 +++++++----- libtest/yatl.m4 | 7 +++++++ rpm.am | 39 +++++++++++++++++++++++++++++++++++++ 10 files changed, 70 insertions(+), 55 deletions(-) create mode 100644 libtest/yatl.m4 create mode 100644 rpm.am diff --git a/Makefile.am b/Makefile.am index 127c071a..b4338106 100644 --- a/Makefile.am +++ b/Makefile.am @@ -60,45 +60,6 @@ TESTS += ${check_PROGRAMS} EXTRA_DIST+= ${man_MANS} -fedora: - @rm -f ~/rpmbuild/RPMS/x86_64/libmemcached-$(VERSION)*.rpm - @rm -f ~/rpmbuild/SRPMS/libmemcached-$(VERSION)*.rpm - @mkdir -p ~/rpmbuild/SOURCES/ - @mkdir -p ~/rpmbuild/RPMS/x86_64/ - @mkdir -p ~/rpmbuild/SRPMS/ - @cp libmemcached-$(VERSION).tar.gz ~/rpmbuild/SOURCES/ - @rpmbuild -ba support/libmemcached.spec - @cp ~/rpmbuild/RPMS/x86_64/libmemcached-$(VERSION)*.rpm . - @cp ~/rpmbuild/SRPMS/libmemcached-$(VERSION)*.rpm . - -generic: support/libmemcached.spec - @mkdir -p ~/rpmbuild/SOURCES/ - @mkdir -p ~/rpmbuild/RPMS/x86_64/ - @mkdir -p ~/rpmbuild/SRPMS/ - @rm -f ~/rpmbuild/RPMS/x86_64/libmemcached-$(VERSION)*.rpm - @rm -f ~/rpmbuild/SRPMS/libmemcached-$(VERSION)*.rpm - @cp libmemcached-$(VERSION).tar.gz ~/rpmbuild/SOURCES/ - @rpmbuild -ba support/libmemcached.spec - @cp ~/rpmbuild/RPMS/x86_64/libmemcached-$(VERSION)*.rpm . - @cp ~/rpmbuild/RPMS/x86_64/libmemcached-devel-$(VERSION)*.rpm . - @cp ~/rpmbuild/RPMS/x86_64/libmemcached-debuginfo-$(VERSION)*.rpm . - @cp ~/rpmbuild/SRPMS/libmemcached-$(VERSION)*.rpm . - -clean_rpm: - @rm -f *.tar.gz - @rm -f *.src.rpm - @rm -f *.rpm - -rpm: clean_rpm man distcheck generic - -release: rpm - @rpm --addsign libmemcached-$(VERSION)*.rpm . - @rpm --checksig libmemcached-$(VERSION)*.rpm . - @rpm --addsign libmemcached-devel-$(VERSION)*.rpm . - @rpm --checksig libmemcached-devel-$(VERSION)*.rpm . - @rpm --addsign libmemcached-debuginfo-$(VERSION)*.rpm . - @rpm --checksig libmemcached-debuginfo-$(VERSION)*.rpm . - merge-clean: @find ./ | $(GREP) \.gcda | xargs rm -f @find ./ | $(GREP) \.gcno | xargs rm -f diff --git a/configure.ac b/configure.ac index 588e1f61..9b54afb4 100644 --- a/configure.ac +++ b/configure.ac @@ -63,6 +63,9 @@ AX_CXX_HEADER_STDCXX_98 AC_MSG_ERROR([Your system lacks a new enough C++ compiler]) fi +# Adding support for libtest +m4_include([libtest/yatl.m4]) + m4_include([m4/memcached.m4]) m4_include([m4/memcached_sasl.m4]) m4_include([m4/gearmand.m4]) @@ -306,7 +309,6 @@ AC_CONFIG_FILES([ support/libmemcached.pc support/libmemcached.spec support/libmemcached-fc.spec - libtest/version.h ]) AC_OUTPUT diff --git a/libhashkit-1.0/include.am b/libhashkit-1.0/include.am index ed36113e..a5f849c8 100644 --- a/libhashkit-1.0/include.am +++ b/libhashkit-1.0/include.am @@ -3,8 +3,8 @@ # All paths should be given relative to the root # -EXTRA_DIST+= \ - libhashkit-1.0/configure.h.in +EXTRA_DIST+= libhashkit-1.0/configure.h.in +BUILT_SOURCES+= libhashkit-1.0/configure.h nobase_include_HEADERS+= \ libhashkit-1.0/algorithm.h \ diff --git a/libmemcached-1.0/include.am b/libmemcached-1.0/include.am index 08066859..a5cd175b 100644 --- a/libmemcached-1.0/include.am +++ b/libmemcached-1.0/include.am @@ -2,8 +2,8 @@ # included from Top Level Makefile.am # All paths should be given relative to the root -EXTRA_DIST+= \ - libmemcached-1.0/configure.h.in +EXTRA_DIST+= libmemcached-1.0/configure.h.in +BUILT_SOURCES+= libmemcached-1.0/configure.h include libmemcached-1.0/struct/include.am include libmemcached-1.0/types/include.am diff --git a/libmemcached-1.2/include.am b/libmemcached-1.2/include.am index fb319bcd..061b79de 100644 --- a/libmemcached-1.2/include.am +++ b/libmemcached-1.2/include.am @@ -5,8 +5,8 @@ include libmemcached-1.2/t/include.am -EXTRA_DIST+= \ - libmemcached-1.2/configure.h.in +BUILT_SOURCES+= libmemcached-1.2/configure.h +EXTRA_DIST+= libmemcached-1.2/configure.h.in nobase_include_HEADERS+= \ libmemcached-1.2/allocators.h \ diff --git a/libmemcached-2.0/include.am b/libmemcached-2.0/include.am index fa537505..8d7a0661 100644 --- a/libmemcached-2.0/include.am +++ b/libmemcached-2.0/include.am @@ -4,9 +4,9 @@ # This is not a public interface yet. -EXTRA_DIST+= \ - libmemcached-1.2/configure.h.in +BUILT_SOURCES+= libmemcached-2.0/configure.h -noinst_HEADERS+= \ - libmemcached-1.2/memcached.h +EXTRA_DIST+= libmemcached-1.2/configure.h.in + +noinst_HEADERS+= libmemcached-1.2/memcached.h diff --git a/libtest/include.am b/libtest/include.am index cb393a22..ecec6aab 100644 --- a/libtest/include.am +++ b/libtest/include.am @@ -31,6 +31,7 @@ drd: @echo make check TESTS_ENVIRONMENT="\"$(DRD_COMMAND)\"" EXTRA_DIST+= libtest/run.gdb +EXTRA_DIST+= libtest/version.h CLEANFILES+= tmp_chroot/etc/* CLEANFILES+= tmp_chroot/var/drizzle/* @@ -38,6 +39,8 @@ CLEANFILES+= tmp_chroot/var/log/* CLEANFILES+= tmp_chroot/var/run/* CLEANFILES+= tmp_chroot/var/tmp/* +BUILT_SOURCES+= libtest/version.h + .PHONY: distclean-libtest-check distclean-libtest-check: -rm -rf tmp_chroot @@ -80,6 +83,7 @@ noinst_HEADERS+= libtest/test.h noinst_HEADERS+= libtest/test.hpp noinst_HEADERS+= libtest/tmpfile.hpp noinst_HEADERS+= libtest/vchar.hpp +noinst_HEADERS+= libtest/version.h noinst_HEADERS+= libtest/visibility.h noinst_HEADERS+= libtest/wait.h diff --git a/libtest/version.h.in b/libtest/version.h.in index ca154a00..f2af4442 100644 --- a/libtest/version.h.in +++ b/libtest/version.h.in @@ -1,8 +1,9 @@ /* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library * - * Data Differential YATL (i.e. libtest) library - * - * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -34,7 +35,8 @@ * */ + #pragma once -#define LIBTEST_VERSION_STRING "@VERSION@" -#define LIBTEST_VERSION_HEX @HEX_VERSION@ +#define LIBTEST_VERSION @LIBTEST_VERSION@ +#define LIBTEST_VERSION_STRING "@LIBTEST_VERSION@" diff --git a/libtest/yatl.m4 b/libtest/yatl.m4 new file mode 100644 index 00000000..2ad333d5 --- /dev/null +++ b/libtest/yatl.m4 @@ -0,0 +1,7 @@ +dnl Copyright (C) 2012 Data Differential, LLC. +dnl This file is free software; Data Differential, LLC. +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_SUBST([LIBTEST_VERSION], [1.0]) +AC_CONFIG_FILES([libtest/version.h]) diff --git a/rpm.am b/rpm.am new file mode 100644 index 00000000..72763f8d --- /dev/null +++ b/rpm.am @@ -0,0 +1,39 @@ +# vim:ft=automake + +rpm-build: support/$(PACKAGE).spec + @rm -f *.rpm + @rm -f ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-$(VERSION)*.rpm + @rm -f ~/rpmbuild/SRPMS/$(PACKAGE)-$(VERSION)*.rpm + @mkdir -p ~/rpmbuild/BUILD/ + @mkdir -p ~/rpmbuild/RPMS/i386/ + @mkdir -p ~/rpmbuild/RPMS/i686/ + @mkdir -p ~/rpmbuild/RPMS/noarch/ + @mkdir -p ~/rpmbuild/RPMS/x86_64/ + @mkdir -p ~/rpmbuild/SOURCES/ + @mkdir -p ~/rpmbuild/SPECS/ + @mkdir -p ~/rpmbuild/SRPMS/ + @cp $(PACKAGE)-$(VERSION).tar.gz ~/rpmbuild/SOURCES/ + @cp support/$(PACKAGE).init ~/rpmbuild/SOURCES/ + @rpmbuild -ba support/$(PACKAGE).spec + @cp ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-$(VERSION)*.rpm . + @cp ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-devel-$(VERSION)*.rpm . + @cp ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-debuginfo-$(VERSION)*.rpm . + @cp ~/rpmbuild/RPMS/x86_64/$(PACKAGE)-server-$(VERSION)*.rpm . + @cp ~/rpmbuild/SRPMS/$(PACKAGE)-$(VERSION)*.rpm . + +rpm-sign: rpm-build + @rpm --addsign *.rpm + @rpm --checksig *.rpm + +rpm: support/$(PACKAGE).spec man distcheck rpm-build + +release: rpm rpm-sign + +merge-clean: + @find ./ | $(GREP) \.moved | xargs rm -r -f + @find ./ | $(GREP) \.orig | xargs rm -f + @find ./ | $(GREP) \.rej | xargs rm -f + @find ./ | $(GREP) \~$$ | xargs rm -f + @echo "The follow files need to be removed or checked in:" + @bzr unknowns + -- 2.30.2