Add in version information for YATL
authorBrian Aker <brian@tangent.org>
Fri, 8 Jun 2012 12:21:10 +0000 (13:21 +0100)
committerBrian Aker <brian@tangent.org>
Fri, 8 Jun 2012 12:21:10 +0000 (13:21 +0100)
Makefile.am
configure.ac
libhashkit-1.0/include.am
libmemcached-1.0/include.am
libmemcached-1.2/include.am
libmemcached-2.0/include.am
libtest/include.am
libtest/version.h.in
libtest/yatl.m4 [new file with mode: 0644]
rpm.am [new file with mode: 0644]

index 127c071a17647d8bc95172fa084e42251e080950..b43381069b13f5fd32f1755f93c3915c72bc43a9 100644 (file)
@@ -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
index 588e1f6123df924f7f98e8f32082a95f32d702a0..9b54afb4d01b33feb5d61795450042baa1900f77 100644 (file)
@@ -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
 
index ed36113ef49b5d991802e2fbd618016b6fbe9d56..a5f849c8bf55a9b2ea56b1d1cc56b30c54a97cc9 100644 (file)
@@ -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 \
index 0806685949995586bbf61a8ad807eeac0fde5a22..a5cd175b23be084dd0d382d67f044eee4192ff99 100644 (file)
@@ -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
index fb319bcdf01335265dc4c6a6dbbf7d73f8562849..061b79de02b61089c12c1df326177de56a65e164 100644 (file)
@@ -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 \
index fa53750559664691743167792cb19fec7009c61e..8d7a06611547c74d39c9067d44fbe56ce1ddcbe2 100644 (file)
@@ -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
 
index cb393a221d0453873b88bdecd8d80b53a5ad846d..ecec6aab29efbd34793955409bdc6c6424f51b27 100644 (file)
@@ -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
 
index ca154a00d2a2257161831b27d125aca9c75057f9..f2af4442eb79649f9c27761e181d05cd7413c32b 100644 (file)
@@ -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 (file)
index 0000000..2ad333d
--- /dev/null
@@ -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 (file)
index 0000000..72763f8
--- /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
+