From 55efff93fe2762b58dc70cdd20aaf97e39825929 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Sat, 22 Oct 2011 09:43:41 +0100 Subject: [PATCH] opr: Move queue header out of util Move the header which is installed as opr/queues.h out of util/ and into the new, top level, opr/ directory. Similarly move the tests out of the util/ test suite, and into the opr/ tests Change-Id: I81af487f09e1f0f4b25654a1f64c5ac75fd5a95b Reviewed-on: http://gerrit.openafs.org/5656 Reviewed-by: Derrick Brashear Tested-by: Simon Wilkinson --- Makefile.in | 1 + configure.ac | 1 + src/opr/Makefile.in | 7 +++++++ src/{util => opr}/queue.h | 0 src/util/Makefile.in | 6 +----- tests/Makefile.in | 2 +- tests/TESTS | 2 +- tests/opr/Makefile.in | 18 ++++++++++++++++++ tests/{util => opr}/queues-t.c | 2 -- tests/util/Makefile.in | 5 +---- 10 files changed, 31 insertions(+), 13 deletions(-) rename src/{util => opr}/queue.h (100%) create mode 100644 tests/opr/Makefile.in rename tests/{util => opr}/queues-t.c (99%) diff --git a/Makefile.in b/Makefile.in index 743612ca7e..626666b960 100644 --- a/Makefile.in +++ b/Makefile.in @@ -941,6 +941,7 @@ distclean: clean tests/auth/Makefile \ tests/cmd/Makefile \ tests/common/Makefile \ + tests/opr/Makefile \ tests/util/Makefile \ tests/volser/Makefile \ src/helper-splint.sh diff --git a/configure.ac b/configure.ac index 4780988257..5c539062dd 100644 --- a/configure.ac +++ b/configure.ac @@ -255,6 +255,7 @@ tests/Makefile \ tests/auth/Makefile \ tests/cmd/Makefile \ tests/common/Makefile \ +tests/opr/Makefile \ tests/rpctestlib/Makefile \ tests/tap/Makefile \ tests/util/Makefile \ diff --git a/src/opr/Makefile.in b/src/opr/Makefile.in index e434602263..f2ad190cb3 100644 --- a/src/opr/Makefile.in +++ b/src/opr/Makefile.in @@ -6,6 +6,7 @@ objects = assert.o casestrcpy.o all: $(TOP_INCDIR)/afs/opr.h \ $(TOP_INCDIR)/afs/opr_assert.h \ + $(TOP_INCDIR)/opr/queue.h \ $(TOP_LIBDIR)/libopr.a libopr.a: $(objects) @@ -22,6 +23,12 @@ $(TOP_INCDIR)/afs/opr.h: opr.h $(TOP_INCDIR)/afs/opr_assert.h: opr_assert.h $(INSTALL_DATA) opr_assert.h $@ +$(TOP_INCDIR)/opr/queue.h: queue.h + $(INSTALL_DATA) queue.h $@ + +clean: + rm -f $(objects) libopr.a + install: libopr.a $(INSTALL_DATA) libopr.a $(DESTDIR)$(libdir)/libopr.a diff --git a/src/util/queue.h b/src/opr/queue.h similarity index 100% rename from src/util/queue.h rename to src/opr/queue.h diff --git a/src/util/Makefile.in b/src/util/Makefile.in index 37210efd2a..220cc7fbdb 100644 --- a/src/util/Makefile.in +++ b/src/util/Makefile.in @@ -61,8 +61,7 @@ includes = \ ${TOP_INCDIR}/afs/work_queue_types.h \ ${TOP_INCDIR}/afs/thread_pool.h \ ${TOP_INCDIR}/afs/thread_pool_types.h \ - ${TOP_INCDIR}/afs/tabular_output.h \ - ${TOP_INCDIR}/opr/queue.h + ${TOP_INCDIR}/afs/tabular_output.h all: ${includes} \ ${TOP_LIBDIR}/util.a \ @@ -132,9 +131,6 @@ ${TOP_INCDIR}/afs/tabular_output.h: ${srcdir}/tabular_output.h ${TOP_INCDIR}/potpourri.h: ${srcdir}/potpourri.h ${INSTALL_DATA} $? $@ -${TOP_INCDIR}/opr/queue.h: ${srcdir}/queue.h - ${INSTALL_DATA} $? $@ - ${TOP_LIBDIR}/util.a: util.a ${INSTALL_DATA} $? $@ diff --git a/tests/Makefile.in b/tests/Makefile.in index 6029e69871..cfbef1ba57 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -9,7 +9,7 @@ include @TOP_OBJDIR@/src/config/Makefile.pthread MODULE_CFLAGS = -DSOURCE='"$(abs_top_srcdir)/tests"' \ -DBUILD='"$(abs_top_builddir)/tests"' -SUBDIRS = tap common auth util cmd volser +SUBDIRS = tap common auth util cmd volser opr all: runtests @for A in $(SUBDIRS); do cd $$A && $(MAKE) $@ && cd .. || exit 1; done diff --git a/tests/TESTS b/tests/TESTS index a6604271bb..b92bc8a8b5 100644 --- a/tests/TESTS +++ b/tests/TESTS @@ -1,10 +1,10 @@ util/ktime util/exec-alt -util/queues auth/keys auth/superuser auth/authcon cmd/command +opr/queues ptserver/pt_util ptserver/pts-man volser/vos-man diff --git a/tests/opr/Makefile.in b/tests/opr/Makefile.in new file mode 100644 index 0000000000..9dc07bbebf --- /dev/null +++ b/tests/opr/Makefile.in @@ -0,0 +1,18 @@ +srcdir=@srcdir@ +abs_top_builddir=@abs_top_builddir@ +include @TOP_OBJDIR@/src/config/Makefile.config +include @TOP_OBJDIR@/src/config/Makefile.lwp + +MODULE_CFLAGS = -I$(srcdir)/.. + +LIBS=../tap/libtap.a $(abs_top_builddir)/lib/libopr.a + +tests = queues-t + +all check test tests: $(tests) + +queues-t: queues-t.o + $(AFS_LDRULE) queues-t.o ../tap/libtap.a $(XLIBS) + +clean distclean: + $(RM) -f $(tests) *.o core diff --git a/tests/util/queues-t.c b/tests/opr/queues-t.c similarity index 99% rename from tests/util/queues-t.c rename to tests/opr/queues-t.c index e0ce888c29..ee806fbdd3 100644 --- a/tests/util/queues-t.c +++ b/tests/opr/queues-t.c @@ -118,5 +118,3 @@ main(void) return 0; } - - diff --git a/tests/util/Makefile.in b/tests/util/Makefile.in index c760c58c16..df129e53ed 100644 --- a/tests/util/Makefile.in +++ b/tests/util/Makefile.in @@ -9,7 +9,7 @@ MODULE_CFLAGS = -I$(srcdir)/.. LIBS = ../tap/libtap.a $(abs_top_builddir)/lib/util.a -tests = ktime-t exec-alt-t queues-t +tests = ktime-t exec-alt-t all check test tests: $(tests) @@ -19,9 +19,6 @@ ktime-t: ktime-t.o $(LIBS) exec-alt-t: exec-alt-t.o $(LIBS) $(AFS_LDRULE) exec-alt-t.o $(LIBS) $(XLIBS) -queues-t: queues-t.o - $(AFS_LDRULE) queues-t.o ../tap/libtap.a $(XLIBS) - install: clean distclean: