aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-12-27 18:37:32 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-12-27 18:37:32 +0000
commit8f76cdd478a3b06c2c87ea9fdd147ef75969c019 (patch)
treed42dbf168c25512a1bfa31c703d8c67c017a3342
parent662f6f3c1b9545e5349344c5c5830c8246d07c37 (diff)
downloadpaludis-8f76cdd478a3b06c2c87ea9fdd147ef75969c019.tar.gz
paludis-8f76cdd478a3b06c2c87ea9fdd147ef75969c019.tar.xz
Move around repository maker to avoid circular lib deps
-rw-r--r--paludis/Makefile.am.m44
-rw-r--r--paludis/environment/default/Makefile.am1
-rw-r--r--paludis/environment/no_config/Makefile.am3
-rw-r--r--paludis/files.m41
-rw-r--r--paludis/hashed_containers_TEST.cc13
-rw-r--r--paludis/repositories/Makefile.am24
-rw-r--r--paludis/repositories/repository_maker.cc (renamed from paludis/repository_maker.cc)13
-rw-r--r--paludis/repositories/repository_maker.hh (renamed from paludis/repository_maker.hh)0
-rw-r--r--src/paludis/applets.cc1
9 files changed, 57 insertions, 3 deletions
diff --git a/paludis/Makefile.am.m4 b/paludis/Makefile.am.m4
index ee92d11..9840573 100644
--- a/paludis/Makefile.am.m4
+++ b/paludis/Makefile.am.m4
@@ -69,7 +69,9 @@ BUILT_SOURCES = srcleanlist
libpaludis_la_SOURCES = filelist
libpaludis_la_LDFLAGS = -version-info @VERSION_LIB_CURRENT@:@VERSION_LIB_REVISION@:0
-libpaludis_la_LIBADD = $(top_builddir)/paludis/util/libpaludisutil.la @DYNAMIC_LD_LIBS@
+libpaludis_la_LIBADD = \
+ $(top_builddir)/paludis/util/libpaludisutil.la \
+ @DYNAMIC_LD_LIBS@
TESTS = testlist
diff --git a/paludis/environment/default/Makefile.am b/paludis/environment/default/Makefile.am
index 4111821..ce351a1 100644
--- a/paludis/environment/default/Makefile.am
+++ b/paludis/environment/default/Makefile.am
@@ -17,6 +17,7 @@ libpaludisdefaultenvironment_la_SOURCES = \
libpaludisdefaultenvironment_la_LDFLAGS = -version-info @VERSION_LIB_CURRENT@:@VERSION_LIB_REVISION@:0
libpaludisdefaultenvironment_la_LIBADD = \
+ $(top_builddir)/paludis/repositories/libpaludisrepositories.la \
$(top_builddir)/paludis/util/libpaludisutil.la \
$(top_builddir)/paludis/libpaludis.la
diff --git a/paludis/environment/no_config/Makefile.am b/paludis/environment/no_config/Makefile.am
index 147ee17..8f3e527 100644
--- a/paludis/environment/no_config/Makefile.am
+++ b/paludis/environment/no_config/Makefile.am
@@ -16,7 +16,8 @@ libpaludisnoconfigenvironment_la_LIBADD = \
$(top_builddir)/paludis/util/libpaludisutil.la \
$(top_builddir)/paludis/libpaludis.la \
$(top_builddir)/paludis/repositories/portage/libpaludisportagerepository.la \
- $(top_builddir)/paludis/repositories/vdb/libpaludisvdbrepository.la
+ $(top_builddir)/paludis/repositories/vdb/libpaludisvdbrepository.la \
+ $(top_builddir)/paludis/repositories/libpaludisrepositories.la
if MONOLITHIC
diff --git a/paludis/files.m4 b/paludis/files.m4
index d806266..7d3d1dd 100644
--- a/paludis/files.m4
+++ b/paludis/files.m4
@@ -29,7 +29,6 @@ add(`paludis', `hh', `cc')
add(`portage_dep_lexer', `hh', `cc', `test')
add(`portage_dep_parser', `hh', `cc', `test')
add(`repository', `hh', `cc', `sr')
-add(`repository_maker', `hh', `cc')
add(`repository_name_cache', `hh', `cc', `test', `testscript')
add(`syncer', `hh', `cc', `sr')
add(`version_metadata', `hh', `cc', `sr')
diff --git a/paludis/hashed_containers_TEST.cc b/paludis/hashed_containers_TEST.cc
index b6d2f4a..65c58bc 100644
--- a/paludis/hashed_containers_TEST.cc
+++ b/paludis/hashed_containers_TEST.cc
@@ -27,6 +27,19 @@ using namespace test;
namespace test_cases
{
/**
+ * \test Test CRCHash
+ */
+ struct CRCHashTest : TestCase
+ {
+ CRCHashTest() : TestCase("crc hash") { };
+
+ void run()
+ {
+ TEST_CHECK_EQUAL(47503, (CRCHash<std::string>()("moo") & 0xffff));
+ }
+ } test_crc_hash;
+
+ /**
* \test Test HashSet.
*
*/
diff --git a/paludis/repositories/Makefile.am b/paludis/repositories/Makefile.am
index 81ad59f..c16d856 100644
--- a/paludis/repositories/Makefile.am
+++ b/paludis/repositories/Makefile.am
@@ -7,3 +7,27 @@ MAINTAINERCLEANFILES = Makefile.in
built-sources : $(BUILT_SOURCES)
for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done
+lib_LTLIBRARIES = libpaludisrepositories.la
+
+paludis_repositories_includedir = $(includedir)/paludis/repositories/
+
+paludis_repositories_include_HEADERS = \
+ repository_maker.hh
+
+libpaludisrepositories_la_SOURCES = \
+ repository_maker.cc \
+ $(paludis_repositories_include_HEADERS)
+
+libpaludisrepositories_la_LDFLAGS = -version-info @VERSION_LIB_CURRENT@:@VERSION_LIB_REVISION@:0
+libpaludisrepositories_la_LIBADD = \
+ $(top_builddir)/paludis/util/libpaludisutil.la \
+ $(top_builddir)/paludis/libpaludis.la \
+ @DYNAMIC_LD_LIBS@
+
+AM_CXXFLAGS = -I$(top_srcdir) @PALUDIS_CXXFLAGS@
+DEFS= \
+ -DSYSCONFDIR=\"$(sysconfdir)\" \
+ -DLIBEXECDIR=\"$(libexecdir)\" \
+ -DDATADIR=\"$(datadir)\" \
+ -DLIBDIR=\"$(libdir)\"
+
diff --git a/paludis/repository_maker.cc b/paludis/repositories/repository_maker.cc
index f85185d..a07c99d 100644
--- a/paludis/repository_maker.cc
+++ b/paludis/repositories/repository_maker.cc
@@ -125,3 +125,16 @@ RepositoryMaker::~RepositoryMaker()
{
}
+#ifndef MONOLITHIC
+
+extern "C"
+{
+ void register_repositories(RepositoryMaker * maker);
+}
+
+void register_repositories(RepositoryMaker *)
+{
+}
+
+#endif
+
diff --git a/paludis/repository_maker.hh b/paludis/repositories/repository_maker.hh
index bc154c8..bc154c8 100644
--- a/paludis/repository_maker.hh
+++ b/paludis/repositories/repository_maker.hh
diff --git a/src/paludis/applets.cc b/src/paludis/applets.cc
index a11120d..d51114c 100644
--- a/src/paludis/applets.cc
+++ b/src/paludis/applets.cc
@@ -26,6 +26,7 @@
#include <paludis/util/log.hh>
#include <paludis/util/collection_concrete.hh>
#include <paludis/environment/default/default_environment.hh>
+#include <paludis/repositories/repository_maker.hh>
#include <string>
#include <set>