diff options
47 files changed, 502 insertions, 56 deletions
diff --git a/Makefile.am b/Makefile.am index b5a46775f..ca8b4f754 100644 --- a/Makefile.am +++ b/Makefile.am @@ -36,3 +36,6 @@ install-data-local : @[ -f $(top_builddir)/done-check ] || echo "**************************************" || true @[ -f $(top_builddir)/done-check ] || echo || true +built-sources : $(BUILT_SOURCES) + for s in $(SUBDIRS) ; do $(MAKE) -C $$s built-sources || exit 1 ; done + diff --git a/cran/Makefile.am b/cran/Makefile.am index a4dee8c83..e1ab839c6 100644 --- a/cran/Makefile.am +++ b/cran/Makefile.am @@ -8,3 +8,8 @@ libexecprog_SCRIPTS = \ cran.bash EXTRA_DIST = $(libexecprog_SCRIPTS) + +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done + + diff --git a/doc/Makefile.am b/doc/Makefile.am index 7331c2453..772fb7c24 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -16,7 +16,8 @@ docfiles = \ doc_news.doxygen \ doc_configuration_files.doxygen \ doc_migration_howto.doxygen \ - doc_known_issues.doxygen + doc_known_issues.doxygen \ + doc_programming_with_paludis.doxygen EXTRA_DIST = doxygen.conf.in header.html footer.html paludis.css $(docfiles) $(tagfiles) CLEANFILES = *~ html/* html @@ -32,6 +33,7 @@ if HAVE_DOXYGEN doxygen : doxygen.conf $(top_srcdir)/paludis/*.cc $(top_srcdir)/paludis/*.hh \ $(docfiles) $(tagfiles) + $(MAKE) -C .. built-sources doxygen doxygen.conf else @@ -56,3 +58,7 @@ upload-homepage : doxygen cd `readlink -f $(top_srcdir)/doc/html` && tar jc ./ | \ ssh shell.berlios.de tar vjx -C /home/groups/paludis/htdocs/ +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done + + diff --git a/doc/doc_mainpage.doxygen b/doc/doc_mainpage.doxygen index 5a8c5e36c..7fa9debf5 100644 --- a/doc/doc_mainpage.doxygen +++ b/doc/doc_mainpage.doxygen @@ -34,29 +34,10 @@ IRC channel. Read the howto for more details. \section developerdocs For Developers -Start by getting a -<a href="http://svn.pioto.org/viewvc/paludis/">Subversion -checkout</a> of <code>trunk/</code>, and reading the \link PortageDifferences Paludis and Portage -differences \endlink document. - -It's best to start by skimming over the main program to get a feel for how -everything fits together. The interface code is kept in the src/ directory, -and library code is in paludis/ . - -The following classes are good places to begin: - -- paludis::DefaultEnvironment provides a representation of the default - operating environment. -- paludis::PackageDatabase provides routines for querying packages. An - instance can be obtained via paludis::DefaultEnvironment. -- paludis::DepList can be used for making dependency lists. -- paludis::Repository is subclassed to do querying, installing, - uninstalling, syncing and the like. - -The <a href="modules.html">Modules</a> link in the header bar will probably -be of more use than any of the full class lists. - You should also read \link CodingStandards the Coding Standards \endlink before tinkering. +A \link ProgrammingWithPaludis rough guide to programming with Paludis \endlink +is available. You are encouraged to extend this document by submitting patches. + */ diff --git a/doc/doc_programming_with_paludis.doxygen b/doc/doc_programming_with_paludis.doxygen new file mode 100644 index 000000000..2fd672345 --- /dev/null +++ b/doc/doc_programming_with_paludis.doxygen @@ -0,0 +1,269 @@ +/* vim: set ft=cpp tw=80 sw=4 et : */ + +/** +\page ProgrammingWithPaludis Programming with Paludis + +Start by getting a +<a href="http://svn.pioto.org/viewvc/paludis/">Subversion +checkout</a> of <code>trunk/</code>, and reading the \link PortageDifferences Paludis and Portage +differences \endlink document. + +It's best to start by skimming over the main program to get a feel for how +everything fits together. The interface code is kept in the src/ directory, +and library code is in paludis/ . + +The <a href="modules.html">Modules</a> link in the header bar will probably +be of more use than any of the full class lists. + +\section ProgrammingWithPaludisBasics Basics + +There are currently two APIs available: + +- The C++ API. This offers the full range of functionality. +- The Ruby API. This offers a subset of the functionality and is aimed at script and utility + authors. Not every class or method is currently available; support for more classes and + methods can be added as needed. Some things (for example, defining new Environment subclasses) + will likely never be available through this interface. + +A basic C++ application will look something like: + +\code +#include <paludis/paludis.hh> +#include <paludis/environment/default/default_environment.hh> + +#include <iostream> +#include <cstdlib> + +using std::cout; +using std::cerr; +using std::endl; + +int main(int, char *[]) +{ + try + { + paludis::PackageDatabaseEntryCollection::ConstPointer packages( + paludis::DefaultEnvironment::get_instance()->package_database()->query( + paludis::PackageDepAtom("app-editors/vim"), paludis::is_installed_only)); + + if (packages->empty()) + cout << "Vim is not installed" << endl; + else + cout << "Vim " << packages->last()->version << " is installed" << endl; + } + catch (const paludis::Exception & e) + { + cerr << "Caught exception '" << e.message() << "' (" + << e.what() << ")" << endl; + return EXIT_FAILURE; + } + + return EXIT_SUCCESS; +} +\endcode + +Compile this using <code>g++ -Wall -lpaludis -lpaludisdefaultenvironment</code>. + +The same application written in Ruby will look something like: + +\verbatim +#!/usr/bin/env ruby + +require 'Paludis' + +packages = Paludis::DefaultEnvironment::instance.package_database.query( + "app-editors/vim", Paludis::InstallState::InstalledOnly) + +if packages.empty? + puts "Vim is not installed" +else + puts "Vim " + packages.last.version + " is installed" +end +\endverbatim + +Notice how various Rubyisms (singleton styles, question mark methods, constants +for enums) are used. The Ruby interface aims to be natural to Ruby programmers +and behave like a Ruby library, rather than being an exact translation. + +Make sure you can run both of these examples before reading on. + +\section ProgrammingWithPaludisCommonPatterns Common Patterns + +A number of common patterns are used throughout the code. + +\subsection ProgrammingWithPaludisCommonPatternsIterators Iterators + +STL style iterator pairs crop up in various places. Where this happens, there is +usually a member typedef named <code>Iterator</code> or <code>FooIterator</code>, +along with members named <code>begin</code> and <code>end</code> or <code>begin_foo</code> +and <code>end_foo</code>. See \ref TCppSL if you are unfamiliar with this style. + +The underlying iterator format is usually hidden from the library programmer by a +libwrapiter::ForwardIterator. This is to speed up compile times and to avoid breaking +lots of things when underlying data types change. + +Ruby works better with blocks than external iterators. Thus, instead of providing +<code>begin_foo</code> and <code>end_foo</code> methods, Ruby classes typically have +a single <code>foo</code> member function that returns an array made from the +iterator range. + +\subsection ProgrammingWithPaludisCommonPatternsPointers Pointers + +We have a reference-counted smart pointer template class, paludis::CountedPtr. It's +used to avoid expensive copying and tricky memory management. Most classes that +are suitable for being held by a smart pointer have member typedefs named +<code>Pointer</code> and <code>ConstPointer</code>. + +We don't use std::tr1::shared_ptr because most of our target compilers don't have +it yet. + +This is all hidden in the Ruby interface. + +\subsection ProgrammingWithPaludisCommonPatternsValidated Validated Names + +Rather than using std::string for package, category etc names, we have a wrapper +class template called paludis::Validated, and a bunch of typedefs (paludis::CategoryNamePart, +paludis::PackageNamePart, paludis::SlotName, paludis::RepositoryName, paludis::KeywordName). +This gives a couple of benefits: + +- It catches certain screwups (e.g. passing the wrong parameter types) at compile time. +- It means exceptions caused by weird data (e.g. from user input) are caught at a sensible + place, rather than sometime weird later on. + +Ruby doesn't do static checking, so it just uses raw String instances for all of these. + +\subsection ProgrammingWithPaludisCommonPatternsCollections Collections + +Sometimes we need to pass around a collection of items. The paludis::SortedCollection, +paludis::SequentialCollection and paludis::AssociativeCollection wrappers handle this. +They are passed around via smart pointers to avoid copying. + +The basic classes are abstract. Use paludis::SortedCollection::Concrete etc if you need +to make one yourself. + +In Ruby these are converted to arrays. + +\subsection ProgrammingWithPaludisCommonPatternsSmartRecords Smart Records + +Smart records are a bit smarter than Plain Old Data structs. They might define comparison +operators and constructors. They're used in quite a few places. + +Some smart records support named parameter constructors. A typical call to one of these +looks like: + +\code +PackageDatabaseEntry my_pde(PackageDatabaseEntryParams::create() + .package(QualifiedPackageName("app-editors/vim")) + .version(VersionSpec("7.0.147")) + .repository(RepositoryName("gentoo"))); +\endcode + +Named parameters can be specified in any order. + +\subsection ProgrammingWithPaludisCommonPatternsStringify Stringify + +Many types can be converted to a std::string for display purposes. The paludis::stringify() +template function will handle this. It also works for any internal and standard library data +type that can be written to a std::ostream. + +\section ProgrammingWithPaludisEnvironment The Environment + +At the heart of the Paludis API is a paludis::Environment subclass instance. All +non-trivial clients will use one of the Environment subclasses as their starting +point for obtaining data (Environment itself contains abstract members and cannot +be used directly). + +\subsection ProgrammingWithPaludisDefaultEnvironment DefaultEnvironment + +The paludis::DefaultEnvironment class should be used when user configuration +files (<code>~/.paludis</code> or <code>/etc/paludis</code> are to be parsed. This +is a singleton class (see \ref GoF for details on singletons) whose instance can +be obtained via the paludis::DefaultEnvironment::get_instance method. + +The configuration suffix can be set using the paludis::DefaultConfig::set_config_suffix +static member function. Clients should usually provide a <code>--config-suffix</code> and +<code>-c</code> command-line option for this. + +When using DefaultEnvironment, linking should include <code>-lpaludisdefaultenvironment</code>. + +In Ruby, the class is <code>Paludis::DefaultEnvironment</code>, the instance is +<code>Paludis::DefaultEnvironment::instance</code> and the configuration suffix is +set using <code>Paludis::DefaultConfig::config_suffix=</code>. + +\subsection ProgrammingWithPaludisNoConfigEnvironment NoConfigEnvironment + +The paludis::NoConfigEnvironment class should be used when user configuration should +not be read, and instead the repository should be from a single particular directory. +Multiple instances of this environment can be created if necessary. + +When using NoConfigEnvironment, linking should include <code>-lpaludisnoconfigenvironment</code>. + +In Ruby the class is <code>Paludis::NoConfigEnvironment</code>. + +\subsection ProgrammingWithPaludisOtherEnvironments Other Environments + +The paludis::qa::QAEnvironment class is used for QA environments. There is also a +paludis::TestEnvironment class that is used in some test cases. These are less useful +for most client authors. + +There is currently no Ruby wrapper for either of these. + +\section ProgrammingWithPaludisPackageDatabase The Package Database + +Every paludis::Environment has a paludis::PackageDatabase, which can be obtained +via the paludis::Environment::package_database() method. + +The PackageDatabase contains a number of paludis::Repository subclass instances. These +can be obtained using the paludis::PackageDatabase::begin_repositories() and +paludis::PackageDatabase::end_repositories() pair or the +paludis::PackageDatabase::fetch_repository() method. + +The PackageDatabase also provides a number of utility functions. paludis::PackageDatabase::query() +can be used to fetch a paludis::PackageDatabaseEntryCollection containing packages +matching a particular paludis::PackageDepAtom. paludis::PackageDatabase::fetch_unique_qualified_package_name() +can be used to convert a paludis::PackageNamePart with no associated paludis::CategoryNamePart into +a full paludis::QualifiedPackageName . + +In Ruby, the class is <code>Paludis::PackageDatabase</code> and and instance can +only be obtained by calling <code>some_environment.package_database</code>. +Rather than providing iterator pairs, repositories are available through the +<code>repositories</code> method, whose return value behaves like an array of +<code>Paludis::Repository</code> subclass instances. The +<code>fetch_repository</code> and <code>fetch_unique_qualified_package_name</code> methods are available. + +\section ProgrammingWithPaludisRepositories Repositories + +The paludis::Repository class is an abstract base class representing a +repository. Each paludis::Repository subclass provides various core functions, +along with various optional others based upon the repository's capabilities. + +The commonly used subclasses are: + +- paludis::PortageRepository, which is used for Gentoo-style ebuild repositories. +- paludis::VDBRepository, which is used for installed packages +- paludis::VirtualsRepository, which is used for old-style virtuals +- paludis::InstalledVirtualsRepository, which is used for old-style provided virtuals + +Others include: + +- paludis::CRANRepository, which is used for CRAN packages. +- paludis::CRANInstalledRepository, which is used for installed CRAN packages. +- paludis::FakeRepository, which is used for some test cases. + +Repository creation is usually handled by the paludis::Environment subclass and its +associated paludis::PackageDatabase. In Ruby, this is the only way to gain access +to a repository. + +All repositories provide some basic functions for querying their contents. Commonly used +functions are paludis::Repository::version_metadata(), paludis::Repository::has_category_named(), +paludis::Repository::has_package_named(), paludis::Repository::category_names(), +paludis::Repository::package_names(), paludis::Repository::version_specs() and +paludis::Repository::has_version(). These are available through Ruby; the has_ functions +have a question mark suffix as per Ruby convention. + +Additional capabilities are available through optional interfaces. These can be accessed +via members named paludis::Repository::mask_interface, paludis::Repository::sets_interface +and so on -- these members will either be a pointer to the interface or a zero pointer. + + +*/ diff --git a/doc/header.html b/doc/header.html index e1c5daf0a..8c269bd02 100644 --- a/doc/header.html +++ b/doc/header.html @@ -17,12 +17,14 @@ <a class="qindex" href="http://svn.pioto.org/viewvc/paludis/">SVN</a> ] </div> - <div class="qindex">User Documentation: [ + <div class="qindex">General Documentation: [ <a class="qindex" href="BootstrapHowto.html">Bootstrap Howto</a> | <a class="qindex" href="MigrationHowto.html">Migration Howto</a> | <a class="qindex" href="KnownIssues.html">Known Issues and Non-Issues</a> (<strong>Important</strong>) | <a class="qindex" href="ConfigurationFiles.html">Configuration Files</a> | - <a class="qindex" href="PortageDifferences.html">Portage Differences</a> ] + <a class="qindex" href="PortageDifferences.html">Portage Differences</a> | + <a class="qindex" href="CodingStandards.html">Coding Standards</a> | + <a class="qindex" href="ProgrammingWithPaludis.html">Programming with Paludis</a> ] </div> <div class="qindex">Code Documentation: [ @@ -33,7 +35,6 @@ <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a> | - <a class="qindex" href="CodingStandards.html">Coding Standards</a> | <a class="qindex" href="pages.html">Other Topics</a> ] </div> diff --git a/doc/paludis.css b/doc/paludis.css index 41d761a56..d392ef7f6 100644 --- a/doc/paludis.css +++ b/doc/paludis.css @@ -1,6 +1,7 @@ body { background-color: #eeeeee; color: #333333; + font-family: "Verdana", "Helvetica", sans-serif; } h1 { @@ -30,7 +31,7 @@ div.qindex { text-align: center; margin: 2px; padding: 2px; - font-size: 80%; + font-size: small; line-height: 140%; } @@ -41,7 +42,7 @@ div.nav { text-align: center; margin: 2px; padding: 2px; - font-size: 80%; + font-size: small; line-height: 140%; } @@ -129,7 +130,7 @@ div.groupHeader { div.groupText { margin-left: 16px; font-style: italic; - font-size: 90%; + font-size: small; } td.indexkey { @@ -183,7 +184,7 @@ SPAN.charliteral { color: #008080 } } .mdescLeft { padding: 0px 8px 4px 8px; - font-size: 80%; + font-size: small; font-style: italic; background-color: #FAFAFA; border-top: 1px none #E0E0E0; @@ -194,7 +195,7 @@ SPAN.charliteral { color: #008080 } } .mdescRight { padding: 0px 8px 4px 8px; - font-size: 80%; + font-size: small; font-style: italic; background-color: #FAFAFA; border-top: 1px none #E0E0E0; @@ -219,7 +220,7 @@ SPAN.charliteral { color: #008080 } border-bottom-style: none; border-left-style: none; background-color: #FAFAFA; - font-size: 80%; + font-size: small; } .memItemRight { padding: 1px 8px 0px 8px; @@ -237,7 +238,7 @@ SPAN.charliteral { color: #008080 } border-bottom-style: none; border-left-style: none; background-color: #FAFAFA; - font-size: 80%; + font-size: small; } .memTemplItemLeft { padding: 1px 0px 0px 8px; @@ -255,7 +256,7 @@ SPAN.charliteral { color: #008080 } border-bottom-style: none; border-left-style: none; background-color: #FAFAFA; - font-size: 80%; + font-size: small; } .memTemplItemRight { padding: 1px 8px 0px 8px; @@ -273,7 +274,7 @@ SPAN.charliteral { color: #008080 } border-bottom-style: none; border-left-style: none; background-color: #FAFAFA; - font-size: 80%; + font-size: small; } .memTemplParams { padding: 1px 0px 0px 8px; @@ -292,8 +293,57 @@ SPAN.charliteral { color: #008080 } border-left-style: none; color: #606060; background-color: #FAFAFA; - font-size: 80%; + font-size: small; +} +.memtemplate { + font-size: small; + color: #606060; + font-weight: normal; +} +.memnav { + background-color: #e8e8e8; + border: 1px solid #333333; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} +.memitem { + background-color: #eeeeee; + border-width: 1px; + border-style: solid; + border-color: #999999; +} +.memname { + white-space: nowrap; + font-weight: bold; +} +.memdoc{ + padding-left: 10px; +} +.memproto { + background-color: #f8f8f8; + width: 100%; + border-bottom-width: 1px; + border-bottom-style: solid; + border-bottom-color: #999999; + font-weight: bold; +} +.memproto * { + font-size: small; +} +.paramkey { + text-align: right; +} +.paramtype { + white-space: nowrap; +} +.paramname { + color: #666666; + font-style: italic; + white-space: nowrap; } + .search { color: #003399; font-weight: bold; } @@ -301,7 +351,7 @@ FORM.search { margin-bottom: 0px; margin-top: 0px; } -INPUT.search { font-size: 75%; +INPUT.search { font-size: small; color: #000080; font-weight: normal; background-color: #eeeeff; diff --git a/ebuild/Makefile.am b/ebuild/Makefile.am index 915764f1d..784e9c377 100644 --- a/ebuild/Makefile.am +++ b/ebuild/Makefile.am @@ -51,3 +51,7 @@ EXTRA_DIST = $(libexecprog_SCRIPTS) run_test.bash $(TESTS) check_SCRIPTS = run_test.bash $(TESTS) check_PROGRAMS = +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done + + diff --git a/ebuild/digests/Makefile.am b/ebuild/digests/Makefile.am index 8ac62cae7..d4ad64597 100644 --- a/ebuild/digests/Makefile.am +++ b/ebuild/digests/Makefile.am @@ -25,3 +25,7 @@ TESTS_ENVIRONMENT = env \ AM_CXXFLAGS = -I$(top_srcdir) @PALUDIS_CXXFLAGS@ +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done + + diff --git a/ebuild/fetchers/Makefile.am b/ebuild/fetchers/Makefile.am index 8a4dd4f32..5f92bd053 100644 --- a/ebuild/fetchers/Makefile.am +++ b/ebuild/fetchers/Makefile.am @@ -25,3 +25,7 @@ AM_CXXFLAGS = -I$(top_srcdir) @PALUDIS_CXXFLAGS@ dohttp dohttps doftp : dowget.in cat $< > $@ + +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done + diff --git a/ebuild/utils/Makefile.am b/ebuild/utils/Makefile.am index 1fde88507..49eb7d22a 100644 --- a/ebuild/utils/Makefile.am +++ b/ebuild/utils/Makefile.am @@ -109,3 +109,6 @@ $(prep_scripts) : prep.in check_PROGRAMS = +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done + diff --git a/eselect/Makefile.am b/eselect/Makefile.am index f207d2e8f..a27edcee7 100644 --- a/eselect/Makefile.am +++ b/eselect/Makefile.am @@ -21,3 +21,7 @@ EXTRA_DIST = \ check_SCRIPTS = $(TESTS) check_PROGRAMS = +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done + + diff --git a/hooks/Makefile.am.m4 b/hooks/Makefile.am.m4 index 4764f670f..d26ceca54 100644 --- a/hooks/Makefile.am.m4 +++ b/hooks/Makefile.am.m4 @@ -200,3 +200,8 @@ uninstall-local : Makefile.am : Makefile.am.m4 $(top_srcdir)/misc/do_m4.bash Makefile.am +changequote(`<', `>') +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done + + diff --git a/misc/Makefile.am b/misc/Makefile.am index ab064f103..5da8fdaa0 100644 --- a/misc/Makefile.am +++ b/misc/Makefile.am @@ -2,3 +2,6 @@ CLEANFILES = *~ MAINTAINERCLEANFILES = Makefile.in svn-version-filter-data.bash EXTRA_DIST = generated-file.txt svn-version-filter.bash svn-version-filter-data.bash.in do_m4.bash make_sr.bash +built-sources : $(BUILT_SOURCES) + for s in $(SUBDIRS) ; do $(MAKE) -C $$s built-sources || exit 1 ; done + diff --git a/misc/make_sr.bash b/misc/make_sr.bash index be98244af..2259922f9 100755 --- a/misc/make_sr.bash +++ b/misc/make_sr.bash @@ -138,7 +138,7 @@ while read a ; do echo " public:" echo echo " ///\\name Data members" - echo " ///\\{" + echo " ///\{" echo for (( k = 0 ; k < ${#want_keys[@]} ; k++ )) ; do @@ -146,13 +146,13 @@ while read a ; do done echo - echo " ///\\}" + echo " ///\}" echo if [[ -n "${want_comparison_operators}" ]] ; then echo " ///\\name Comparison operators" - echo " ///\\{" + echo " ///\{" echo if [[ "${want_comparison_operators}" == "all" ]] ; then @@ -170,12 +170,12 @@ while read a ; do done echo - echo " ///\\}" + echo " ///\}" echo fi echo " ///\\name Basic operations" - echo " ///\\{" + echo " ///\{" echo echo " ${a}(" @@ -198,13 +198,13 @@ while read a ; do make_class_${a} echo - echo " ///\\}" + echo " ///\}" echo if [[ -n "${want_named_args}" ]] ; then echo " ///\\name Named argument constructor" - echo " ///\\{" + echo " ///\{" echo for (( k = 0 ; k < ${#want_keys[@]} ; k++ )) ; do @@ -223,7 +223,7 @@ while read a ; do echo " $(make_const_ref "${t}" ) ${n};" echo echo " ///\\name Basic operations" - echo " ///\\{" + echo " ///\{" echo echo " Param_${n}(const Empty &, $(make_const_ref "${t}" ) value_for_${n}) :" echo " ${n}(value_for_${n})" @@ -236,7 +236,7 @@ while read a ; do echo " {" echo " }" echo - echo " ///\\}" + echo " ///\}" echo " };" echo echo " /**" @@ -250,7 +250,7 @@ while read a ; do echo echo " public:" echo " ///\\name Basic operations" - echo " ///\\{" + echo " ///\{" echo echo " After_" echo " ${n}($(make_const_ref "${t}" ) value_for_${n})" @@ -276,7 +276,7 @@ while read a ; do echo " {" echo " }" echo - echo " ///\\}" + echo " ///\}" echo " };" echo done @@ -334,7 +334,7 @@ while read a ; do echo echo " public:" echo " ///\\name Basic operations" - echo " ///\\{" + echo " ///\{" echo echo " Params(" for (( k = 0 ; k < ${#want_keys[@]} ; k++ )) ; do @@ -400,7 +400,7 @@ while read a ; do echo " );" echo " }" echo - echo " ///\\}" + echo " ///\}" echo echo " };" echo diff --git a/paludis/Makefile.am.m4 b/paludis/Makefile.am.m4 index ee057f9d2..c94f7e50f 100644 --- a/paludis/Makefile.am.m4 +++ b/paludis/Makefile.am.m4 @@ -98,5 +98,8 @@ comparison_policy.hh : comparison_policy.hh.m4 ihateautomake.cc : all test -f $@ || touch $@ +changequote(`<', `>') built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done + diff --git a/paludis/args/Makefile.am b/paludis/args/Makefile.am index 184ed7c73..f2e748fbf 100644 --- a/paludis/args/Makefile.am +++ b/paludis/args/Makefile.am @@ -51,3 +51,7 @@ test_ldadd = \ args_TEST_SOURCES = args_TEST.cc args_TEST_LDADD = $(test_ldadd) +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done + + diff --git a/paludis/digests/Makefile.am b/paludis/digests/Makefile.am index 4d0087509..7ba4cda84 100644 --- a/paludis/digests/Makefile.am +++ b/paludis/digests/Makefile.am @@ -40,3 +40,6 @@ md5_TEST_SOURCES = md5_TEST.cc md5_TEST_CXXFLAGS = -I$(top_srcdir) md5_TEST_LDADD = $(top_builddir)/test/libtest.a libpaludisdigests.la +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done + diff --git a/paludis/environment/Makefile.am b/paludis/environment/Makefile.am index 66c2ccb6d..bf57a320a 100644 --- a/paludis/environment/Makefile.am +++ b/paludis/environment/Makefile.am @@ -3,4 +3,6 @@ SUBDIRS = default no_config test CLEANFILES = *~ gmon.out *.gcov *.gcno *.gcda MAINTAINERCLEANFILES = Makefile.in +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done diff --git a/paludis/environment/default/Makefile.am b/paludis/environment/default/Makefile.am index f5ae60250..d90b4abaa 100644 --- a/paludis/environment/default/Makefile.am +++ b/paludis/environment/default/Makefile.am @@ -45,3 +45,7 @@ default_environment_TEST_LDADD = \ $(top_builddir)/paludis/util/libpaludisutil.la \ libpaludisdefaultenvironment.la +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done + + diff --git a/paludis/environment/no_config/Makefile.am b/paludis/environment/no_config/Makefile.am index 1d836de4a..0c88f5f75 100644 --- a/paludis/environment/no_config/Makefile.am +++ b/paludis/environment/no_config/Makefile.am @@ -40,4 +40,5 @@ no_config_environment-sr.cc : no_config_environment.sr $(top_srcdir)/misc/make_s $(top_srcdir)/misc/make_sr.bash --source $(srcdir)/no_config_environment.sr > $@ built-sources : $(BUILT_SOURCES) + for s in $(SUBDIRS) ; do $(MAKE) -C $$s built-sources || exit 1 ; done diff --git a/paludis/environment/test/Makefile.am b/paludis/environment/test/Makefile.am index b48bf1b1d..75277e342 100644 --- a/paludis/environment/test/Makefile.am +++ b/paludis/environment/test/Makefile.am @@ -19,3 +19,7 @@ lib_LTLIBRARIES = libpaludistestenvironment.la paludis_environment_test_includedir = $(includedir)/paludis/environment/test paludis_environment_test_include_HEADERS = test_environment.hh +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done + + diff --git a/paludis/libxml/Makefile.am b/paludis/libxml/Makefile.am index 35f030765..14d2a0f98 100644 --- a/paludis/libxml/Makefile.am +++ b/paludis/libxml/Makefile.am @@ -35,3 +35,6 @@ endif EXTRA_DIST = libxml.hh libxml.cc +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done + diff --git a/paludis/qa/Makefile.am.m4 b/paludis/qa/Makefile.am.m4 index e28fd3fb5..18ce4affa 100644 --- a/paludis/qa/Makefile.am.m4 +++ b/paludis/qa/Makefile.am.m4 @@ -99,4 +99,5 @@ DEFS= \ EXTRA_DIST = Makefile.am.m4 files.m4 qa.hh.m4 testscriptlist srlist srcleanlist built-sources : $(BUILT_SOURCES) + for s in $(SUBDIRS) ; do $(MAKE) -C $$s built-sources || exit 1 ; done diff --git a/paludis/repositories/Makefile.am b/paludis/repositories/Makefile.am index 69fc8a5cf..ab50dbf5d 100644 --- a/paludis/repositories/Makefile.am +++ b/paludis/repositories/Makefile.am @@ -3,3 +3,6 @@ SUBDIRS = cran fake nothing portage vdb virtuals CLEANFILES = *~ gmon.out *.gcov *.gcno *.gcda MAINTAINERCLEANFILES = Makefile.in +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done + diff --git a/paludis/repositories/cran/Makefile.am b/paludis/repositories/cran/Makefile.am index cb681c090..30beb44a5 100644 --- a/paludis/repositories/cran/Makefile.am +++ b/paludis/repositories/cran/Makefile.am @@ -95,3 +95,6 @@ cran_installed_repository-sr.hh : cran_installed_repository.sr $(top_srcdir)/mis cran_installed_repository-sr.cc : cran_installed_repository.sr $(top_srcdir)/misc/make_sr.bash $(top_srcdir)/misc/make_sr.bash --source $(srcdir)/cran_installed_repository.sr > $@ +built-sources : $(BUILT_SOURCES) + for s in $(SUBDIRS) ; do $(MAKE) -C $$s built-sources || exit 1 ; done + diff --git a/paludis/repositories/fake/Makefile.am b/paludis/repositories/fake/Makefile.am index 820ba2aab..688ff44ab 100644 --- a/paludis/repositories/fake/Makefile.am +++ b/paludis/repositories/fake/Makefile.am @@ -28,4 +28,6 @@ paludis_repositories_fake_include_HEADERS = \ fake_repository_base.hh \ fake_installed_repository.hh +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done diff --git a/paludis/repositories/nothing/Makefile.am b/paludis/repositories/nothing/Makefile.am index 54b1338be..97153077c 100644 --- a/paludis/repositories/nothing/Makefile.am +++ b/paludis/repositories/nothing/Makefile.am @@ -38,3 +38,6 @@ nothing_repository-sr.hh : nothing_repository.sr $(top_srcdir)/misc/make_sr.bash nothing_repository-sr.cc : nothing_repository.sr $(top_srcdir)/misc/make_sr.bash $(top_srcdir)/misc/make_sr.bash --source $(srcdir)/nothing_repository.sr > $@ +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done + diff --git a/paludis/repositories/portage/Makefile.am b/paludis/repositories/portage/Makefile.am index 3d6ff9142..98b6cbd07 100644 --- a/paludis/repositories/portage/Makefile.am +++ b/paludis/repositories/portage/Makefile.am @@ -125,3 +125,6 @@ endif TESTS = portage_repository_TEST $(GLSA_TESTS) check_PROGRAMS = $(TESTS) +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done + diff --git a/paludis/repositories/vdb/Makefile.am b/paludis/repositories/vdb/Makefile.am index 5be12dbbd..6b1b87b29 100644 --- a/paludis/repositories/vdb/Makefile.am +++ b/paludis/repositories/vdb/Makefile.am @@ -63,4 +63,6 @@ vdb_repository-sr.hh : vdb_repository.sr $(top_srcdir)/misc/make_sr.bash vdb_repository-sr.cc : vdb_repository.sr $(top_srcdir)/misc/make_sr.bash $(top_srcdir)/misc/make_sr.bash --source $(srcdir)/vdb_repository.sr > $@ +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done diff --git a/paludis/repositories/virtuals/Makefile.am b/paludis/repositories/virtuals/Makefile.am index d29e4511e..1a137869b 100644 --- a/paludis/repositories/virtuals/Makefile.am +++ b/paludis/repositories/virtuals/Makefile.am @@ -57,5 +57,8 @@ vr_entry-sr.hh : vr_entry.sr $(top_srcdir)/misc/make_sr.bash vr_entry-sr.cc : vr_entry.sr $(top_srcdir)/misc/make_sr.bash $(top_srcdir)/misc/make_sr.bash --source $(srcdir)/vr_entry.sr > $@ +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done + diff --git a/paludis/repository.hh b/paludis/repository.hh index 41bb06f51..ed8192dd9 100644 --- a/paludis/repository.hh +++ b/paludis/repository.hh @@ -146,6 +146,7 @@ namespace paludis * which return 0 if an interface is not available. * * \ingroup grprepository + * \nosubgrouping */ class Repository : private InstantiationPolicy<Repository, instantiation_method::NonCopyableTag>, @@ -166,8 +167,12 @@ namespace paludis */ Repository(const RepositoryName &, const RepositoryCapabilities &); - ///\name Implementations: naviagation functions - ///{ + /** + * \name Implementations: navigation functions + * + * These are implemented in subclasses to handle navigation queries. + */ + ///\{ /** * Override in descendents: fetch the metadata. @@ -209,17 +214,21 @@ namespace paludis */ virtual bool do_has_category_named(const CategoryNamePart &) const = 0; - ///} + ///\} - ///\name Implementations: misc files - ///{ + /** + * \name Implementations: misc files + * + * Various utility functions related to misc files. + */ + ///\{ /** * Override in descendents: is this a licence? */ virtual bool do_is_licence(const std::string &) const = 0; - ///} + ///\} public: virtual RepositoryInfo::ConstPointer info(bool verbose) const; diff --git a/paludis/repository.sr b/paludis/repository.sr index 2370e1d31..a1972b101 100644 --- a/paludis/repository.sr +++ b/paludis/repository.sr @@ -38,6 +38,7 @@ make_class_RepositoryCapabilities() * * \see Repository * \ingroup grprepository + * \nosubgrouping */ END diff --git a/paludis/selinux/Makefile.am b/paludis/selinux/Makefile.am index bcb56c178..1c7c1ed96 100644 --- a/paludis/selinux/Makefile.am +++ b/paludis/selinux/Makefile.am @@ -22,4 +22,7 @@ check_PROGRAMS = $(TESTS) AM_CXXFLAGS = -I$(top_srcdir) @PALUDIS_CXXFLAGS@ @PALUDIS_CXXFLAGS_VISIBILITY@ +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done + diff --git a/paludis/tasks/Makefile.am b/paludis/tasks/Makefile.am index 07ce51b9c..76c8b4196 100644 --- a/paludis/tasks/Makefile.am +++ b/paludis/tasks/Makefile.am @@ -30,3 +30,7 @@ libpaludistasks_a_SOURCES = $(paludis_tasks_include_HEADERS) \ uninstall_task.cc \ sync_task.cc +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done + + diff --git a/paludis/util/Makefile.am.m4 b/paludis/util/Makefile.am.m4 index 1adce6b3e..696fbbb2f 100644 --- a/paludis/util/Makefile.am.m4 +++ b/paludis/util/Makefile.am.m4 @@ -62,3 +62,7 @@ Makefile.am : Makefile.am.m4 files.m4 util.hh : util.hh.m4 files.m4 $(top_srcdir)/misc/do_m4.bash util.hh +changequote(`<', `>') +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done + diff --git a/ruby/Makefile.am b/ruby/Makefile.am index 7a9133a23..e4c607961 100644 --- a/ruby/Makefile.am +++ b/ruby/Makefile.am @@ -140,3 +140,7 @@ Paludis.so : $(OUR_OBJECTS) endif +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done + + diff --git a/ruby/demos/Makefile.am b/ruby/demos/Makefile.am index a5d0c9a80..0e05160af 100644 --- a/ruby/demos/Makefile.am +++ b/ruby/demos/Makefile.am @@ -37,4 +37,7 @@ rubydemos_DATA = $(IF_RUBY_DEMOS) endif +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done + diff --git a/src/Makefile.am b/src/Makefile.am index 796c8b4aa..2f442d69b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -7,3 +7,6 @@ noinst_LIBRARIES = libcolour.a libcolour_a_SOURCES = colour.cc colour.hh AM_CXXFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src @PALUDIS_CXXFLAGS@ +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done + diff --git a/src/adjutrix/Makefile.am b/src/adjutrix/Makefile.am index 11eac6e7e..3dfc8b306 100644 --- a/src/adjutrix/Makefile.am +++ b/src/adjutrix/Makefile.am @@ -85,4 +85,7 @@ find_dropped_keywords-sr.hh : find_dropped_keywords.sr $(top_srcdir)/misc/make_s find_dropped_keywords-sr.cc : find_dropped_keywords.sr $(top_srcdir)/misc/make_sr.bash $(top_srcdir)/misc/make_sr.bash --source $(srcdir)/find_dropped_keywords.sr > $@ +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done + diff --git a/src/gtkpaludis/Makefile.am b/src/gtkpaludis/Makefile.am index 26115a3af..2997b565b 100644 --- a/src/gtkpaludis/Makefile.am +++ b/src/gtkpaludis/Makefile.am @@ -61,3 +61,7 @@ packages_list-sr.hh : packages_list.sr $(top_srcdir)/misc/make_sr.bash packages_list-sr.cc : packages_list.sr $(top_srcdir)/misc/make_sr.bash $(top_srcdir)/misc/make_sr.bash --source $(srcdir)/packages_list.sr > $@ +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done + + diff --git a/src/gtkpaludis/vtemm/Makefile.am b/src/gtkpaludis/vtemm/Makefile.am index f51639808..22307231b 100644 --- a/src/gtkpaludis/vtemm/Makefile.am +++ b/src/gtkpaludis/vtemm/Makefile.am @@ -71,3 +71,7 @@ endif CLEANFILES = *~ gmon.out *.gcov *.gcno *.gcda $(vte_generated_sources) automake-deps-hack.tmp MAINTAINERCLEANFILES = Makefile.in +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done + + diff --git a/src/gtkpaludis/vtemm/converts/Makefile.am b/src/gtkpaludis/vtemm/converts/Makefile.am index d9fa379ff..ea65efb80 100644 --- a/src/gtkpaludis/vtemm/converts/Makefile.am +++ b/src/gtkpaludis/vtemm/converts/Makefile.am @@ -3,4 +3,7 @@ CLEANFILES = *~ MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = $(noinst_DATA) +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done + diff --git a/src/gtkpaludis/vtemm/defs/Makefile.am b/src/gtkpaludis/vtemm/defs/Makefile.am index 7fa3843ed..a741900d6 100644 --- a/src/gtkpaludis/vtemm/defs/Makefile.am +++ b/src/gtkpaludis/vtemm/defs/Makefile.am @@ -49,3 +49,7 @@ vte_vfuncs.defs : EXTRA_DIST = enum.pl generate_defs_vte.cc +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done + + diff --git a/src/paludis/Makefile.am b/src/paludis/Makefile.am index 4185f8841..2fd2116a8 100644 --- a/src/paludis/Makefile.am +++ b/src/paludis/Makefile.am @@ -74,3 +74,7 @@ CLEANFILES = *~ gmon.out *.gcov *.gcno *.gcda DISTCLEANFILES = $(man_MANS) MAINTAINERCLEANFILES = Makefile.in +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done + + diff --git a/src/qualudis/Makefile.am b/src/qualudis/Makefile.am index 7157136af..70db0bcd8 100644 --- a/src/qualudis/Makefile.am +++ b/src/qualudis/Makefile.am @@ -61,3 +61,7 @@ DISTCLEANFILES = $(man_pages) MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = $(man_pages) +built-sources : $(BUILT_SOURCES) + for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done + + diff --git a/test/Makefile.am b/test/Makefile.am index 90724b083..fe491aa3d 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -23,3 +23,6 @@ test_pass_TEST_LDADD = libtest.a test_fail_TEST_SOURCES = test_fail_TEST.cc test_fail_TEST_LDADD = libtest.a +built-sources : $(BUILT_SOURCES) + for s in $(SUBDIRS) ; do $(MAKE) -C $$s built-sources || exit 1 ; done + |