Menu

#2084 build: Refactor the directory structure and build system

5.2.FC
fixed
None
enhancement
build
-
major
2017-01-05
2016-09-29
No

Improve the OpenSAF directory structure and build system:

  • In order to support better modularity of the different OpenSAF services, collect all files belonging to a particular OpenSAF service under a separate subdirectory per service. Previously, files belonging to one single service (source code, library code, header files, tests, command-line tools, API tests) were scattered in many places.
  • Renamed directories where appropriate. For example removed the "sv" suffix, e.g. clmsv -> clm.
  • Use three top-level source code directories: "java" for java source code, "python" for python source code, and "src" for C and C++ source code.
  • Reduce the depth of the directory hierarchy. Some levels of the directory structure were removed, for example the separate "include" directory that some services (but not all) previously used for their header files. Header are now always placed in the same directory as the corresponding source files. Another example is that we don't really need to divide services into "saf" and "infrastructure" and thus this level in the tree was removed.
  • Use non-recursive make. This improves the speed of parallel builds when using "make -j", and also improved the dependency handling so that object files are re-build when necessary.
  • Remove the separate automake file for the contrib subdirector and move plmc into src/plm, to speed up automake. Remove cruft from the automake files to speed up execution further.

The directory structure now looks like this:

.
+-- bin  (Built executables)
+-- java  (Java source code)
|   +-- ais_api
|   |   +-- src
|   |       +-- org
|   |           +-- saforum
|   |               +-- ais
|   |                   +-- amf
|   |                   +-- clm
|   +-- ais_api_impl  (Java AIS API mapping Implementation for AMF,CLM)
|   |   +-- src
|   |       +-- org
|   |           +-- opensaf
|   |               +-- ais
|   |                   +-- amf
|   |                   +-- clm
|   +-- am4j_sailfin
|   |   +-- amf-configuration
|   |   +-- clc-cli-scripts
|   +-- amf_agent
|   |   +-- src
|   |       +-- com
|   |           +-- ericsson
|   |               +-- saf
|   |                   +-- amf
|   +-- apitest  (OpenSAF Test suites)
|       +-- configandscript
|       +-- src
|           +-- org
|               +-- opensaf
|                   +-- ais
|                       +-- amf
|                       |   +-- test
|                       +-- clm
|                       |   +-- test
|                       +-- test
+-- lib  (Built libraries)
+-- m4  (Extra M4 macros for the build)
+-- pkgconfig  (OpenSAF Pkgconfig file)
+-- python  (Python source code)
|   +-- pyosaf
|   |   +-- utils
|   |       +-- clm
|   |       +-- immoi
|   |       +-- immom
|   |       +-- log
|   |       +-- ntf
|   +-- samples
+-- rpms  (Built RPMs)
+-- samples  (OpenSAF sample applications for SAF services)
|   +-- amf
|   |   +-- campaigns
|   |   +-- non_sa_aware
|   |   +-- proxy
|   |   +-- sa_aware
|   |   +-- wrapper
|   +-- cpsv
|   |   +-- ckpt_demo
|   |   +-- ckpt_track_demo
|   +-- edsv
|   +-- glsv
|   +-- immsv
|   |   +-- immom_python
|   |   +-- immutils
|   +-- m4
|   +-- mqsv
|   +-- smfsv
|       +-- campaigns
+-- scripts  (OpenSAF scripts)
+-- src  (C and C++ source code)
|   +-- amf
|   |   +-- agent  (sources for OpenSAF agents)
|   |   +-- amfd
|   |   |   +-- tests
|   |   +-- amfnd
|   |   +-- amfwd
|   |   +-- saf
|   |   +-- tools
|   +-- base  (OpenSAF base library)
|   |   +-- tests
|   +-- ckpt
|   |   +-- agent  (sources for OpenSAF agents)
|   |   +-- apitest  (OpenSAF Test suites)
|   |   +-- ckptd
|   |   +-- ckptnd
|   |   +-- saf
|   +-- clm
|   |   +-- agent  (sources for OpenSAF agents)
|   |   +-- apitest  (OpenSAF Test suites)
|   |   +-- clmd
|   |   +-- clmnd
|   |   +-- saf
|   +-- dtm
|   |   +-- dtmnd
|   |   +-- transport
|   |       +-- tests
|   +-- evt
|   |   +-- agent  (sources for OpenSAF agents)
|   |   +-- apitest  (OpenSAF Test suites)
|   |   +-- evtd
|   |   +-- saf
|   +-- fm
|   |   +-- fmd
|   +-- imm
|   |   +-- agent  (sources for OpenSAF agents)
|   |   +-- apitest  (OpenSAF Test suites)
|   |   |   +-- implementer
|   |   |   +-- management
|   |   +-- immd
|   |   +-- immloadd
|   |   +-- immnd
|   |   +-- immpbed
|   |   +-- saf
|   |   +-- tools  (IMM commandline utilities and IMM XML merge tool)
|   +-- lck
|   |   +-- agent  (sources for OpenSAF agents)
|   |   +-- apitest  (OpenSAF Test suites)
|   |   +-- lckd
|   |   +-- lcknd
|   |   +-- saf
|   +-- libjava
|   +-- log
|   |   +-- agent  (sources for OpenSAF agents)
|   |   +-- apitest  (OpenSAF Test suites)
|   |   +-- logd
|   |   +-- saf
|   |   +-- tools  (SAFLOG command line utility)
|   +-- mbc
|   |   +-- apitest  (OpenSAF Test suites)
|   +-- mds
|   |   +-- apitest  (OpenSAF Test suites)
|   +-- msg
|   |   +-- agent  (sources for OpenSAF agents)
|   |   +-- apitest  (OpenSAF Test suites)
|   |   +-- msgd
|   |   +-- msgnd
|   |   +-- saf
|   +-- nid
|   |   +-- agent  (sources for OpenSAF agents)
|   +-- ntf
|   |   +-- agent  (sources for OpenSAF agents)
|   |   +-- apitest  (OpenSAF Test suites)
|   |   +-- ntfd
|   |   +-- ntfimcnd
|   |   +-- saf
|   |   +-- tools  (SAFNTF command line utility)
|   +-- osaf
|   |   +-- apitest  (OpenSAF Test suites)
|   |   +-- immutil
|   |   +-- saf
|   |   +-- saflog
|   +-- plm
|   |   +-- agent  (sources for OpenSAF agents)
|   |   +-- apitest  (OpenSAF Test suites)
|   |   +-- plmcd
|   |   +-- plmd
|   |   +-- saf
|   +-- rde
|   |   +-- agent  (sources for OpenSAF agents)
|   |   +-- rded
|   |   +-- tools
|   +-- smf
|       +-- agent  (sources for OpenSAF agents)
|       +-- saf
|       +-- scripts
|       +-- smfd
|       +-- smfnd
|       +-- tools
+-- tools  (OpenSAF developer tools and UML devel environment)
    +-- cluster_sim_uml
    |   +-- archive
    |   |   +-- scripts
    |   +-- bin
    |   +-- etc
    |   |   +-- init.d
    |   +-- uml
    |       +-- bin
    |       +-- config
    |       +-- root_template
    |           +-- bin
    |           +-- dev
    |           |   +-- pts
    |           |   +-- shm
    |           +-- etc
    |           |   +-- init.d
    |           +-- home
    |           +-- lib
    |           |   +-- modules
    |           +-- lib64
    |           +-- opt
    |           +-- proc
    |           +-- root
    |           |   +-- www
    |           |       +-- cgi-bin
    |           +-- sbin
    |           +-- sys
    |           +-- tmp
    |           +-- usr
    |           |   +-- bin
    |           |   +-- sbin
    |           +-- var
    |               +-- lib
    |               |   +-- opensaf
    |               +-- log
    |               |   +-- opensaf
    |               +-- run
    |                   +-- opensaf
    +-- devel
        +-- dot
        +-- doxygen
        +-- indent
        +-- model
        +-- review

Related

Tickets: #1947
Tickets: #2084
Wiki: NEWS-5.2.0

Discussion

  • Anders Widell

    Anders Widell - 2016-12-02
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,8 +1,227 @@
    -Improve the OpenSAF directory structure and build system. The exact details of what and how to improve them is yet to be worked out, but below are some ideas:
    +Improve the OpenSAF directory structure and build system:
    
    -* In order to support better modularity of the different OpenSAF services, we should collect all files belonging to a particular OpenSAF service under a separate subdirectory per service. Today, files belonging to one single service (source code, library code, header files, tests, command-line tools) are scattered in many places.
    -* Rename directories where appropriate. For example remove the "sv" suffix, e.g. clmsv -> clm.
    -* Look at "standards" to see what kind of directory structure is commonly used by other projects. For example, maybe put the source code in a directory called "src".
    -* Reduce the depth of the directory hierarchy. Some levels of the directory structure can be removed, for example the separate "include" directory that some services (but not all) currently use for their header files. Header files ought to into the same directory as source files. Another example is that we don't really need to divide services into "saf" and "infrastructure" and thus remove this level in the tree.
    -* Improve parallelism of the build. I have a feeling that much more could be built in parallel than is possible today when you type "make -j".
    -* Possibly look at alternatives to autotools, to see if we can also support something else (e.g. cmake) in addition to autotools.
    +* In order to support better modularity of the different OpenSAF services, collect all files belonging to a particular OpenSAF service under a separate subdirectory per service. Previously, files belonging to one single service (source code, library code, header files, tests, command-line tools, API tests) were scattered in many places.
    +* Renamed directories where appropriate. For example removed the "sv" suffix, e.g. clmsv -> clm.
    +* Use three top-level source code directories: "java" for java source code, "python" for python source code, and "src" for C and C++ source code.
    +* Reduce the depth of the directory hierarchy. Some levels of the directory structure were removed, for example the separate "include" directory that some services (but not all) previously used for their header files. Header are now always placed in the same directory as the corresponding source files. Another example is that we don't really need to divide services into "saf" and "infrastructure" and thus this level in the tree was removed.
    +* Use non-recursive make. This improves the speed of parallel builds when using "make -j", and also improved the dependency handling so that object files are re-build when necessary.
    +* Remove the separate automake file for the contrib subdirector and move plmc into src/plm, to speed up automake. Remove cruft from the automake files to speed up execution further.
    +
    +The directory structure now looks like this:
    +
    +~~~
    +.
    ++-- bin  (Built executables)
    ++-- java  (Java source code)
    +|   +-- ais_api
    +|   |   +-- src
    +|   |       +-- org
    +|   |           +-- saforum
    +|   |               +-- ais
    +|   |                   +-- amf
    +|   |                   +-- clm
    +|   +-- ais_api_impl  (Java AIS API mapping Implementation for AMF,CLM)
    +|   |   +-- src
    +|   |       +-- org
    +|   |           +-- opensaf
    +|   |               +-- ais
    +|   |                   +-- amf
    +|   |                   +-- clm
    +|   +-- am4j_sailfin
    +|   |   +-- amf-configuration
    +|   |   +-- clc-cli-scripts
    +|   +-- amf_agent
    +|   |   +-- src
    +|   |       +-- com
    +|   |           +-- ericsson
    +|   |               +-- saf
    +|   |                   +-- amf
    +|   +-- apitest  (OpenSAF Test suites)
    +|       +-- configandscript
    +|       +-- src
    +|           +-- org
    +|               +-- opensaf
    +|                   +-- ais
    +|                       +-- amf
    +|                       |   +-- test
    +|                       +-- clm
    +|                       |   +-- test
    +|                       +-- test
    ++-- lib  (Built libraries)
    ++-- m4  (Extra M4 macros for the build)
    ++-- pkgconfig  (OpenSAF Pkgconfig file)
    ++-- python  (Python source code)
    +|   +-- pyosaf
    +|   |   +-- utils
    +|   |       +-- clm
    +|   |       +-- immoi
    +|   |       +-- immom
    +|   |       +-- log
    +|   |       +-- ntf
    +|   +-- samples
    ++-- rpms  (Built RPMs)
    ++-- samples  (OpenSAF sample applications for SAF services)
    +|   +-- amf
    +|   |   +-- campaigns
    +|   |   +-- non_sa_aware
    +|   |   +-- proxy
    +|   |   +-- sa_aware
    +|   |   +-- wrapper
    +|   +-- cpsv
    +|   |   +-- ckpt_demo
    +|   |   +-- ckpt_track_demo
    +|   +-- edsv
    +|   +-- glsv
    +|   +-- immsv
    +|   |   +-- immom_python
    +|   |   +-- immutils
    +|   +-- m4
    +|   +-- mqsv
    +|   +-- smfsv
    +|       +-- campaigns
    ++-- scripts  (OpenSAF scripts)
    ++-- src  (C and C++ source code)
    +|   +-- amf
    +|   |   +-- agent  (sources for OpenSAF agents)
    +|   |   +-- amfd
    +|   |   |   +-- tests
    +|   |   +-- amfnd
    +|   |   +-- amfwd
    +|   |   +-- saf
    +|   |   +-- tools
    +|   +-- base  (OpenSAF base library)
    +|   |   +-- tests
    +|   +-- ckpt
    +|   |   +-- agent  (sources for OpenSAF agents)
    +|   |   +-- apitest  (OpenSAF Test suites)
    +|   |   +-- ckptd
    +|   |   +-- ckptnd
    +|   |   +-- saf
    +|   +-- clm
    +|   |   +-- agent  (sources for OpenSAF agents)
    +|   |   +-- apitest  (OpenSAF Test suites)
    +|   |   +-- clmd
    +|   |   +-- clmnd
    +|   |   +-- saf
    +|   +-- dtm
    +|   |   +-- dtmnd
    +|   |   +-- transport
    +|   |       +-- tests
    +|   +-- evt
    +|   |   +-- agent  (sources for OpenSAF agents)
    +|   |   +-- apitest  (OpenSAF Test suites)
    +|   |   +-- evtd
    +|   |   +-- saf
    +|   +-- fm
    +|   |   +-- fmd
    +|   +-- imm
    +|   |   +-- agent  (sources for OpenSAF agents)
    +|   |   +-- apitest  (OpenSAF Test suites)
    +|   |   |   +-- implementer
    +|   |   |   +-- management
    +|   |   +-- immd
    +|   |   +-- immloadd
    +|   |   +-- immnd
    +|   |   +-- immpbed
    +|   |   +-- saf
    +|   |   +-- tools  (IMM commandline utilities and IMM XML merge tool)
    +|   +-- lck
    +|   |   +-- agent  (sources for OpenSAF agents)
    +|   |   +-- apitest  (OpenSAF Test suites)
    +|   |   +-- lckd
    +|   |   +-- lcknd
    +|   |   +-- saf
    +|   +-- libjava
    +|   +-- log
    +|   |   +-- agent  (sources for OpenSAF agents)
    +|   |   +-- apitest  (OpenSAF Test suites)
    +|   |   +-- logd
    +|   |   +-- saf
    +|   |   +-- tools  (SAFLOG command line utility)
    +|   +-- mbc
    +|   |   +-- apitest  (OpenSAF Test suites)
    +|   +-- mds
    +|   |   +-- apitest  (OpenSAF Test suites)
    +|   +-- msg
    +|   |   +-- agent  (sources for OpenSAF agents)
    +|   |   +-- apitest  (OpenSAF Test suites)
    +|   |   +-- msgd
    +|   |   +-- msgnd
    +|   |   +-- saf
    +|   +-- nid
    +|   |   +-- agent  (sources for OpenSAF agents)
    +|   +-- ntf
    +|   |   +-- agent  (sources for OpenSAF agents)
    +|   |   +-- apitest  (OpenSAF Test suites)
    +|   |   +-- ntfd
    +|   |   +-- ntfimcnd
    +|   |   +-- saf
    +|   |   +-- tools  (SAFNTF command line utility)
    +|   +-- osaf
    +|   |   +-- apitest  (OpenSAF Test suites)
    +|   |   +-- immutil
    +|   |   +-- saf
    +|   |   +-- saflog
    +|   +-- plm
    +|   |   +-- agent  (sources for OpenSAF agents)
    +|   |   +-- apitest  (OpenSAF Test suites)
    +|   |   +-- plmcd
    +|   |   +-- plmd
    +|   |   +-- saf
    +|   +-- rde
    +|   |   +-- agent  (sources for OpenSAF agents)
    +|   |   +-- rded
    +|   |   +-- tools
    +|   +-- smf
    +|       +-- agent  (sources for OpenSAF agents)
    +|       +-- saf
    +|       +-- scripts
    +|       +-- smfd
    +|       +-- smfnd
    +|       +-- tools
    ++-- tools  (OpenSAF developer tools and UML devel environment)
    +    +-- cluster_sim_uml
    +    |   +-- archive
    +    |   |   +-- scripts
    +    |   +-- bin
    +    |   +-- etc
    +    |   |   +-- init.d
    +    |   +-- uml
    +    |       +-- bin
    +    |       +-- config
    +    |       +-- root_template
    +    |           +-- bin
    +    |           +-- dev
    +    |           |   +-- pts
    +    |           |   +-- shm
    +    |           +-- etc
    +    |           |   +-- init.d
    +    |           +-- home
    +    |           +-- lib
    +    |           |   +-- modules
    +    |           +-- lib64
    +    |           +-- opt
    +    |           +-- proc
    +    |           +-- root
    +    |           |   +-- www
    +    |           |       +-- cgi-bin
    +    |           +-- sbin
    +    |           +-- sys
    +    |           +-- tmp
    +    |           +-- usr
    +    |           |   +-- bin
    +    |           |   +-- sbin
    +    |           +-- var
    +    |               +-- lib
    +    |               |   +-- opensaf
    +    |               +-- log
    +    |               |   +-- opensaf
    +    |               +-- run
    +    |                   +-- opensaf
    +    +-- devel
    +        +-- dot
    +        +-- doxygen
    +        +-- indent
    +        +-- model
    +        +-- review
    +~~~
    
     
  • Anders Widell

    Anders Widell - 2016-12-02
    • status: assigned --> review
     
  • Anders Widell

    Anders Widell - 2017-01-02
    • status: review --> fixed
     
  • Anders Widell

    Anders Widell - 2017-01-02

    changeset: 8486:07a1f9d16be4
    user: Anders Widell an..@..com
    date: Mon Jan 02 17:03:35 2017 +0100
    summary: build: Refactor the directory structure and build system [#2084]

    [staging:07a1f9]

     

    Related

    Commit: [07a1f9]
    Tickets: #2084

  • Anders Widell

    Anders Widell - 2017-01-05

    changeset: 8487:f03842f174ff
    user: Anders Widell an..@..com
    date: Tue Jan 03 12:06:43 2017 +0100
    summary: build: Fix so that make rpm works again [#2084]

    [staging:f03842]

     

    Related

    Commit: [f03842]
    Tickets: #2084


Log in to post a comment.