diff options
author | Bjoern Michaelsen <b_michaelsen@openoffice.org> | 2010-04-28 14:57:07 +0200 |
---|---|---|
committer | Bjoern Michaelsen <b_michaelsen@openoffice.org> | 2010-04-28 14:57:07 +0200 |
commit | 9c7c509ce9db36dc7986be323dce694947fde2fc (patch) | |
tree | 93d67c43b5ab833a6de9442688532f574c9bfef6 /solenv/doc | |
parent | 973bbe1e23c757b84bf68edd251fd195e0b6a449 (diff) |
CWS gnumake2: moving missing solaris.mk, documentation
Diffstat (limited to 'solenv/doc')
-rw-r--r-- | solenv/doc/gbuild/doxygen.cfg | 4 | ||||
-rw-r--r-- | solenv/doc/gbuild/solenv/gbuild/executable.mk | 27 | ||||
-rw-r--r-- | solenv/doc/gbuild/solenv/gbuild/gbuild.mk | 46 | ||||
-rw-r--r-- | solenv/doc/gbuild/solenv/gbuild/library.mk | 37 | ||||
-rw-r--r-- | solenv/doc/gbuild/solenv/gbuild/linktarget.mk | 128 | ||||
-rw-r--r-- | solenv/doc/gbuild/solenv/gbuild/static_library.mk | 35 | ||||
-rw-r--r-- | solenv/doc/gbuild/solenv/gbuild/types.mk | 141 | ||||
-rw-r--r-- | solenv/doc/gbuild/solenv/inc/gbuild.mk | 254 |
8 files changed, 416 insertions, 256 deletions
diff --git a/solenv/doc/gbuild/doxygen.cfg b/solenv/doc/gbuild/doxygen.cfg index 8e2fd440fcb4..86b35a6c5443 100644 --- a/solenv/doc/gbuild/doxygen.cfg +++ b/solenv/doc/gbuild/doxygen.cfg @@ -564,7 +564,7 @@ WARN_LOGFILE = # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = solenv/inc/gbuild.mk +INPUT = solenv/gbuild # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is @@ -830,7 +830,7 @@ DOCSET_FEEDNAME = "Doxygen generated docs" # reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen # will append .docset to the name. -DOCSET_BUNDLE_ID = org.doxygen.Project +DOCSET_BUNDLE_ID = org.openoffice.gbuild # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the diff --git a/solenv/doc/gbuild/solenv/gbuild/executable.mk b/solenv/doc/gbuild/solenv/gbuild/executable.mk new file mode 100644 index 000000000000..523f18330012 --- /dev/null +++ b/solenv/doc/gbuild/solenv/gbuild/executable.mk @@ -0,0 +1,27 @@ +#include <types.h> + +namespace gb +{ + using namespace types; + + class LinkTarget; + + class Executable : public IsCleanable, public HasDependencies, public IsLinking, public DeliversHeaders, public HasCompileSettings, public Target + { + public: + Executable(String name) {}; + + private: + /// private helper function for the constructor + void Executable_impl( + LinkTarget library_linktarget) {}; + /// platformdependant additional setup for constructor (used on Windows only) + void Executable_platform( + LinkTarget library_linktarget); + /// helper function to wrap LinkTargets functions (this is more or less pimpl ...) + void forward_to_linktarget(Function f) {}; + + static const List<String> TARGETTYPEFLAGS; + }; +} +/* vim: set filetype=cpp : */ diff --git a/solenv/doc/gbuild/solenv/gbuild/gbuild.mk b/solenv/doc/gbuild/solenv/gbuild/gbuild.mk new file mode 100644 index 000000000000..ec51b7ae6b3a --- /dev/null +++ b/solenv/doc/gbuild/solenv/gbuild/gbuild.mk @@ -0,0 +1,46 @@ + +#include <types.mk> +using namespace gb::types; + +// GNU make specific setup +static const Command SHELL; + + +// gbuild root directorys +static Path SRCDIR; +static Path OUTDIR; +static Path WORKDIR; + +// Expected from configure/environment +static const Integer OSL_DEBUG_LEVEL; +static const List<Path> JDKINCS; +static const List<Path> SOLARINC; +static const List<Path> SOLARLIB; +static const Path GBUILDDIR; +static const Path INPATH; +static const Path JAVA_HOME; +static const Path UPD; +static const String CVER; +static const String LIBXML_CFLAGS; +static const String OS; +static const String STLPORT_VER; +static const Bool DEBUG; +static const Bool PRODUCT; + +// gbuild global variables derived from the configure/environment +namespace gb +{ + static const Integer PRODUCT; + static const Integer DEBUGLEVEL; + static const Bool FULLDEPS; + static const List<String> GLOBALDEFS; +}; + +// GXX_INCLUDE_PATH (Linux) +// PTHREAD_CFLAGS (Linux) +// SYSTEM_ICU (Linux) +// SYSTEM_JPEG (Linux) +// SYSTEM_LIBXML (Linux) +// USE_SYSTEM_STL (Linux) + +/* vim: set filetype=cpp : */ diff --git a/solenv/doc/gbuild/solenv/gbuild/library.mk b/solenv/doc/gbuild/solenv/gbuild/library.mk new file mode 100644 index 000000000000..152578074ce5 --- /dev/null +++ b/solenv/doc/gbuild/solenv/gbuild/library.mk @@ -0,0 +1,37 @@ +#include <types.h> + +namespace gb +{ + using namespace types; + + class LinkTarget; + + class Library : public IsCleanable, public HasDependencies, public IsLinking, public DeliversHeaders, public HasCompileSettings, public Target + { + public: + Library(String name) {}; + + private: + /// private helper function for the constructor + void Library_impl( + LinkTarget library_linktarget) {}; + /// platformdependant additional setup for constructor (used on Windows only) + void Library_platform( + LinkTarget library_linktarget, + Path dllfile); + /// helper function to wrap LinkTargets functions (this is more or less pimpl ...) + void forward_to_linktarget(Function f) {}; + + /// List of buildable libraries (i.e. libraries that are not expected to exist outside of \$(OUTDIR) on the system). + static const List<Library> TARGETS; + /// List of additional defines for compiling objects for libraries + static const List<String> DEFS; + /// List of additional flags for linking a library + static const List<String> TARGETTYPEFLAGS; + /// Mapping from symbolic library names to dll filenames + static const Map<Library,Path> DLLFILENAMES; + /// Mapping from symbolic library names to filenames + static const Map<Library,Path> FILENAMES; + }; +} +/* vim: set filetype=cpp : */ diff --git a/solenv/doc/gbuild/solenv/gbuild/linktarget.mk b/solenv/doc/gbuild/solenv/gbuild/linktarget.mk new file mode 100644 index 000000000000..d1cf369d1974 --- /dev/null +++ b/solenv/doc/gbuild/solenv/gbuild/linktarget.mk @@ -0,0 +1,128 @@ +#include <types.h> + +namespace gb +{ + using namespace types; + + class LinkTarget; + class Library; + class StaticLibrary; + class SdiTarget; + class Package; + + /// CObjects are never used standalone. They only exist as part of a + /// LinkTarget. + class CObject : public HasSource, public HasDependencies, public Target + { + public: + Path get_source() {}; + private: + /// CObjects do not need to be explicitly constructed. + /// They are named after the path of their source file (without + /// file extension) from the root of their source repository. + CObject(String name) {}; + friend LinkTarget; + + /// Platformdependant command to compile a plain C object. + static const Command command( + Path objectfile, + String name, + Path sourcefile, + List<String> defs, + List<String> cxxflags, + List<String> include); + /// Platformdependant command to generate plain C object dependancies. + static const Command command_dep( + Path depfile, + String name, + Path sourcefile, + List<String> defs, + List<String> cxxflags, + List<String> include); + }; + + /// CxxObjects are never used standalone. They only exist as part of a + /// LinkTarget. + class CxxObject : public HasSource, public HasDependencies, public Target + { + public: + Path get_source() {}; + private: + /// CxxObjects do not need to be explicitly constructed. + /// They are named after the path of their source file (without + /// file extension) from the root of their source repository. + CxxObject(String name) {}; + friend LinkTarget; + + /// Platformdependant command to compile a C++ object. + static const Command command( + Path objectfile, + String name, + Path sourcefile, + List<String> defs, + List<String> cxxflags, + List<String> include); + /// Platformdependant command to generate C++ object dependancies. + static const Command command_dep( + Path objectfile, + String name, + Path sourcefile, + List<String> defs, + List<String> cxxflags, + List<String> include); + }; + + class LinkTarget : public IsCleanable, public HasDependencies, public IsLinking, public DeliversHeaders, public HasCompileSettings, public Target + { + public: + LinkTarget(String name) {}; + + private: + void get_external_headers_check() {}; + void add_internal_headers(const List<Target>& internal_headers) {}; + + /// @warning Evil Hack: SELF is set to the name of the LinkTarget + /// in the constructor. If SELF is not set to the LinkTarget name in + /// the execution of the header rule, the LinkTarget is used (linked + /// against) but was never defined. This might work out, if the + /// LinkTarget has been provided by other means (for example: + /// build.pl/dmake), but it should never happen in a project where + /// all LinkTarget s are controlled by gbuild. + LinkTarget& SELF; + List<CObject> COBJECTS; + List<CxxObject> CXXOBJECTS; + List<Library> LINKED_LIBS; + List<Path> AUXTARGETS; + List<Path> INCLUDE; + List<Path> INCLUDE_STL; + List<StaticLibrary> LINKED_STATIC_LIBS; + List<String> CFLAGS; + List<String> CXXFLAGS; + List<String> DEFS; + List<String> LDFLAGS; + List<String> TARGETTYPE_FLAGS; + Path DLLTARGET; + + /// Platformdependant command for linking. + static const Command command ( + Path linktargetfile, + String linktargetname, + List<String> linkflags, + List<Library> linked_libs, + List<StaticLibrary> linked_static_libs, + List<CObject> cobjects, + List<CxxObject> cxxobjects); + /// Command to collect all dependancies of this LinkTarget. + static const Command command_dep( + Path depfile, + String linktargetname, + List<CObject> cobjects, + List<CxxObject> cxxobjects); + static const List<String> DEFAULTDEFS; + static const List<String> CXXFLAGS; + static const List<String> LDFLAGS; + static const List<Path> INCLUDE; + static const List<Path> INCLUDE_STL; + }; +} +/* vim: set filetype=cpp : */ diff --git a/solenv/doc/gbuild/solenv/gbuild/static_library.mk b/solenv/doc/gbuild/solenv/gbuild/static_library.mk new file mode 100644 index 000000000000..c6b81960f74e --- /dev/null +++ b/solenv/doc/gbuild/solenv/gbuild/static_library.mk @@ -0,0 +1,35 @@ +#include <types.h> + +namespace gb +{ + using namespace types; + + class LinkTarget; + + class StaticLibrary : public IsCleanable, public HasDependencies, public IsLinking, public DeliversHeaders, public HasCompileSettings, public Target + { + public: + StaticLibrary(String name) {}; + + private: + /// private helper function for the constructor + void StaticLibrary_impl( + LinkTarget library_linktarget) {}; + /// helper function to wrap LinkTargets functions (this is more or less pimpl ...). + void forward_to_linktarget(Function f) {}; + + /// List of buildable static libraries (i.e. static libraries that are not expected to exist outside of \$(OUTDIR) on the system). + static const List<StaticLibrary> TARGETS; + /// List of additional defines for compiling objects for static libraries + static const List<String> DEFS; + /// List of additional flags for linking a static library + static const List<String> TARGETTYPEFLAGS; + /// Mapping from symbolic static library names to filenames + static const Map<StaticLibrary,Path> FILENAMES; + /// location to place static libraries in the \$(OUTDIR) + static const Path OUTDIRLOCATION; + /// platformdependant file extension for static libraries + static const String PLAINEXT; + }; +} +/* vim: set filetype=cpp : */ diff --git a/solenv/doc/gbuild/solenv/gbuild/types.mk b/solenv/doc/gbuild/solenv/gbuild/types.mk new file mode 100644 index 000000000000..1cddf1a7f401 --- /dev/null +++ b/solenv/doc/gbuild/solenv/gbuild/types.mk @@ -0,0 +1,141 @@ +namespace gb { + class CObject; + class CxxObject; + class Library; + class StaticLibrary; + class Package; + class SdiTarget; +}; + +namespace gb { namespace types +{ + /// A plain old string. + class String {}; + /// A partial, relative or absolute filesystem path. + class Path {}; + /// A target to be build. + class Target + { + public: + /// The absolute filesystem path representing the target. + Path get_target(); + }; + /// A target that can be linked against statically. + class StaticLinkable {}; + /// A partial or complete shell-command. + class Command {}; + /// A integer number. + class Integer {}; + /// A boolean value. + + /// There are const boolean values true and false for + /// comparisons (written as $(true) and $(false) in makefiles. + class Bool {}; + /// A language (for localisation) + + /// A language represented by its ISO 639-1:2002 code. + class Language {}; + /// A List of objects. + + /// A List of objects represented by a whitespace separated list + /// in makefiles. + template <typename T> + class List<T> {}; + + /// A Mapping from with a key of type K and a value of type V + + /// A Mapping is represented by a whitespace separated list + /// of key-value pairs. Key and value are separated by a colon (:). + template <typename K, typename V> + class Map<K,V> {}; + /// A target that can be cleaned. + class IsCleanable + { + public: + /// The (phony) absolute filesystem path to clean the target. + Path get_clean_target(); + }; + /// A target that has generated dependencies. + class HasDependencies + { + public: + /// The absolute filesystem path to the file containing the dependencies. + Path get_dep_target(); + }; + /// A target that has a source file from which it is generated. + class HasSource + { + public: + /// The absolute filesystem path to the source file. + Path get_source(); + }; + /// A target that links objects and libraries. + class IsLinking + { + public: + /// Add a CObject to be compiled and linked. + void add_cobject(const CObject& cobject); + /// Add multiple CObject s to be compiled and linked. + void add_cobjects(const List<CObject>& cobjects); + /// Add a CxxObject to be compiled and linked. + void add_cxxobject(const CxxObject& cobject); + /// Add multiple CxxObject s to be compiled and linked. + void add_cxxobjects(const List<CxxObject>& cobjects); + /// Add multiple CxxObject s to be compiled and linked (with exceptions enabled). + void add_exception_objects(const List<CxxObject>& cobject); + /// Add libraries to link against dynamically. + void add_linked_libs(const List<Library>& linked_libs); + /// Add libraries to link against statically. + void add_linked_static_libs(const List<StaticLibrary>& linked_static_libs); + /// Add multiple CxxObject s to be compiled and linked (without exceptions enabled). + /// @deprecated { We should not care about disabling exception. } + void add_noexception_objects(const List<CxxObject>& cobject); + /// Set auxiliary files that are produced by linking (for cleanup and copying). + void set_auxtargets(const List<Path>& auxtargets); + /// Set the location for the produced DLL (used on Windows only). + void set_dll_target(const Path& dlltarget); + /// Set additional flags for the link command. + void set_ldflags(const List<Path>& ldflags); + }; + /// A target that delivers headers of some kind. + class DeliversHeaders + { + public: + /// The absolute filesystem path which is touched when all headers for this target are prepared. + Path get_headers_target(); + /// The absolute filesystem path which is touched when all external headers for this target are prepared. + Path get_external_headers_target(); + /// Add multiple Packages that need to be delivered/generated + /// before compilation or dependency generation can start. + void add_package_headers(const List<Package>& packages); + /// Add multiple SdiTargets that need to be delivered/generated + /// before compilation or dependency generation can start. + void add_sdi_headers(const List<SdiTarget>& sdis); + }; + /// A target where settings for the compilation can be set. + class HasCompileSettings + { + public: + /// Sets flags for plain C compilation. + /// \$\$(CFLAGS) contains the current flags and can be used, if + /// just a few need to be modified. + void set_cflags(const List<String>& cflags); + /// Sets flags for C++ compilation. + /// \$\$(CXXFLAGS) contains the current flags and can be used, if + /// just a few need to be modified. + void set_cxxflags(const List<String>& cxxflags); + /// Sets defines for C/C++ compilation. + /// \$\$(DEFS) contains the current flags and can be used, if + /// just a few need to be modified. + void set_defs(const List<String>& defs); + /// Sets the include paths for C/C++ compilation. + /// \$\$(INCLUDE) contains the current paths and can be used, if + /// just a few need to be modified. + void set_include(const List<Path>& include); + /// Sets the stl include paths for C++ compilation. + /// \$\$(INCLUDE_STL) contains the current paths and can be used, if + /// just a few need to be modified. + void set_include_stl(const List<Path>& include_stl); + }; +}}; +/* vim: set filetype=cpp : */ diff --git a/solenv/doc/gbuild/solenv/inc/gbuild.mk b/solenv/doc/gbuild/solenv/inc/gbuild.mk deleted file mode 100644 index aac59462bb93..000000000000 --- a/solenv/doc/gbuild/solenv/inc/gbuild.mk +++ /dev/null @@ -1,254 +0,0 @@ - - -namespace types -{ - /// A plain old string. - class String {}; - /// A partial, relative or absolute filesystem path. - class Path {}; - /// A target represented by an absolute filesystem path. - class Target {}; - /// A partial or complete shell-command. - class Command {}; - /// A library name as used on in the linking step. - class Linkname {}; - /// A integer number. - class Integer {}; - /// A boolean value. - - /// There are const boolean values true and false for - /// comparisons (written as $(true) and $(false) in makefiles. - class Bool {}; - /// A language (for localisation) - - /// A language represented by its ISO 639-1:2002 code. - class Language {}; - /// A List of objects. - - /// A List of objects represented by a whitespace separated list - /// in makefiles. - template <typename T> - class List<T> {}; -}; - -using namespace types; - -namespace gb -{ - class Library; - class OOoLibrary; - class RtLibrary; - class Executable; - class Module; - class AllLangResTarget; - class SystemLibrary {}; - - class Helper - { - public: - static Command announce(Target target); - static Command abbreviate_dirs(Command command); - }; - - class StaticLibrary - { - public: - StaticLibrary(String name); - Target get_target(); - }; - - class Objectfile - { - public: - Objectfile(String name); - Target get_target(); - Target get_dep_filename(); - Target get_cxx_source_filename(); - }; - - enum LinkTargetType { - LIB, - EXE - }; - - class LinkTarget - { - private: - friend class Library; - friend class Executable; - - LinkTarget(LinkTargetType type, String name, Target target); - Target get_target(); - Target get_headers_target(); - Target get_dep_filename(); - void set_cxxflags(String cxxflags); - void set_visibility_hidden(Bool visibility_hidden); - void set_include(String include); - void set_ldflags(String ldflags); - void set_library_path_flags(String library_path_flags); - void add_linked_libs(List<Library> linked_libraries); - void add_object(Objectfile objectfile); - void add_noexception_object(Objectfile objectfile); - void add_exception_object(Objectfile objectfile); - void add_noexception_objects(List<Objectfile> objectfiles); - void add_exception_objects(List<Objectfile> objectfiles); - - List<String> DEFS; - List<String> CXXFLAGS; - List<String> INCLUDE; - String VISIBILITY; - List<String> LDFLAGS; - List<String> LIBRARY_PATH_FLAGS; - List<Linkname> LINKED_LIBS; - List<Linkname> LINKED_SYS_LIBS; - List<Objectfile> OBJECTS; - List<String> TARGETTYPE_LINK_FLAGS; - }; - - - class Library - { - protected: - Library(String name, Target target); - public: - Target get_target(); - Target get_headers_target(); - Target get_dep_filename(); - void set_cxxflags(String cxxflags); - void set_visibility_hidden(Bool visibility_hidden); - void set_include(String include); - void set_ldflags(String ldflags); - void set_library_path_flags(String library_path_flags); - void add_linked_libs(List<Library> linked_libraries); - void add_linked_system_libs(List<SystemLibrary> linked_system_libraries); - void add_object(Objectfile objectfile); - void add_noexception_object(Objectfile objectfile); - void add_exception_object(Objectfile objectfile); - void add_noexception_objects(List<Objectfile> objectfiles); - void add_exception_objects(List<Objectfile> objectfiles); - }; - - class OOoLibrary : public Library - { - public: - OOoLibrary(String name); - Target get_target(); - Target get_headers_target(); - Target get_dep_filename(); - Linkname get_linkname(); - static List<Linkname> get_linknames(List<OOoLibrary> ooolibraries); - }; - - class RtLibrary : public Library - { - public: - RtLibrary(String name); - Target get_target(); - Target get_headers_target(); - Target get_dep_filename(); - Linkname get_linkname(); - static List<Linkname> get_linknames(List<RtLibrary> ooolibraries); - }; - - class Executable - { - public: - Executable(String name); - Target get_target(); - void set_cxxflags(List<String> cxxflags); - void set_visibility_hidden(Bool visibility_hidden); - void set_include(List<String> include); - void set_ldflags(List<String> ldflags); - void set_library_path_flags(List<String> library_path_flags); - void add_linked_libs(List<Library> linked_libraries); - void add_linked_system_libs(List<SystemLibrary> linked_system_libraries); - void add_object(Objectfile objectfile); - void add_noexception_object(Objectfile objectfile); - void add_exception_object(Objectfile objectfile); - void add_noexception_objects(List<Objectfile> objectfiles); - void add_exception_objects(List<Objectfile> objectfiles); - }; - - class SdiTarget - { - private: - List<String> INCLUDE; - public: - SdiTarget(String name); - Target get_target(); - void set_include(List<String> include); - }; - - class SrsTarget - { - private: - List<String> DEFS; - List<String> INCLUDE; - public: - SrsTarget(String name); - Target get_target(); - void set_defs(List<String> defs); - void set_include(List<String> include); - }; - - class ResTarget - { - private: - friend class AllLangResTarget; - ResTarget(String name, Language language); - public: - Target get_target(); - void add_file(SrsTarget srstarget); - void add_files(List<SrsTarget> srstargets); - }; - - class AllLangResTarget - { - public: - AllLangResTarget(String name); - void add_file(SrsTarget srstarget); - void add_files(List<SrsTarget> srstargets); - }; - - class Package - { - public: - Package(String name, Path sourcedir); - void add_file(Target destination, Path source); - Path SOURCEDIR; - }; - - class Module - { - public: - Module(String name); - Target get_target(); - void make_global_targets(); - void read_includes(List<String> includes); - }; -}; -static String GUI; -static String COM; -static Path INPATH; -static Path SRCDIR; -static Path OUTDIR; -static Path WORKDIR; -static bool FULL_DEPENDENCIES; -static List<gb::Module> ALL_MODULES; - -static Command SHELL; -static Path CXX; -static Path GCCP; -static Target SVIDLTARGET; -static Command SVIDLCOMMAND; -static Target RSCTARGET; -static Command RSCCOMMAND; - -static List<String> GLOBALDEFS; -static List<String> CFLAGSCXX; -static List<String> EXCEPTIONFLAGS; -static List<String> NOEXCEPTIONFLAGS; -static List<String> LDFLAGS; -static Integer OSL_DEBUG_LEVEL; - -/* vim: set filetype=cpp : */ |