From d16ae4ed95b3ccb317baf3a8d7fd7b56c58599a2 Mon Sep 17 00:00:00 2001 From: Heinz Mauelshagen Date: Fri, 16 Dec 2011 14:24:44 +0100 Subject: [PATCH 1/9] specfile name change and man page install Makefile.in fixes [Milan] --- Makefile.in | 5 ++++- ...isioning-tools.spec => device-mapper-persistent-data.spec | 2 +- mk_release | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) rename thin-provisioning-tools.spec => device-mapper-persistent-data.spec (95%) diff --git a/Makefile.in b/Makefile.in index 5dfcb42..ae9a070 100644 --- a/Makefile.in +++ b/Makefile.in @@ -41,6 +41,7 @@ LIBS=-lstdc++ INSTALL=@INSTALL@ DESTDIR=@prefix@ BINDIR=$(DESTDIR)/sbin +MANPATH=$(DESTDIR)$(MANDIR) .PHONEY: test-programs @@ -94,7 +95,9 @@ install: $(PROGRAMS) $(INSTALL) -m 755 -D thin_repair $(BINDIR)/thin_repair $(INSTALL) -m 755 -D thin_dump $(BINDIR)/thin_dump $(INSTALL) -m 755 -D thin_restore $(BINDIR)/thin_restore - $(INSTALL) -m 644 man8/* $(MANDIR)/man8 + $(INSTALL) -m 644 -D man8/thin_repair.8 $(MANPATH)/man8/thin_repair.8 + $(INSTALL) -m 644 -D man8/thin_dump.8 $(MANPATH)/man8/thin_dump.8 + $(INSTALL) -m 644 -D man8/thin_restore.8 $(MANPATH)/man8/thin_restore.8 -include $(subst .cc,.d,$(SOURCE)) -include $(subst .cc,.d,$(TEST_SOURCE)) diff --git a/thin-provisioning-tools.spec b/device-mapper-persistent-data.spec similarity index 95% rename from thin-provisioning-tools.spec rename to device-mapper-persistent-data.spec index eef41d3..f03f840 100644 --- a/thin-provisioning-tools.spec +++ b/device-mapper-persistent-data.spec @@ -24,7 +24,7 @@ manage device-mapper thin provisioning target metadata devices. %configure --enable-debug --enable-testing %install -make DESTDIR=%{buildroot} install +make DESTDIR=%{buildroot} MANDIR=%{_mandir} install %clean diff --git a/mk_release b/mk_release index a437647..2a4fa68 100644 --- a/mk_release +++ b/mk_release @@ -16,6 +16,7 @@ mkdir $dir git clone . $dir cd $dir git checkout $tag +autoreconf rm -rf .git cd $tmp tar jcvf $orig_dir/thin-provisioning-tools-$tag.tar.bz2 thin-provisioning-tools-$tag From 4271e592ae9594b637c170e703976fba126f6e4a Mon Sep 17 00:00:00 2001 From: Heinz Mauelshagen Date: Fri, 16 Dec 2011 14:28:38 +0100 Subject: [PATCH 2/9] Add -s install option to programs --- Makefile.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.in b/Makefile.in index ae9a070..4a4f396 100644 --- a/Makefile.in +++ b/Makefile.in @@ -92,9 +92,9 @@ clean: .PHONEY: install install: $(PROGRAMS) - $(INSTALL) -m 755 -D thin_repair $(BINDIR)/thin_repair - $(INSTALL) -m 755 -D thin_dump $(BINDIR)/thin_dump - $(INSTALL) -m 755 -D thin_restore $(BINDIR)/thin_restore + $(INSTALL) -m 755 -D -s thin_repair $(BINDIR)/thin_repair + $(INSTALL) -m 755 -D -s thin_dump $(BINDIR)/thin_dump + $(INSTALL) -m 755 -D -s thin_restore $(BINDIR)/thin_restore $(INSTALL) -m 644 -D man8/thin_repair.8 $(MANPATH)/man8/thin_repair.8 $(INSTALL) -m 644 -D man8/thin_dump.8 $(MANPATH)/man8/thin_dump.8 $(INSTALL) -m 644 -D man8/thin_restore.8 $(MANPATH)/man8/thin_restore.8 From e286c7d6aadfd5824c0477fa59ce75be038fb75e Mon Sep 17 00:00:00 2001 From: Heinz Mauelshagen Date: Fri, 16 Dec 2011 19:33:30 +0100 Subject: [PATCH 3/9] Remove -s (install) -s which broke debuginfo --- Makefile.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.in b/Makefile.in index 4a4f396..ae9a070 100644 --- a/Makefile.in +++ b/Makefile.in @@ -92,9 +92,9 @@ clean: .PHONEY: install install: $(PROGRAMS) - $(INSTALL) -m 755 -D -s thin_repair $(BINDIR)/thin_repair - $(INSTALL) -m 755 -D -s thin_dump $(BINDIR)/thin_dump - $(INSTALL) -m 755 -D -s thin_restore $(BINDIR)/thin_restore + $(INSTALL) -m 755 -D thin_repair $(BINDIR)/thin_repair + $(INSTALL) -m 755 -D thin_dump $(BINDIR)/thin_dump + $(INSTALL) -m 755 -D thin_restore $(BINDIR)/thin_restore $(INSTALL) -m 644 -D man8/thin_repair.8 $(MANPATH)/man8/thin_repair.8 $(INSTALL) -m 644 -D man8/thin_dump.8 $(MANPATH)/man8/thin_dump.8 $(INSTALL) -m 644 -D man8/thin_restore.8 $(MANPATH)/man8/thin_restore.8 From b93e5a8a6fb5daa660dd220e9f980da69983f3e7 Mon Sep 17 00:00:00 2001 From: Heinz Mauelshagen Date: Fri, 16 Dec 2011 19:40:03 +0100 Subject: [PATCH 4/9] Fix CXX= in Makefile.in --- Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index ae9a070..0f0f067 100644 --- a/Makefile.in +++ b/Makefile.in @@ -31,7 +31,7 @@ PROGRAM_SOURCE=\ thin_repair.cc \ thin_restore.cc -CXX=g++ +CXX=@CXX@ OBJECTS=$(subst .cc,.o,$(SOURCE)) TOP_DIR:=@top_srcdir@ CXXFLAGS=-Wall -I$(TOP_DIR) From e2d68de5627b1a078249d503162e588b1be08002 Mon Sep 17 00:00:00 2001 From: Heinz Mauelshagen Date: Wed, 21 Dec 2011 11:04:00 +0100 Subject: [PATCH 5/9] - add licence - try to fix up --enable-testing, but most unit tests don't compile (include file changes?) or run (missing data?) at present - support building in different dir from src - add 'distclean' target and don't build .d files when cleaning - rebuild if Makefile changes (didn't bother triggering a build [Alasdair Kergon] --- Makefile.in | 92 +++++++++++++++++++++++++++------------ configure.in | 9 ++-- unit-tests/Makefile.in.in | 42 +++++++++++++----- 3 files changed, 99 insertions(+), 44 deletions(-) diff --git a/Makefile.in b/Makefile.in index 0f0f067..9df122e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,3 +1,21 @@ +# Copyright (C) 2011 Red Hat, Inc. All rights reserved. +# +# This file is part of the thin-provisioning-tools source. +# +# thin-provisioning-tools is free software: you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# thin-provisioning-tools is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with thin-provisioning-tools. If not, see +# . + .PHONEY: all PROGRAMS=\ @@ -31,31 +49,41 @@ PROGRAM_SOURCE=\ thin_repair.cc \ thin_restore.cc -CXX=@CXX@ -OBJECTS=$(subst .cc,.o,$(SOURCE)) +CXX:=@CXX@ +OBJECTS:=$(subst .cc,.o,$(SOURCE)) TOP_DIR:=@top_srcdir@ -CXXFLAGS=-Wall -I$(TOP_DIR) +TOP_BUILDDIR:=@top_builddir@ +CXXFLAGS+=-Wall CXXFLAGS+=@CXXOPTIMISE_FLAG@ CXXFLAGS+=@CXXDEBUG_FLAG@ -LIBS=-lstdc++ -INSTALL=@INSTALL@ -DESTDIR=@prefix@ -BINDIR=$(DESTDIR)/sbin -MANPATH=$(DESTDIR)$(MANDIR) +INCLUDES+=-I$(TOP_BUILDDIR) -I$(TOP_DIR) +LIBS:=-lstdc++ +LIBEXPAT:=-lexpat +INSTALL:=@INSTALL@ +STRIP= +DESTDIR:=@prefix@ +BINDIR:=$(DESTDIR)/sbin +MANPATH:=$(DESTDIR)$(MANDIR) + +vpath %.cc $(TOP_DIR) + +INSTALL_DIR = $(INSTALL) -m 755 -d +INSTALL_PROGRAM = $(INSTALL) -m 755 $(STRIP) +INSTALL_DATA = $(INSTALL) -p -m 644 .PHONEY: test-programs test-programs: $(TEST_PROGRAMS) -.SUFFIXES: .cc .o .d +.SUFFIXES: .d -.cc.d: - $(CXX) -MM -MT $(subst .cc,.o,$<) $(CXXFLAGS) $< > $@.$$$$; \ - sed 's,\([^ :]*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \ - rm -f $@.$$$$ +%.d: %.cc + $(CXX) -MM -MT $(subst .cc,.o,$<) $(INCLUDES) $(CXXFLAGS) $< > $@.$$$$;\ + sed 's,\([^ :]*\)\.o[ :]*,\1.o $@ : Makefile ,g' < $@.$$$$ > $@; \ + $(RM) $@.$$$$ -.cc.o: - $(CXX) -c $(CXXFLAGS) $(INCLUDES) -o $@ $< +%.o: %.cc + $(CXX) -c $(INCLUDES) $(CXXFLAGS) -o $@ $< THIN_DUMP_SOURCE=$(SOURCE) THIN_RESTORE_SOURCE=$(SOURCE) @@ -78,31 +106,37 @@ THIN_RESTORE_OBJECTS=$(subst .cc,.o,$(THIN_RESTORE_SOURCE)) THIN_REPAIR_OBJECTS=$(subst .cc,.o,$(THIN_REPAIR_SOURCE)) thin_dump: $(THIN_DUMP_OBJECTS) thin_dump.o - $(CXX) $(CXXFLAGS) -o $@ $+ $(LIBS) -lexpat + $(CXX) $(CXXFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT) thin_restore: $(THIN_RESTORE_OBJECTS) thin_restore.o - $(CXX) $(CXXFLAGS) -o $@ $+ $(LIBS) -lexpat + $(CXX) $(CXXFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT) thin_repair: $(THIN_REPAIR_OBJECTS) thin_repair.o $(CXX) $(CXXFLAGS) -o $@ $+ $(LIBS) -.PHONEY: clean +.PHONEY: clean distclean clean: - rm -f *.o unit-tests/*.o *.d unit-tests/*.d $(TEST_PROGRAMS) $(PROGRAMS) + $(RM) *.o unit-tests/*.o *.d unit-tests/*.d $(TEST_PROGRAMS) $(PROGRAMS) +distclean: clean + $(RM) config.cache config.log config.status configure.h version.h Makefile unit-tests/Makefile.in .PHONEY: install install: $(PROGRAMS) - $(INSTALL) -m 755 -D thin_repair $(BINDIR)/thin_repair - $(INSTALL) -m 755 -D thin_dump $(BINDIR)/thin_dump - $(INSTALL) -m 755 -D thin_restore $(BINDIR)/thin_restore - $(INSTALL) -m 644 -D man8/thin_repair.8 $(MANPATH)/man8/thin_repair.8 - $(INSTALL) -m 644 -D man8/thin_dump.8 $(MANPATH)/man8/thin_dump.8 - $(INSTALL) -m 644 -D man8/thin_restore.8 $(MANPATH)/man8/thin_restore.8 + $(INSTALL_DIR) $(BINDIR) + $(INSTALL_PROGRAM) thin_repair $(BINDIR)/thin_repair + $(INSTALL_PROGRAM) thin_dump $(BINDIR)/thin_dump + $(INSTALL_PROGRAM) thin_restore $(BINDIR)/thin_restore + $(INSTALL_DIR) $(MANPATH)/man8 + $(INSTALL_DATA) man8/thin_repair.8 $(MANPATH)/man8/thin_repair.8 + $(INSTALL_DATA) man8/thin_dump.8 $(MANPATH)/man8/thin_dump.8 + $(INSTALL_DATA) man8/thin_restore.8 $(MANPATH)/man8/thin_restore.8 --include $(subst .cc,.d,$(SOURCE)) --include $(subst .cc,.d,$(TEST_SOURCE)) --include $(subst .cc,.d,$(PROGRAM_SOURCE)) +ifeq (,$(findstring $(MAKECMDGOALS),clean distclean)) + -include $(subst .cc,.d,$(SOURCE)) + -include $(subst .cc,.d,$(TEST_SOURCE)) + -include $(subst .cc,.d,$(PROGRAM_SOURCE)) +endif -ifeq ("$(TESTING)", "yes") +ifeq ("@TESTING@", "yes") include unit-tests/Makefile.in endif diff --git a/configure.in b/configure.in index b2830ef..4c8e7c6 100644 --- a/configure.in +++ b/configure.in @@ -77,11 +77,11 @@ AC_MSG_CHECKING(group owner) AC_ARG_WITH(group, AC_HELP_STRING([--with-group=GROUP], [set the group owner of installed files [[GROUP=]]]), - GROUP=$withval) -AC_MSG_RESULT($GROUP) + INSTALL_GROUP=$withval) +AC_MSG_RESULT($INSTALL_GROUP) -if test x$GROUP != x; then - INSTALL="$INSTALL -g $GROUP" +if test x$INSTALL_GROUP != x; then + INSTALL="$INSTALL -g $INSTALL_GROUP" fi ################################################################################ @@ -140,6 +140,7 @@ AC_SUBST(INSTALL) AC_SUBST(prefix) AC_SUBST(RELEASE_DATE) AC_SUBST(RELEASE_DATE) +AC_SUBST(TESTING) AC_SUBST(THIN_PROVISIONING_TOOLS_VERSION) ################################################################################ diff --git a/unit-tests/Makefile.in.in b/unit-tests/Makefile.in.in index 863f882..783c4f7 100644 --- a/unit-tests/Makefile.in.in +++ b/unit-tests/Makefile.in.in @@ -1,7 +1,27 @@ +# Copyright (C) 2011 Red Hat, Inc. All rights reserved. +# +# This file is part of the thin-provisioning-tools source. +# +# thin-provisioning-tools is free software: you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# thin-provisioning-tools is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with thin-provisioning-tools. If not, see +# . + TEST_SOURCE=\ - unit-tests/block_t.cc \ + unit-tests/cache_t.cc + +# FIXME Make these tests work. +# unit-tests/block_t.cc \ unit-tests/btree_t.cc \ - unit-tests/cache_t.cc \ unit-tests/endian_t.cc \ unit-tests/run_list_t.cc \ unit-tests/space_map_t.cc \ @@ -16,28 +36,28 @@ unit-test: $(TEST_PROGRAMS) for p in $(TEST_PROGRAMS); do echo Running $$p; ./$$p; done unit-tests/block_t: unit-tests/block_t.o - g++ $(CPPFLAGS) -o $@ $+ $(LIBS) + g++ $(CXXFLAGS) -o $@ $+ $(LIBS) unit-tests/btree_t: unit-tests/btree_t.o $(OBJECTS) - g++ $(CPPFLAGS) -o $@ $+ $(LIBS) + g++ $(CXXFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT) unit-tests/cache_t: unit-tests/cache_t.o $(OBJECTS) - g++ $(CPPFLAGS) -o $@ $+ $(LIBS) + g++ $(CXXFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT) unit-tests/run_list_t: unit-tests/run_list_t.o $(OBJECTS) - g++ $(CPPFLAGS) -o $@ $+ $(LIBS) + g++ $(CXXFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT) unit-tests/space_map_t: unit-tests/space_map_t.o $(OBJECTS) - g++ $(CPPFLAGS) -o $@ $+ $(LIBS) + g++ $(CXXFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT) unit-tests/space_map_disk_t: unit-tests/space_map_disk_t.o $(OBJECTS) - g++ $(CPPFLAGS) -o $@ $+ $(LIBS) + g++ $(CXXFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT) unit-tests/transaction_manager_t: unit-tests/transaction_manager_t.o $(OBJECTS) - g++ $(CPPFLAGS) -o $@ $+ $(LIBS) + g++ $(CXXFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT) unit-tests/metadata_t: unit-tests/metadata_t.o $(OBJECTS) - g++ $(CPPFLAGS) -o $@ $+ $(LIBS) + g++ $(CXXFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT) unit-tests/endian_t: unit-tests/endian_t.o $(OBJECTS) - g++ $(CPPFLAGS) -o $@ $+ $(LIBS) + g++ $(CXXFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT) From f7c6cabf33439847e4bf4871b9aabcb637f2576a Mon Sep 17 00:00:00 2001 From: Heinz Mauelshagen Date: Wed, 21 Dec 2011 11:08:37 +0100 Subject: [PATCH 6/9] Rename unit-tests/Makefile.in.in to unit-tests/Makefile.in --- Makefile.in | 4 +-- configure.in | 2 +- unit-tests/Makefile.in.in | 63 --------------------------------------- 3 files changed, 3 insertions(+), 66 deletions(-) delete mode 100644 unit-tests/Makefile.in.in diff --git a/Makefile.in b/Makefile.in index 9df122e..957ed42 100644 --- a/Makefile.in +++ b/Makefile.in @@ -118,7 +118,7 @@ thin_repair: $(THIN_REPAIR_OBJECTS) thin_repair.o clean: $(RM) *.o unit-tests/*.o *.d unit-tests/*.d $(TEST_PROGRAMS) $(PROGRAMS) distclean: clean - $(RM) config.cache config.log config.status configure.h version.h Makefile unit-tests/Makefile.in + $(RM) config.cache config.log config.status configure.h version.h Makefile unit-tests/Makefile .PHONEY: install install: $(PROGRAMS) @@ -138,5 +138,5 @@ ifeq (,$(findstring $(MAKECMDGOALS),clean distclean)) endif ifeq ("@TESTING@", "yes") -include unit-tests/Makefile.in +include unit-tests/Makefile endif diff --git a/configure.in b/configure.in index 4c8e7c6..0681dda 100644 --- a/configure.in +++ b/configure.in @@ -148,7 +148,7 @@ dnl -- First and last lines should not contain files to generate in order to dnl -- keep utility scripts running properly AC_CONFIG_FILES([ Makefile -unit-tests/Makefile.in +unit-tests/Makefile version.h ]) AC_OUTPUT diff --git a/unit-tests/Makefile.in.in b/unit-tests/Makefile.in.in deleted file mode 100644 index 783c4f7..0000000 --- a/unit-tests/Makefile.in.in +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright (C) 2011 Red Hat, Inc. All rights reserved. -# -# This file is part of the thin-provisioning-tools source. -# -# thin-provisioning-tools is free software: you can redistribute it -# and/or modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation, either version 3 of -# the License, or (at your option) any later version. -# -# thin-provisioning-tools is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty -# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with thin-provisioning-tools. If not, see -# . - -TEST_SOURCE=\ - unit-tests/cache_t.cc - -# FIXME Make these tests work. -# unit-tests/block_t.cc \ - unit-tests/btree_t.cc \ - unit-tests/endian_t.cc \ - unit-tests/run_list_t.cc \ - unit-tests/space_map_t.cc \ - unit-tests/space_map_disk_t.cc \ - unit-tests/transaction_manager_t.cc - -TEST_PROGRAMS=$(subst .cc,,$(TEST_SOURCE)) - -.PHONEY: unit-test - -unit-test: $(TEST_PROGRAMS) - for p in $(TEST_PROGRAMS); do echo Running $$p; ./$$p; done - -unit-tests/block_t: unit-tests/block_t.o - g++ $(CXXFLAGS) -o $@ $+ $(LIBS) - -unit-tests/btree_t: unit-tests/btree_t.o $(OBJECTS) - g++ $(CXXFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT) - -unit-tests/cache_t: unit-tests/cache_t.o $(OBJECTS) - g++ $(CXXFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT) - -unit-tests/run_list_t: unit-tests/run_list_t.o $(OBJECTS) - g++ $(CXXFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT) - -unit-tests/space_map_t: unit-tests/space_map_t.o $(OBJECTS) - g++ $(CXXFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT) - -unit-tests/space_map_disk_t: unit-tests/space_map_disk_t.o $(OBJECTS) - g++ $(CXXFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT) - -unit-tests/transaction_manager_t: unit-tests/transaction_manager_t.o $(OBJECTS) - g++ $(CXXFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT) - -unit-tests/metadata_t: unit-tests/metadata_t.o $(OBJECTS) - g++ $(CXXFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT) - -unit-tests/endian_t: unit-tests/endian_t.o $(OBJECTS) - g++ $(CXXFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT) From 73876ff59d7472794cd5e1f897f77a44a2e46fbb Mon Sep 17 00:00:00 2001 From: Heinz Mauelshagen Date: Wed, 21 Dec 2011 11:31:56 +0100 Subject: [PATCH 7/9] - fix configure.h.in error and .PHONY - add all target to unit-tests/Makefile.in to make it actually build --- Makefile.in | 8 ++++---- configure.in | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile.in b/Makefile.in index 957ed42..e737ff1 100644 --- a/Makefile.in +++ b/Makefile.in @@ -16,7 +16,7 @@ # with thin-provisioning-tools. If not, see # . -.PHONEY: all +.PHONY: all PROGRAMS=\ thin_repair \ @@ -71,7 +71,7 @@ INSTALL_DIR = $(INSTALL) -m 755 -d INSTALL_PROGRAM = $(INSTALL) -m 755 $(STRIP) INSTALL_DATA = $(INSTALL) -p -m 644 -.PHONEY: test-programs +.PHONY: test-programs test-programs: $(TEST_PROGRAMS) @@ -114,13 +114,12 @@ thin_restore: $(THIN_RESTORE_OBJECTS) thin_restore.o thin_repair: $(THIN_REPAIR_OBJECTS) thin_repair.o $(CXX) $(CXXFLAGS) -o $@ $+ $(LIBS) -.PHONEY: clean distclean clean: $(RM) *.o unit-tests/*.o *.d unit-tests/*.d $(TEST_PROGRAMS) $(PROGRAMS) distclean: clean $(RM) config.cache config.log config.status configure.h version.h Makefile unit-tests/Makefile +.PHONY: clean distclean -.PHONEY: install install: $(PROGRAMS) $(INSTALL_DIR) $(BINDIR) $(INSTALL_PROGRAM) thin_repair $(BINDIR)/thin_repair @@ -130,6 +129,7 @@ install: $(PROGRAMS) $(INSTALL_DATA) man8/thin_repair.8 $(MANPATH)/man8/thin_repair.8 $(INSTALL_DATA) man8/thin_dump.8 $(MANPATH)/man8/thin_dump.8 $(INSTALL_DATA) man8/thin_restore.8 $(MANPATH)/man8/thin_restore.8 +.PHONY: install ifeq (,$(findstring $(MAKECMDGOALS),clean distclean)) -include $(subst .cc,.d,$(SOURCE)) diff --git a/configure.in b/configure.in index 0681dda..78d88c1 100644 --- a/configure.in +++ b/configure.in @@ -23,7 +23,7 @@ AC_PREREQ(2.61) ################################################################ dnl -- Process this file with autoconf to produce a configure script. AC_INIT -AC_CONFIG_HEADERS([configure.h]) +# AC_CONFIG_HEADERS([configure.h]) ################################################################################ dnl -- Setup the directory where autoconf has auxilary files From 4dcab4b24ce08dfdfb57172445d526c2dbe11568 Mon Sep 17 00:00:00 2001 From: Heinz Mauelshagen Date: Wed, 21 Dec 2011 12:30:50 +0100 Subject: [PATCH 8/9] unit-tests/Makefile.in --- unit-tests/Makefile.in | 65 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 unit-tests/Makefile.in diff --git a/unit-tests/Makefile.in b/unit-tests/Makefile.in new file mode 100644 index 0000000..4d4ee5d --- /dev/null +++ b/unit-tests/Makefile.in @@ -0,0 +1,65 @@ +# Copyright (C) 2011 Red Hat, Inc. All rights reserved. +# +# This file is part of the thin-provisioning-tools source. +# +# thin-provisioning-tools is free software: you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# thin-provisioning-tools is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with thin-provisioning-tools. If not, see +# . + +TEST_SOURCE=\ + unit-tests/cache_t.cc + +# FIXME Make these tests work. +# unit-tests/block_t.cc \ + unit-tests/btree_t.cc \ + unit-tests/endian_t.cc \ + unit-tests/run_list_t.cc \ + unit-tests/space_map_t.cc \ + unit-tests/space_map_disk_t.cc \ + unit-tests/transaction_manager_t.cc + +TEST_PROGRAMS=$(subst .cc,,$(TEST_SOURCE)) + +unit-test: $(TEST_PROGRAMS) + for p in $(TEST_PROGRAMS); do echo Running $$p; ./$$p; done + +.PHONY: unit-test + +unit-tests/block_t: unit-tests/block_t.o + g++ $(CXXFLAGS) -o $@ $+ $(LIBS) + +unit-tests/btree_t: unit-tests/btree_t.o $(OBJECTS) + g++ $(CXXFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT) + +unit-tests/cache_t: unit-tests/cache_t.o $(OBJECTS) + g++ $(CXXFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT) + +unit-tests/run_list_t: unit-tests/run_list_t.o $(OBJECTS) + g++ $(CXXFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT) + +unit-tests/space_map_t: unit-tests/space_map_t.o $(OBJECTS) + g++ $(CXXFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT) + +unit-tests/space_map_disk_t: unit-tests/space_map_disk_t.o $(OBJECTS) + g++ $(CXXFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT) + +unit-tests/transaction_manager_t: unit-tests/transaction_manager_t.o $(OBJECTS) + g++ $(CXXFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT) + +unit-tests/metadata_t: unit-tests/metadata_t.o $(OBJECTS) + g++ $(CXXFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT) + +unit-tests/endian_t: unit-tests/endian_t.o $(OBJECTS) + g++ $(CXXFLAGS) -o $@ $+ $(LIBS) $(LIBEXPAT) + +all: $(TEST_PROGRAMS) From 36d735378ec8d95af2bf36edfed65427b77ccdb7 Mon Sep 17 00:00:00 2001 From: Heinz Mauelshagen Date: Wed, 21 Dec 2011 17:55:53 +0100 Subject: [PATCH 9/9] removed specfile; now in Fedora repository --- device-mapper-persistent-data.spec | 42 ------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 device-mapper-persistent-data.spec diff --git a/device-mapper-persistent-data.spec b/device-mapper-persistent-data.spec deleted file mode 100644 index f03f840..0000000 --- a/device-mapper-persistent-data.spec +++ /dev/null @@ -1,42 +0,0 @@ -# -# Copyright (C) 2011 Red Hat, Inc -# -Summary: Device-mapper thin provisioning tools -Name: device-mapper-persistent-data -Version: 0.0.1 -Release: 1%{?dist} -License: GPLv3 -Group: System Environment/Base -URL: http://sources.redhat.com/lvm2 -BuildRequires: expat-devel, libstdc++-devel, boost-devel -Source0: ftp://sources.redhat.com/pub/lvm2/thin-provisioning-tools-%{version}.tar.bz2 -Requires: expat - -%description -thin-provisioning-tools contains dump,restore and repair tools to -manage device-mapper thin provisioning target metadata devices. - -%prep -%setup -q -n thin-provisioning-tools-%{version} - -%build -%global _root_sbindir /sbin -%configure --enable-debug --enable-testing - -%install -make DESTDIR=%{buildroot} MANDIR=%{_mandir} install - -%clean - -%files -%doc COPYING README -%{_mandir}/man8/thin_dump.8.gz -%{_mandir}/man8/thin_repair.8.gz -%{_mandir}/man8/thin_restore.8.gz -%{_root_sbindir}/thin_dump -%{_root_sbindir}/thin_repair -%{_root_sbindir}/thin_restore - -%changelog -* Thu Dec 15 2011 Heinz Mauelshagen - 0.0.1-1 -- Initial version