From 38c61b0dd534c190c623610fdfcebe253da8d05f Mon Sep 17 00:00:00 2001 From: maroy Date: Fri, 23 Jul 2004 15:33:30 +0000 Subject: [PATCH] added development environment documentation --- .../autoconfConfigureConventions.html | 68 ++++++ .../buildEnvironment.html | 74 +++++++ .../cxxHeaderFileConventions.html | 200 ++++++++++++++++++ .../cxxSourceFileConventions.html | 151 +++++++++++++ .../directoryStructure.html | 163 ++++++++++++++ .../fileConventions.html | 114 ++++++++++ .../htmlFileConventions.html | 93 ++++++++ .../doc/developmentEnvironment/index.html | 37 ++++ .../makefileConventions.html | 143 +++++++++++++ .../shellScriptConventions.html | 77 +++++++ .../developmentEnvironment/templates/Bar.cxx | 70 ++++++ .../developmentEnvironment/templates/Bar.h | 111 ++++++++++ .../developmentEnvironment/templates/Makefile | 123 +++++++++++ .../templates/configure.ac | 49 +++++ .../templates/htmlDocumentTemplate.html | 29 +++ .../templates/shellScriptTemplate.sh | 33 +++ 16 files changed, 1535 insertions(+) create mode 100644 livesupport/doc/developmentEnvironment/autoconfConfigureConventions.html create mode 100644 livesupport/doc/developmentEnvironment/buildEnvironment.html create mode 100644 livesupport/doc/developmentEnvironment/cxxHeaderFileConventions.html create mode 100644 livesupport/doc/developmentEnvironment/cxxSourceFileConventions.html create mode 100644 livesupport/doc/developmentEnvironment/directoryStructure.html create mode 100644 livesupport/doc/developmentEnvironment/fileConventions.html create mode 100644 livesupport/doc/developmentEnvironment/htmlFileConventions.html create mode 100644 livesupport/doc/developmentEnvironment/index.html create mode 100644 livesupport/doc/developmentEnvironment/makefileConventions.html create mode 100644 livesupport/doc/developmentEnvironment/shellScriptConventions.html create mode 100644 livesupport/doc/developmentEnvironment/templates/Bar.cxx create mode 100644 livesupport/doc/developmentEnvironment/templates/Bar.h create mode 100644 livesupport/doc/developmentEnvironment/templates/Makefile create mode 100644 livesupport/doc/developmentEnvironment/templates/configure.ac create mode 100644 livesupport/doc/developmentEnvironment/templates/htmlDocumentTemplate.html create mode 100755 livesupport/doc/developmentEnvironment/templates/shellScriptTemplate.sh diff --git a/livesupport/doc/developmentEnvironment/autoconfConfigureConventions.html b/livesupport/doc/developmentEnvironment/autoconfConfigureConventions.html new file mode 100644 index 000000000..bb30c9f66 --- /dev/null +++ b/livesupport/doc/developmentEnvironment/autoconfConfigureConventions.html @@ -0,0 +1,68 @@ + + + + + autoconf configure file conventions + + + +

Preface

+This document is part of the LiveSupport +project, Copyright © 2004 Media +Development Loan Fund, under the GNU GPL.
+ +

Scope

+This document describes the autoconf configure file conventions for the +LiveSupport +project. See also the generic description of the file +conventions in the LiveSupport +project.
+

Introduction

+Autoconf configure input files are processed by GNU autoconf and automake to generate +a configure script, which in turn generates Makefiles and other files +based on the system specifics it is run on. These are text +based files, thus they should adhere to the generic text-based +conventions.
+

Naming

+Autoconf configure files are named either configure.ac +(for autoconf) or sometimes configure.am (for automake).
+

Structure

+Autoconf configure files are partitioned by using the following 80 +column +wide partitioning comment:
+
dnl-----------------------------------------------------------------------------
dnl This is the title of the partition
dnl-----------------------------------------------------------------------------
+The file has the +following mandatory structure:
+ +

Header

+The header holds all information mandated by the generic guidelines, but +starting with the autoconf comment sequence dnl. Note the +80 +column wide partitioning delimiter enclosing the header.
+
dnl-----------------------------------------------------------------------------
dnl Copyright (c) 2004 Media Development Loan Fund
dnl
dnl This file is part of the LiveSupport project.
dnl http://livesupport.campware.org/
dnl To report bugs, send an e-mail to bugs@campware.org
dnl
dnl LiveSupport is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
dnl LiveSupport is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with LiveSupport; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
dnl
dnl
dnl Author : $Author: maroy $
dnl Version : $Revision: 1.1 $
dnl Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/doc/developmentEnvironment/autoconfConfigureConventions.html,v $
dnl-----------------------------------------------------------------------------
+

Additional sections

+Additional sections contain the autoconf configuration macro calls. +Bigger +parts of the file may be partitioned by the partitioning commend seen +above.
+

Template

+See a generic template +for autoconf configurations. You may freely copy this +template when starting to create a new document.
+
+ + diff --git a/livesupport/doc/developmentEnvironment/buildEnvironment.html b/livesupport/doc/developmentEnvironment/buildEnvironment.html new file mode 100644 index 000000000..f0f79dac8 --- /dev/null +++ b/livesupport/doc/developmentEnvironment/buildEnvironment.html @@ -0,0 +1,74 @@ + + + + + Build environment + + + +

Preface

+This document is part of the LiveSupport +project, Copyright © 2004 Media +Development Loan Fund, under the GNU GPL.
+ +

Scope

+This document describes the build environment for components of the +LiveSupport project.
+

Introduction

+As seen in the directory structure +description, each component is contained in its own directory, and has +the same general directory layout, which includes a Makefile on the top +of the directory. All components are build by GNU make working on +that Makefile. This document describes the targets for that Makefile.
+
+Parts of this document is inspired by the GNU Coding Standards +Makefile +Conventions Standard targets.
+

Make targets
+

+The following make targets are required for all components to support:
+ +

all

+Compile all source files for this component.  As a result, the +component is ready to be run (if an executable) or linked to (if a +library).
+This target traverses the dependent modules, and executes the all +target on them, if their targets do not exist.
+

clean

+Delete all files generated by the all target, but only for this module +(e..g. no files for dependent modules are deleted).
+

depclean

+Delete all the dependent target files. Executing the depclean target +with an all target afterwards results in a full recompilation of all +the dependent modules.
+

doc

+Generate the documentation for this component. This would include +processing info pages, or using tools to generate documentation based +on comments in the source code (like javadoc).
+

dist

+Create a distribution package for this component. This involves +possibly compiling, document generation and other tasks, and results in +an archive containing the distribution.
+

check

+Run all tests, especially unit tests, for the component. This usually +results in a generated test-report.
+
+ + diff --git a/livesupport/doc/developmentEnvironment/cxxHeaderFileConventions.html b/livesupport/doc/developmentEnvironment/cxxHeaderFileConventions.html new file mode 100644 index 000000000..4c244c101 --- /dev/null +++ b/livesupport/doc/developmentEnvironment/cxxHeaderFileConventions.html @@ -0,0 +1,200 @@ + + + + + C++ header file conventions + + + +

Preface

+This document is part of the LiveSupport +project, Copyright © 2004 Media +Development Loan Fund, under the GNU GPL.
+ +

Scope

+This document describes C++ header file conventions for the +LiveSupport +project. See also the generic description of the file +conventions in the LiveSupport +project.
+

Introduction

+C++ header files are files containing declarations of structures, +functions and classes, that may be shared among object files, by +including them with the pre-processor directive #include +in multiple source files. They are text +based files, thus they should adhere to the generic text-based +conventions.
+
+The LiveSupport project uses a strong object oriented approach. Part of +this approach is to group declarations of classes into their own files: +one header file and one source file for each class. Therefore each C++ +header file contains the declaration of exactly one C++ class, although +inner types are defined in the same file.
+

Naming

+A C++ header files name reflects the class it is defining. Class names +begin with a capital letter, followed by lower case letters. In case of +a multiple word class name, the first letter of each word is +capitalized. Example class names are Foo and FooBar.
+
+As the name of the header file reflects the name of the class defined +in it, the header file will be named exactly as the class inside, with +the .h extension. Thus a class named Foo is +defined in +the header file Foo.h, and the class named SomeOtherLongNamedClass +is defined in the header file named SomeOtherLongNamedClass.h.
+

Structure

+C++ files are partitioned by using the following 80 column wide +partitioning comment:
+
/* ==================================================== name of the partition */
+Note that the comment is always 80 columns wide, independent of the +length of the text within.
+
+The file has the +following mandatory structure:
+ +

Header

+The header holds all information mandated by the generic guidelines. It begins +with the generic header information, enclosed in 80 +column wide partitioning delimiters.
+
+After this a macro definition follows, prohibiting the multiple time +inclusion of the header file. The name of the header-identity macro is +derived from the full name the file is expected to be included as. The +macro name is formed by replacing all non-alphanumeric characters from +the expected include definition with the '_' (underscore) character. +For a header file that will be included with the line:
+
#include "Foo.h"
+the identity macro is defined as Foo_h. For a header file +that is expected to be included as:
+
#include "LiveSupport/Foo/Bar.h"
+the identity macro is defined as LiveSupport_Foo_Bar_h.
+
+After the identity macro, a preprocessor check is performed to see if +the file is being processessed by a C++ compiler (and say not a C +compiler).
+

Sample

+A sample for a C++ header file header follows, where the file itself +would be expected to be included as "LiveSupport/Foo/Bar.h".
+
+
/*------------------------------------------------------------------------------

Copyright (c) 2004 Media Development Loan Fund

This file is part of the LiveSupport project.
http://livesupport.campware.org/
To report bugs, send an e-mail to bugs@campware.org

LiveSupport 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 2 of the License, or
(at your option) any later version.

LiveSupport 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 LiveSupport; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


Author : $Author: maroy $
Version : $Revision: 1.1 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/doc/developmentEnvironment/cxxHeaderFileConventions.html,v $

------------------------------------------------------------------------------*/
#ifndef LiveSupport_Foo_Bar_h
#define LiveSupport_Foo_Bar_h

#ifndef __cplusplus
#error This is a C++ include file
#endif

+

Include files & namespace
+

+This section contains all the include files that the header file needs +to include, plus namespace declarations. The include files are listed +in a most generic to most specific order: firts system include files, +then other LiveSupport module include files, and finnally include files +from the same module / product are listed.
+
+After the includes, namespace definitions follow. Each LiveSupport +object is contained in its own namespace inside the LiveSupport +namespace, thus this is a nested namespace declaration.
+
+After the namespace declarations, the namespaces used within the +include file itself are listed with using namespace +clauses. Note that the using namespace clauses are +strictly within the namespace declaration clauses, so that they only +take effect within the header file, but not afterwards.
+

Sample

+A sample include files & namespaces section follows.
+
/* =============================================== include files & namespaces */

#ifdef HAVE_CONFIG_H
#include "configure.h"
#endif

#if HAVE_STDLIB_H
#include <stdlib.h>
#else
#error need stdlib.h
#endif

#include <string>


namespace LiveSupport {
namespace Foo {

using namespace LiveSupport::Core;

+

Constants

+The constants section contains static constant values defined in the +header file. +Nowhere in the header file may be other static constants defined. This +section is +rarely used, as static constants  outside classes are discurraged,
+

Sample

+A sample constants section follows.
+
/* ================================================================ constants */

/**
* The contant value of foo bar.
*/
static const int fooBarConst;
+

Macros

+The macros section contains any macros defined in the header file. +Nowhere in the header file may be other macros defined. This section is +rarely used, as macros are discurraged,
+

Sample

+A sample macros section follows.
+
/* =================================================================== macros */

/**
* Some very important macro.
*/
#define SOME_MACRO "some macro"
+

Data types

+This section contains the data type definitions of the header file, +most notable the definition of the class this header file is named +after.
+
+The class itself and all its members (including private members) are +described by doxygen comments. +The Java style of commenting is to be used.  For the comment +describing the entire class, the @author and @version +tags are mandatory. For each member function, all parameters, the +return value and all possibly thrown exceptions are to be documented.
+
+The class lists its members in the following order:
+ +Within each of the above blocks, the order is the following:
+ +For proper indentation of the above blocks, see the example below.
+

Sample

+A sample data types section follows.
+
/* =============================================================== data types */

/**
* Hello class.
* The only purpose of this class is to say hello.
*
* @author $Author: maroy $
* @version $Revision: 1.1 $
*/
class Hello
{
private:
/**
* Our famous hello string.
*/
static const std::string helloWorld;

public:
/**
* Default constructor.
*/
Hello (void) throw ()
{
}

/**
* Say hello.
*
* @return the string "Hello, World!"
* @exception std::exception on problems
*/
const std::string
hello (void) throw (std::exception)
{
return helloWorld;
}
};

+

External data structures
+

+The external data structures section contains any external data +definitions needed by the header file, that may be defined externally. +Nowhere in the header file may other external data definitions exist. +This section is +rarely used, as external data definitions are discouraged.
+

Sample

+A sample external data structures section follows.
+
/* ================================================= external data structures */

/**
* An externally defined data, which the linker will find.
*/
extern int fooBarInt;

+

Function prototypes
+

+The function prototypes section contains any function prototypes +defined by the header file, that are not members of classes. +Nowhere in the header file may other such definitions exist. +This section is seldom used, as functions outside classes are +discouraged.
+

Sample

+A sample function prototypes section follows.
+
/* ====================================================== function prototypes */

/**
* An important foo function.
*
* @return the result of foo.
*/
int foo(void) throw ();
+

Footer

+The footer of the header file closes the namespace brackets opened in +the include files & namespaces section, and also ends the header +identity macro #ifdef section opened in the header.
+

Sample

+A sample footer section follows.
+
+
} // namespace Foo
} // namespace LiveSupport

#endif // LiveSupport_Foo_Bar_h
+

Template

+See a template +C++ header file. You may freely copy this +template when starting to create a new header file.
+
+ + diff --git a/livesupport/doc/developmentEnvironment/cxxSourceFileConventions.html b/livesupport/doc/developmentEnvironment/cxxSourceFileConventions.html new file mode 100644 index 000000000..bb0eef9eb --- /dev/null +++ b/livesupport/doc/developmentEnvironment/cxxSourceFileConventions.html @@ -0,0 +1,151 @@ + + + + + C++ source file conventions + + + +

Preface

+This document is part of the LiveSupport +project, Copyright © 2004 Media +Development Loan Fund, under the GNU GPL.
+ +

Scope

+This document describes C++ source file conventions for the +LiveSupport +project. See also the generic description of the file +conventions in the LiveSupport +project.
+

Introduction

+C++ source files are files containing implementations of functions and +definitions of static data. They are text +based files, thus they should adhere to the generic text-based +conventions.
+
+The LiveSupport project uses a strong object oriented approach. Part of +this approach is to group implementations of classes into their own +files: one header file and one source file for each class. Therefore +each C++ source file contains implementation of exactly one C++ class, +although static (local) functions may be defined as well.
+

Naming

+A C++ source files name reflects the class it is implementing. Class +names begin with a capital letter, followed by lower case letters. In +case of a multiple word class name, the first letter of each word is +capitalized. Example class names are Foo and FooBar.
+
+As the name of the source file reflects the name of the class it +implements, the source file will be named exactly as the class inside, +with the .cxx extension. Thus a class named Foo +is implemented in the source file Foo.cxx, and the class +named SomeOtherLongNamedClass is implemented in the +source file named SomeOtherLongNamedClass.cxx.
+

Structure

+C++ files are partitioned by using the following 80 column wide +partitioning comment:
+
/* ==================================================== name of the partition */
+Note that the comment is always 80 columns wide, independent of the +length of the text within.
+
+Local data type definitions and function prototypes required +doxygen-style commenting.
+
+Function implementations and static data definitions were already +commented for doxygen at their place of declaration. Therefore these +are preceded by the following simple comment header.
+
/*------------------------------------------------------------------------------
 * Function implementation below.
*----------------------------------------------------------------------------*/
+
+The file has the +following mandatory structure:
+ +

Header

+The header holds all information mandated by the generic guidelines. It contains +with the generic header information, enclosed in 80 +column wide partitioning delimiters.
+

Sample

+A sample for a C++ source file header follows.
+
/*------------------------------------------------------------------------------

Copyright (c) 2004 Media Development Loan Fund

This file is part of the LiveSupport project.
http://livesupport.campware.org/
To report bugs, send an e-mail to bugs@campware.org

LiveSupport 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 2 of the License, or
(at your option) any later version.

LiveSupport 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 LiveSupport; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


Author : $Author: maroy $
Version : $Revision: 1.1 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/doc/developmentEnvironment/cxxSourceFileConventions.html,v $

------------------------------------------------------------------------------*/

+

Include files & namespaces
+

+This section contains all the include files that the source file needs +to include, plus namespace references. The include files are listed in +a most generic to most specific order: first system include files, then +other LiveSupport module include files, and finally include files from +the same module / product are listed. The last one is the header file +for the class this source file implements.
+
+After the includes, the namespaces used within the source file itself +are listed with using namespace clauses. The order of the +using namespace declarations is also from most generic to +most specific, the last one being the namespace of the class this +source file implements.
+

Sample

+A sample include files & namespaces section follows.
+
/* =============================================== include files & namespaces */

#ifdef HAVE_CONFIG_H
#include "configure.h"
#endif

#if HAVE_STDLIB_H
#include <stdlib.h>
#else
#error need stdlib.h
#endif

#include <string>

#include <LiveSupport/Foo/Bar.h>


using namespace LiveSupport::Core;
using namespace LiveSupport::Foo;

+

Local data structures
+

+The constants section contains locally defined data structures, that +are not used anywhere outside this source file. +Nowhere in the source file may be other data structure definitions. +This section is +rarely used, as reusable data structures are encouraged.
+

Sample

+A sample local data structures section follows.
+
/* ===================================================  local data structures */

/**
* The union of foo.
*/
union foo {
int foo;
long bar;
};
+

Local constants & macros

+The local constants & macros section contains any macros and +constant values used in this source file. It also contains the +definitions for constant values of the class this source file +implements. Nowhere in the source file may be other macros or constants +defined.
+
+Having local constants is discouraged. Have private static class +members instead.
+

Sample

+A sample local constants & macros section follows.
+
/* ================================================  local constants & macros */

/*------------------------------------------------------------------------------
 * The famous foo string for the class Bar.
*----------------------------------------------------------------------------*/
const std::string Bar::fooStr = "foo";

+

Local function prototypes
+

+This section contains the prototypes for local functions, which are +only used in this source file. Nowhere else in the source file may +function prototypes be other than in this section. This section is +rarely used, local functions are discouraged. Use private class member +functions instead.
+

Sample

+A sample local function prototypes section follows.
+
/* ===============================================  local function prototypes */

/**
* Some local function.
*
* @param parameter some parameter
* @return a very big return value.
*/
int
localFunction(int parameter) throw ();

+

Module code
+

+This section contains the implementation for the class it is made for. +Also contains the implementation for all local functions. The +implementation order is not defined.
+

Sample

+A sample module code section follows.
+
/* =============================================================  module code */

/*------------------------------------------------------------------------------
 * Return the famous bar string.
*----------------------------------------------------------------------------*/
const std::string
Bar :: sayBar(void) throw (std::exception)
{
if (barInt) {
throw std::exception();
}

return barStr;
}

+

Template

+See a template +C++ source file. You may freely copy this +template when starting to create a new source file.
+
+ + diff --git a/livesupport/doc/developmentEnvironment/directoryStructure.html b/livesupport/doc/developmentEnvironment/directoryStructure.html new file mode 100644 index 000000000..5ff4cfb93 --- /dev/null +++ b/livesupport/doc/developmentEnvironment/directoryStructure.html @@ -0,0 +1,163 @@ + + + + + Directory structure + + + +

Preface

+This document is part of the LiveSupport +project, Copyright © 2004 Media +Development Loan Fund, under the GNU GPL.
+ +

Scope

+This document describes the directory structure used for all component +of the LiveSupport project.
+

Introduction

+It is important to define a common and uniform directory structure in +order to allow more seamless cooperation between participants of the +project. It also helps referencing the various components (modules, +etc.), as all the components will have a predictable and stable file +hierarchy.
+
+As seen below, the main inspiration for each components directory +structure is the Filesystem +Hierarchy Standard.
+

Overall structure

+The base livesupport directory contains all the special tools needed to +build, test and run LiveSupport, along with all the source code that +constitutes LiveSupport itself.
+
+The self written part of LiveSupport project consists of re-usable +modules, and products. +Modules are components that do not execute by themselves, but have a +useful, preferably generic functionality. Products are the executable +components that are actually run by users.
+
+Both modules and products may reference (depend on) other modules, but +circular reference is not allowed.
+
+Other needed parts of the directory structure are involved with +external libraries LiveSupport depends on, and a running environment +where LiveSupport can run.
+
+The directory structure is organized in the following way:
+
+ +
livesupport
|-- Makefile
|-- doc
|-- etc
|-- modules
| |-- module1
| |-- module2
...
| `-- moduleN
|-- products
| |-- product1
| |-- product2
| ...
| `-- productN
|-- tools
| |-- tool1
| |-- tool2
| ...
| `-- tool3
`-- usr
+
+

Referencing modules and the running environment
+

+As a consequence of the directory structure above, if a module is +referencing an other (e.g. moduleX), than it can be sure that it is +located at ../moduleX. If a product is referencing the +same module, it can be sure that it is located at ../../modules/moduleX.
+
+Furthermore, if a module or product is referencing the running +environment under livesupport/usr, it can also be sure +that it is located at ../../usr from either the module or +the product directory.
+
+Referencing always means exactly that: no contents are copied from one +module directory to an other. For example for a module or product to +reference the shared libraries of moduleX means to do exactly that: +link to the library ../../modules/moduleX/lib/libmoduleX.so.
+

Top-level Makefile

+The top-level Makefile provides targets that effect the whole of the +LiveSupport project. Currently the only target is doc, +which generates the documentations for the whole project under the doc +directory.
+
+

Documentation directory

+The doc directory contains generic documentation with respect to the +whole LiveSupport project. Documentation pertaining to a module or +products should go under the modules' or products' directory, +respectively.
+

Configuration files

+Under the etc directory project-wide configuration files +are found, like the ones used by the top-level Makefile.
+

Module structure

+Each module has the same directory structure, which is as follows:
+
+
moduleX
|-- Makefile
|-- bin
|-- etc
|-- include
| `-- LiveSupport
| `-- ModuleX
|-- lib
|-- src
|-- tmp
`-- var
+

Makefile

+A makefile executable by GNU make. See the build environment document for a +detailed description.
+

bin

+Directory containing all executables, either if these are executable +used for building the module, or executables resulting from the build.
+

etc

+All configuration files go here.
+

include

+The public C/C++ header files for this module. The include files are +stored in a subdirectory that completely replicates the namespacing of +the module itself, in a case-sensitive manner. Thus a header file name Foo.h +for ModuleX would be contained in the directory include/LiveSupport/ModuleX/Foo.h, +and would be included with the line:
+
+
#include "LiveSupport/ModuleX/Foo.h"
+

lib

+Directory containing all shared and static libraries that are generated +by building the module. All external, third-party libraries used by +this module should be installed into the ../../usr/lib +directory. The libraries are named resembling the full namespacing of +the module, but all lower cased. For example, the library for moduleX +would be named liblivesupport_modulex.so, and thus would +be linked to with the linker option -L../../modules/moduleX/lib +-llivesupport_modulex.
+

src

+Contains all source files. A source file is a file which is processed +(compiled, etc.) by the build process, and as a result some target +files are generated from it.
+

tmp

+A temporary directory, holding temporary files used by the build +process. This directory either does not exist in the configuration +management system, or is empty there.
+

var

+Directory containing data. This can range from XML data to HTML pages +to all other files that are not source files (are not processed by the +build process). Note that web-page scripting files like PHP files also +fall into this category.
+

Product structure

+The directory structure for a product is in essence the same as for +modules, described above, with the difference that products don't have +externally visible include files, thus their directories don't contain +an include directory.
+

Tools structure

+The tools directory is an archive of tools and external libraries used +for either building or running the LiveSupport system. These tools are +installable to the usr directory of the LiveSupport directory tree.
+Each tool has its own directory, where several versions of the same +tool may reside. Thus the generic directory structure is as follows:
+
tools
|-- tool1
| |-- tool1-X
| |-- tool1-Y
| ...
| `-- tool1-Z
...
`-- toolN
|-- toolN-A
|-- toolN-B
...
`-- toolN-C
+Thus a user can select version X of toolK to be installed by selecting +the directory tools/toolK/toolK-X. Each tool directory +has the following structure:
+
toolK-X
|-- bin
| `-- install.sh
|-- etc
|-- src
| `-- toolK-X.tar.gz
`-- tmp
+The script bin/install.sh is responsible for installing +the specific tool under the livesupport/usr directory. +This typically involves the following steps:
+
cd tmp
tar xfz ../src/toolK-X.tar.gz
./configure --prefix=../../../../usr
make install
+In case the source needs to patched before compilation, the patches may +be contained in the etc directory.
+

usr structure

+The usr directory is similar to the /usr system directory on UNIX +systems (see the Filesystem +Hierarchy Standard). This directory contains all the external tools +needed by either developing or running the LiveSupport system. This +directory is separate from the system /usr directory in order to +facilitate changing the configuration for LiveSupport related libraries +and tools in user space.
+
+ + diff --git a/livesupport/doc/developmentEnvironment/fileConventions.html b/livesupport/doc/developmentEnvironment/fileConventions.html new file mode 100644 index 000000000..5e3e0fe1c --- /dev/null +++ b/livesupport/doc/developmentEnvironment/fileConventions.html @@ -0,0 +1,114 @@ + + + + + File Conventions + + + +

Preface

+This document is part of the LiveSupport +project, Copyright © 2004 Media +Development Loan Fund, under the GNU GPL.
+ +

Scope

+This document describes the conventions used for files in the +LiveSupport project.
+

Introduction

+To facilitate cooperation between multiple contributors, it is +advisable to have common file conventions, so as the result of +different peoples work have a uniform look and form. This document +lists the file conventions for the different file formats used by the +project.
+
+Where the description of the conventions is ambiguous, the examples +given are binding, and are to be followed.
+

Generic conventions

+In general, all documents have the following structure:
+ +

header
+

+The header of the file holds:
+ +Following the GNU GPL guidelines on +applying a license term to source files, the typical header for a text +file looks like the following:
+
+
    Copyright (c) 2004 Media Development Loan Fund

This file is part of the LiveSupport project.
http://livesupport.campware.org/
To report bugs, send an e-mail to bugs@campware.org

LiveSupport 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 2 of the License, or
(at your option) any later version.

LiveSupport 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 LiveSupport; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


Author : $Author: maroy $
Version : $Revision: 1.1 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/doc/developmentEnvironment/fileConventions.html,v $

+Note the CVS keywords (as an example) for having up-to-date information +on the author, version and location of the file.
+

partitions

+Each file is split into separate partitions, and maintains its +structure with the fixed sequence of these partitions. File formats +differ heavily on the capabilities of defining partitions - some have +explicit support (like HTML with headers and paragraphs), while in some +the commenting feature can be used to visually split up the file (like +comments in source code).
+
+The exact nature and sequence of the partitions is dependent on the +nature of the file itself.
+

Generic text-based conventions

+The majority (if not) all sources files are text-based. As a general +rule, text-based files adhere to the following conventions in the +LiveSupport project:
+

UTF-8

+Whenever possible, the text files should be saved in the UTF-8 character +encoding, to enable all characters within covered by the Unicode +character set.
+

80 columns

+Don't exceed 80 columns for any line in the file, unless it's +absolutely necessary (like having a single expression over 80 columns +that can not be broken up by a new-line character).
+

no tabs - 4 spaces

+Don't use the tab character in text files - use 4 spaces instead for +indentation.
+

Specific conventions

+For specific file conventions, see the separate descriptions below.
+

html

+convention and template.
+

shell scripts

+convention and template.
+

Makefiles

+convention and template.
+

Autoconf configure files
+

+convention and template.
+

C++ files

+There are specific conventions for the header files and the source +files.
+

C++ header files

+convention and template.
+

C++ source files

+convention and template.
+
+ + diff --git a/livesupport/doc/developmentEnvironment/htmlFileConventions.html b/livesupport/doc/developmentEnvironment/htmlFileConventions.html new file mode 100644 index 000000000..78a4f2e65 --- /dev/null +++ b/livesupport/doc/developmentEnvironment/htmlFileConventions.html @@ -0,0 +1,93 @@ + + + + + HTML file conventions + + + +

Preface

+This document is part of the LiveSupport +project, Copyright © 2004 Media +Development Loan Fund, under the GNU GPL.
+ +

Scope

+This document describes the HTML file conventions for the LiveSupport +project. See also the generic description of the file conventions in the LiveSupport +project.
+

Introduction

+HTML pages written as part of the LiveSupport documentation should +conform to either the HTML 4.01 +Transitional or XHTML 1.0 +Transitional specifications.
+

Naming

+HTML document files are named by the following rules:
+ +For example, a file with a single-word name may be named like: single.html, +whereas a file with multiple word name would be like: multipleWordNameFile.html.
+

Structure

+Each HTML file is partitioned by using the <h1> +element to mark the start and name of each partition. The file has the +following mandatory structure:
+ +

HTML header

+The HTML header of the document should describe the title and author of +the document. The following HTML code should be inside the <head> +element for the HTML page:
+
+
    <title>The title of the file</title>
<meta name="author" content="$Author: maroy $"/>
+

The Preface section

+This section holds the following specific text:
+
+
This document is part of the LiveSupport project, +Copyright © 2004 Media Development Loan +Fund, under the GNU GPL.
+ +
+

The Scope section

+This section describes the scope of the document in short form. This +details the areas which the document covers, and sometimes holds +references to related documents.
+

The Introductions section

+This optional section introduces the topic of the document to the +reader.
+

Additional sections

+These section hold the real content of the document, with freely named +sections and sub-sections. The normal HTML heading elements (<h1>, +<h2>, ...) should be used to mark and group the +sections. Sample source code included in the HTML document should be +put inside a <pre><code>...</code></pre> +block, like the following:
+
+
    // some sample code here
int i = 1;
+

Template

+See a generic template +for HTML documents. You may freely copy this +template when starting to create a new document.
+
+ + diff --git a/livesupport/doc/developmentEnvironment/index.html b/livesupport/doc/developmentEnvironment/index.html new file mode 100644 index 000000000..2bdf68d0d --- /dev/null +++ b/livesupport/doc/developmentEnvironment/index.html @@ -0,0 +1,37 @@ + + + + + LiveSupport development environment + + + +

Preface

+This document is part of the LiveSupport +project, Copyright © 2004 Media +Development Loan Fund, under the GNU GPL.
+ +

Scope

+This document gives an overview of the LiveSupport development +environment.
+

Introduction

+The LiveSupport project defines a uniform development environment to +enhance collaboration of participants in the project. The following +aspects of the environment are defined so far:
+ +
+
+ + diff --git a/livesupport/doc/developmentEnvironment/makefileConventions.html b/livesupport/doc/developmentEnvironment/makefileConventions.html new file mode 100644 index 000000000..26c42aa21 --- /dev/null +++ b/livesupport/doc/developmentEnvironment/makefileConventions.html @@ -0,0 +1,143 @@ + + + + + Makefile conventions + + + +

Preface

+This document is part of the LiveSupport +project, Copyright © 2004 Media +Development Loan Fund, under the GNU GPL.
+ +

Scope

+This document describes the Makefile file conventions for the +LiveSupport +project. See also the generic description of the file +conventions in the LiveSupport +project. This document does not describe the mandatory targets for +Makefiles, see the build environment +description for such details.
+

Introduction

+Makefiles are text-based files processed by GNU make. As text based +files, they should adhere to the generic text-based +conventions.
+

Naming

+Makefiles are always named Makefile. In case they are +input files for automake or autoconf, they can be named Makefile.in +or Makefile.am.
+

Structure

+Makefiles are partitioned by using the following 80 column wide +partitioning comment:
+
#-------------------------------------------------------------------------------
# This is the title of the partition
#-------------------------------------------------------------------------------
+The file has the +following mandatory structure:
+ +

Header

+The header holds all information mandated by the generic guidelines, but +starting with the Makefile comment character #. Note the +80 +column wide partitioning delimiter enclosing the header.
+
#-------------------------------------------------------------------------------
# Copyright (c) 2004 Media Development Loan Fund
#
# This file is part of the LiveSupport project.
# http://livesupport.campware.org/
# To report bugs, send an e-mail to bugs@campware.org
#
# LiveSupport 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 2 of the License, or
# (at your option) any later version.
#
# LiveSupport 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 LiveSupport; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#
# Author : $Author: maroy $
# Version : $Revision: 1.1 $
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/doc/developmentEnvironment/makefileConventions.html,v $
#-------------------------------------------------------------------------------
+

General command definitions
+

+This section contains definitions to commands used when executing the +make targets within this Makefile. All the commands should be collected +here, and a variable defined for them. This insures easy overview of +the commands the Makefile uses, and also makes it easy to migrate to +new commands, or the same commands in different locations.
+
+No external commands may be directly referenced outside this section.
+

Sample

+A sample general command definitions section follows.
+
#-------------------------------------------------------------------------------
# General command definitions
#-------------------------------------------------------------------------------
MKDIR = mkdir -p
RM = rm -f
RMDIR = rm -rf
DOXYGEN = doxygen

+

Basic directory and file definitions

+This section contains definitions for the directories and files +referenced in this Makefile. All directories referenced from the +Makefile, and all external files referenced by the Makefile should be +collected here. This insures easy adoption in case some external +directories or files change.
+
+No directories or external files may be directory referenced outside +this section.
+
+When referencing other LiveSupport modules, typically the following +variables are defined for them:
+
MODULEX_DIR         = ${MODULES_DIR}/moduleX
MODULEX_INCLUDE_DIR = ${MODULEX_DIR}/include
MODULEX_LIB_DIR = ${MODULEX_DIR}/lib
MODULEX_LIB = livesupport_modulex
+

Sample

+A sample directory and file definition section follows.
+
#-------------------------------------------------------------------------------
# Basic directory and file definitions
#-------------------------------------------------------------------------------
BASE_DIR = .
DOC_DIR = ${BASE_DIR}/doc
DOXYGEN_DIR = ${DOC_DIR}/doxygen
ETC_DIR = ${BASE_DIR}/etc
SRC_DIR = ${BASE_DIR}/src
TMP_DIR = ${BASE_DIR}/tmp


USR_DIR = ${BASE_DIR}/../../usr
USR_INCLUDE_DIR = ${USR_DIR}/include
USR_LIB_DIR = ${USR_DIR}/lib
BOOST_INCLUDE_DIR = ${USR_INCLUDE_DIR}/boost-1_31
LIBXMLPP_INCLUDE_DIR = ${USR_INCLUDE_DIR}/libxml++-1.0

MODULES_DIR = ${BASE_DIR}/../../modules

HELLOLIB_DIR = ${MODULES_DIR}/hello
HELLOLIB_INCLUDE_DIR = ${HELLOLIB_DIR}/include
HELLOLIB_LIB_DIR = ${HELLOLIB_DIR}/lib
HELLOLIB_LIB = livesupport_hello

VPATH = ${SRC_DIR}

HELLO_EXE = ${TMP_DIR}/hello

DOXYGEN_CONFIG = ${ETC_DIR}/doxygen.config

+

Configuration parameters

+This section contains the parameters passed to the building tools +(compiler, linker, etc.) When invoking building tools, they should be +parametrized by the definitions made here.
+

Sample
+

+A sample configuration parameters section follows.
+
#-------------------------------------------------------------------------------
# Configuration parameters
#-------------------------------------------------------------------------------
CPPFLAGS =
CXXFLAGS = -pedantic -Wall \
 -I${USR_INCLUDE_DIR} -I${HELLOLIB_INCLUDE_DIR} \
-I${INCLUDE_DIR} -I${TMP_DIR}
LDFLAGS = -L${USR_LIB_DIR} -L${HELLOLIB_LIB_DIR} -L${LIB_DIR}

+

Dependencies

+The dependencies section lists the objects that are build by implicit +rules, and that main targets depend on. This is the place where all +object files are listed, basically, for each library or executable.
+
+No object files that are built by this Makefile should be directly +referred to outside this section.
+

Sample

+A sample dependencies section follows.
+
#-------------------------------------------------------------------------------
# Dependencies
#-------------------------------------------------------------------------------
HELLO_EXE_OBJS = ${TMP_DIR}/main.o

+

Targets

+This section lists all the explicit, external targets for the makefile. +For a list of targets required, see the description +of the build environment. All targets in this section are marked as +.PHONY, as these targets are not building the files they are named +after.
+
+No explicit targets should be defined in the Makefile outside this +directory.
+

Sample

+A sample targets section follows.
+
#-------------------------------------------------------------------------------
# Targets
#-------------------------------------------------------------------------------
.PHONY: all dir_setup doc clean docclean depclean distclean

all: dir_setup ${HELLO_EXE}

dir_setup: ${TMP_DIR} ${DOXYGEN_DIR}

doc:
${DOXYGEN} ${DOXYGEN_CONFIG}

clean:
${RM} ${HELLO_EXE_OBJS} ${HELLO_EXE}

docclean:
${RMDIR} ${DOXYGEN_DIR}/html

depclean: clean

distclean: clean docclean
${RMDIR} ${TMP_DIR}/config* ${TMP_DIR}/autom4te*

+

Specific targets

+This section defines the targets for files to be built by the Makefile. +These are the targets that specify how files are built, but are not +covered by pattern rules.
+

Sample

+A sample specific targets section follows.
+
#-------------------------------------------------------------------------------
# Specific targets
#-------------------------------------------------------------------------------
${HELLO_EXE}: ${HELLO_EXE_OBJS}
${CXX} ${LDFLAGS} -o $@ $^ -l${HELLOLIB_LIB}

${TMP_DIR}:
${MKDIR} ${TMP_DIR}

${DOXYGEN_DIR}:
${MKDIR} ${DOXYGEN_DIR}

+

Pattern rules

+Pattern rules are the generic rules to build target files from object +files. Define these pattern rules in this section.
+
+No pattern rules should exist outside this section.
+

Sample

+A sample pattern rules section follows.
+
#-------------------------------------------------------------------------------
# Pattern rules
#-------------------------------------------------------------------------------
${TMP_DIR}/%.o : ${SRC_DIR}/%.cxx
${CXX} ${CPPFLAGS} ${CXXFLAGS} -c -o $@ $<

+
+

Template

+See a generic template +for Makefiles. You may freely copy this +template when starting to create a new Makefile.
+
+ + diff --git a/livesupport/doc/developmentEnvironment/shellScriptConventions.html b/livesupport/doc/developmentEnvironment/shellScriptConventions.html new file mode 100644 index 000000000..66ea9a32e --- /dev/null +++ b/livesupport/doc/developmentEnvironment/shellScriptConventions.html @@ -0,0 +1,77 @@ + + + + + shell script conventions + + + +

Preface

+This document is part of the LiveSupport +project, Copyright © 2004 Media +Development Loan Fund, under the GNU GPL.
+ +

Scope

+This document describes the shell script file conventions for the +LiveSupport +project. See also the generic description of the file +conventions in the LiveSupport +project.
+

Introduction

+Shell scripts are text-based executable shell command files. As text +based files, they should adhere to the generic text-based +conventions.
+

Naming

+Shell script files are named by the following rules:
+ +For example, a file with a single-word name may be named like: single.sh, +whereas a file with multiple word name would be like: multipleWordNameFile.sh.
+

Structure

+Shell script files are partitioned by using the following 80 column +wide partitioning comment:
+
#-------------------------------------------------------------------------------
# This is the title of the partition
#-------------------------------------------------------------------------------
+The file has the +following mandatory structure:
+ +

Reference to the shell
+

+This is the mandatory reference to the shell executable each script has +to begin with:
+
#!/bin/sh
+

Header

+The header holds all information mandated by the generic guidelines, but +starting with the shell comment character #. Note the 80 +column wide partitioning delimiter enclosing the header.
+
#-------------------------------------------------------------------------------
# Copyright (c) 2004 Media Development Loan Fund
#
# This file is part of the LiveSupport project.
# http://livesupport.campware.org/
# To report bugs, send an e-mail to bugs@campware.org
#
# LiveSupport 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 2 of the License, or
# (at your option) any later version.
#
# LiveSupport 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 LiveSupport; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#
# Author : $Author: maroy $
# Version : $Revision: 1.1 $
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/doc/developmentEnvironment/shellScriptConventions.html,v $
#-------------------------------------------------------------------------------
+

Additional sections

+Additional sections contain the executing code of the script. Bigger +parts of the script may be partitioned by the partitioning commend seen +above.
+

Template

+See a generic template +for shell scripts. You may freely copy this +template when starting to create a new document.
+
+ + diff --git a/livesupport/doc/developmentEnvironment/templates/Bar.cxx b/livesupport/doc/developmentEnvironment/templates/Bar.cxx new file mode 100644 index 000000000..bf4f17a09 --- /dev/null +++ b/livesupport/doc/developmentEnvironment/templates/Bar.cxx @@ -0,0 +1,70 @@ +/*------------------------------------------------------------------------------ + + Copyright (c) 2004 Media Development Loan Fund + + This file is part of the LiveSupport project. + http://livesupport.campware.org/ + To report bugs, send an e-mail to bugs@campware.org + + LiveSupport 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 2 of the License, or + (at your option) any later version. + + LiveSupport 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 LiveSupport; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + + Author : $Author$ + Version : $Revision$ + Location : $Source$ + +------------------------------------------------------------------------------*/ + +/* =============================================== include files & namespaces */ + +#ifdef HAVE_CONFIG_H +#include "configure.h" +#endif + +#include + + +using namespace LiveSupport::Core; +using namespace LiveSupport::Bar; + +/* =================================================== local data structures */ + + +/* ================================================ local constants & macros */ + +/*------------------------------------------------------------------------------ + * Our famous foo string. + *----------------------------------------------------------------------------*/ +const std::string Bar::fooStr = "foo"; + + +/* =============================================== local function prototypes */ + + +/* ============================================================= module code */ + +/*------------------------------------------------------------------------------ + * Return the famous bar string. + *----------------------------------------------------------------------------*/ +const std::string +Bar :: sayBar(void) throw (std::exception) +{ + if (barInt) { + throw std::exception(); + } + + return barStr; +} + diff --git a/livesupport/doc/developmentEnvironment/templates/Bar.h b/livesupport/doc/developmentEnvironment/templates/Bar.h new file mode 100644 index 000000000..f03da7d63 --- /dev/null +++ b/livesupport/doc/developmentEnvironment/templates/Bar.h @@ -0,0 +1,111 @@ +/*------------------------------------------------------------------------------ + + Copyright (c) 2004 Media Development Loan Fund + + This file is part of the LiveSupport project. + http://livesupport.campware.org/ + To report bugs, send an e-mail to bugs@campware.org + + LiveSupport 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 2 of the License, or + (at your option) any later version. + + LiveSupport 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 LiveSupport; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + + Author : $Author$ + Version : $Revision$ + Location : $Source$ + +------------------------------------------------------------------------------*/ +#ifndef LiveSupport_Foo_Bar_h +#define LiveSupport_Foo_Bar_H + +#ifndef __cplusplus +#error This is a C++ include file +#endif + + +/* =============================================== include files & namespaces */ + +#ifdef HAVE_CONFIG_H +#include "configure.h" +#endif + +#include + + +namespace LiveSupport { +namespace Foo { + +using namespace LiveSupport::Core; + +/* ================================================================ constants */ + + +/* =================================================================== macros */ + + +/* =============================================================== data types */ + +/** + * Bar class. + * This does nothing. + * + * @author $Author$ + * @version $Revision$ + */ +class Bar +{ + private: + /** + * A static member variable. + */ + static const std::string barStr; + + /** + * A member variable. + */ + int barInt; + + public: + /** + * Default constructor. + */ + Bar (void) throw () + { + } + + /** + * Say something. + * + * @param parameter a parameter we don't care about. + * @return the bar string. + * @exception std::exception on some problems. + */ + const std::string + sayBar (void) throw (std::exception) + { + return barStr; + } +}; + + +/* ================================================= external data structures */ + + +/* ====================================================== function prototypes */ + +} // namespace Foo +} // namespace LiveSupport + + +#endif // LiveSupport_Foo_Bar_H diff --git a/livesupport/doc/developmentEnvironment/templates/Makefile b/livesupport/doc/developmentEnvironment/templates/Makefile new file mode 100644 index 000000000..e52703f40 --- /dev/null +++ b/livesupport/doc/developmentEnvironment/templates/Makefile @@ -0,0 +1,123 @@ +#------------------------------------------------------------------------------- +# Copyright (c) 2004 Media Development Loan Fund +# +# This file is part of the LiveSupport project. +# http://livesupport.campware.org/ +# To report bugs, send an e-mail to bugs@campware.org +# +# LiveSupport 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 2 of the License, or +# (at your option) any later version. +# +# LiveSupport 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 LiveSupport; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# +# Author : $Author$ +# Version : $Revision$ +# Location : $Source$ +# +#------------------------------------------------------------------------------- + +#------------------------------------------------------------------------------- +# General command definitions +#------------------------------------------------------------------------------- +MKDIR = mkdir -p +RM = rm -f +RMDIR = rm -rf +DOXYGEN = doxygen + + +#------------------------------------------------------------------------------- +# Basic directory and file definitions +#------------------------------------------------------------------------------- +BASE_DIR = . +DOC_DIR = ${BASE_DIR}/doc +DOXYGEN_DIR = ${DOC_DIR}/doxygen +ETC_DIR = ${BASE_DIR}/etc +SRC_DIR = ${BASE_DIR}/src +TMP_DIR = ${BASE_DIR}/tmp + +VPATH = ${SRC_DIR} + +MODULES_DIR = ${BASE_DIR}/../../modules + +HELLOLIB_DIR = ${MODULES_DIR}/hello +HELLOLIB_INCLUDE_DIR = ${HELLOLIB_DIR}/include +HELLOLIB_LIB_DIR = ${HELLOLIB_DIR}/lib +HELLOLIB_LIB = livesupport_hello + +HELLO_EXE = ${TMP_DIR}/hello + +DOXYGEN_CONFIG = ${ETC_DIR}/doxygen.config + + +#------------------------------------------------------------------------------- +# Configuration parameters +#------------------------------------------------------------------------------- +CPPFLAGS = +CXXFLAGS = -pedantic -Wall \ + -I${TMP_DIR} -I${HELLOLIB_INCLUDE_DIR} +LDFLAGS = -L${HELLOLIB_LIB_DIR} + + +#------------------------------------------------------------------------------- +# Dependencies +#------------------------------------------------------------------------------- +HELLO_EXE_OBJS = ${TMP_DIR}/main.o + + +#------------------------------------------------------------------------------- +# Targets +#------------------------------------------------------------------------------- +.PHONY: all dir_setup doc clean docclean depclean distclean + +all: ${HELLOLIB_LIB} dir_setup ${HELLO_EXE} + +dir_setup: ${TMP_DIR} ${DOXYGEN_DIR} + +doc: + ${DOXYGEN} ${DOXYGEN_CONFIG} + +clean: + ${RM} ${HELLO_EXE_OBJS} ${HELLO_EXE} + +docclean: + ${RMDIR} ${DOXYGEN_DIR}/html + +depclean: clean + ${MAKE} -C ${HELLOLIB_DIR} clean + +distclean: clean docclean + ${RMDIR} ${TMP_DIR}/config* ${TMP_DIR}/autom4te* + + +#------------------------------------------------------------------------------- +# Specific targets +#------------------------------------------------------------------------------- +${HELLO_EXE}: ${HELLO_EXE_OBJS} + ${CXX} ${LDFLAGS} -o $@ $^ -l${HELLOLIB_LIB} + +${TMP_DIR}: + ${MKDIR} ${TMP_DIR} + +${DOXYGEN_DIR}: + ${MKDIR} ${DOXYGEN_DIR} + +${HELLOLIB_LIB}: + ${MAKE} -C ${HELLOLIB_DIR} all + + +#------------------------------------------------------------------------------- +# Pattern rules +#------------------------------------------------------------------------------- +${TMP_DIR}/%.o : ${SRC_DIR}/%.cxx + ${CXX} ${CPPFLAGS} ${CXXFLAGS} -c -o $@ $< + diff --git a/livesupport/doc/developmentEnvironment/templates/configure.ac b/livesupport/doc/developmentEnvironment/templates/configure.ac new file mode 100644 index 000000000..77a537461 --- /dev/null +++ b/livesupport/doc/developmentEnvironment/templates/configure.ac @@ -0,0 +1,49 @@ +dnl----------------------------------------------------------------------------- +dnl Copyright (c) 2004 Media Development Loan Fund +dnl +dnl This file is part of the LiveSupport project. +dnl http://livesupport.campware.org/ +dnl To report bugs, send an e-mail to bugs@campware.org +dnl +dnl LiveSupport is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2 of the License, or +dnl (at your option) any later version. +dnl +dnl LiveSupport is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with LiveSupport; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +dnl +dnl +dnl Author : $Author$ +dnl Version : $Revision$ +dnl Location : $Source$ +dnl----------------------------------------------------------------------------- + +dnl----------------------------------------------------------------------------- +dnl NOTE: Run all configure related scripts from the tmp directory of the +dnl project. +dnl This is due to the fact that configure spreads a lot of trash around, +dnl like atom4te cache directories, config.* files, etc. into the directory +dnl it is being run from. We clearly don't want these in our base directory. +dnl----------------------------------------------------------------------------- +AC_INIT(Hello, 1.0, bugs@campware.org) +AC_PREREQ(2.59) +AC_COPYRIGHT([Copyright (c) 2004 Media Development Loan Fund under the GNU GPL]) +AC_REVISION($Revision$) + +AC_CONFIG_SRCDIR(../src/main.cxx) + +AC_CONFIG_HEADERS(configure.h) +AC_PROG_CXX() + +AC_CHECK_HEADERS(unistd.h getopt.h) + +AC_CONFIG_FILES(../Makefile:../etc/Makefile.in) + +AC_OUTPUT() diff --git a/livesupport/doc/developmentEnvironment/templates/htmlDocumentTemplate.html b/livesupport/doc/developmentEnvironment/templates/htmlDocumentTemplate.html new file mode 100644 index 000000000..4b74a21c8 --- /dev/null +++ b/livesupport/doc/developmentEnvironment/templates/htmlDocumentTemplate.html @@ -0,0 +1,29 @@ + + + + + HTML document template + + + +

Preface

+This document is part of the LiveSupport +project, Copyright © 2004 Media +Development Loan Fund, under the GNU GPL.
+
    +
  • Author: $Author$
  • +
  • Version: $Revision$
  • +
  • Location: $Source$
  • +
+

Scope

+Describe the scope of your document here, e.g. what topic it is all +about
+

Introduction

+Introduce the content of the document to your reader
+

Additional sections

+Write about your topic in details here..
+
+ + diff --git a/livesupport/doc/developmentEnvironment/templates/shellScriptTemplate.sh b/livesupport/doc/developmentEnvironment/templates/shellScriptTemplate.sh new file mode 100755 index 000000000..2e04eeb5d --- /dev/null +++ b/livesupport/doc/developmentEnvironment/templates/shellScriptTemplate.sh @@ -0,0 +1,33 @@ +#!/bin/sh +#------------------------------------------------------------------------------- +# Copyright (c) 2004 Media Development Loan Fund +# +# This file is part of the LiveSupport project. +# http://livesupport.campware.org/ +# To report bugs, send an e-mail to bugs@campware.org +# +# LiveSupport 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 2 of the License, or +# (at your option) any later version. +# +# LiveSupport 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 LiveSupport; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# +# Author : $Author$ +# Version : $Revision$ +# Location : $Source$ +#------------------------------------------------------------------------------- + +#------------------------------------------------------------------------------- +# This script does nothing else, but says hello. +#------------------------------------------------------------------------------- + +echo "Hello!";