| 1 | == The GBGP Repository == |
| 2 | |
| 3 | The whole GBGP development system is divided into three areas: |
| 4 | * '''gbgp_src''' : Deliverable code & supporting development system |
| 5 | * '''gbgp_doc''' : User and project documentation |
| 6 | * '''gbgp_test''' : Test Folder (test system and its results) |
| 7 | |
| 8 | The repository for GBGP can be accessed via the Subversion server at the URL |
| 9 | {{{ |
| 10 | https://svn.romsaf.org/gbgp/ |
| 11 | }}} |
| 12 | |
| 13 | For a complete list of Subversion commands see the [http://svnbook.red-bean.com/en/1.0/index.html SVN reference manual] |
| 14 | |
| 15 | '''Checking out trunk''' |
| 16 | |
| 17 | To [http://svnbook.red-bean.com/en/1.0/re04.html checkout] the latest development (trunk) versions: |
| 18 | {{{ |
| 19 | svn checkout https://svn.romsaf.org/gbgp/gbgp_src/trunk ./trunk |
| 20 | svn checkout https://svn.romsaf.org/gbgp/gbgp_doc/trunk ./trunk |
| 21 | svn checkout https://svn.romsaf.org/gbgp/gbgp_test/trunk ./trunk |
| 22 | }}} |
| 23 | This will check out the source code (with build support), documentation and Test Folder, respectively, to the local working directory (e.g. ''~/gbgp/src'', ''~/gbgp/doc'' or ''~/gbgp/test'') |
| 24 | |
| 25 | '''Checking out old release versions''' |
| 26 | |
| 27 | To checkout the older (tagged) release versions: |
| 28 | {{{ |
| 29 | svn checkout https://svn.romsaf.org/gbgp/gbgp_src/tags/<ver> ./<ver> |
| 30 | svn checkout https://svn.romsaf.org/gbgp/gbgp_doc/tags/<ver> ./<ver> |
| 31 | svn checkout https://svn.romsaf.org/gbgp/gbgp_test/tags/<ver> ./<ver> |
| 32 | }}} |
| 33 | This will check out the tagged source code, documentation, and test folder, respectively to the local working directory. Here, <ver> is the tagged release version, e.g. 1.0, 1.1 etc. |
| 34 | |
| 35 | === Tags === |
| 36 | |
| 37 | A [http://svnbook.red-bean.com/en/1.0/ch04s06.html tag] is just [http://svnbook.red-bean.com/en/1.0/re07.html copy] or snapshot of a a particular revision of the repository. In the case of GBGP, a copy taken from the head of trunk at the time that the distribution files for a release were built. You could just as well checkout the revision number instead, but a tag is easier to remember. |
| 38 | |
| 39 | == Branches == |
| 40 | |
| 41 | Developments to GBGP should be made from, and committed to, a [http://svnbook.red-bean.com/en/1.0/ch04.html#svn-ch-4-sect-1 branch] rather than directly to the latest trunk version. This allows changes to be tested before merging the required changes back into the trunk. The trunk therefore represents a stable 'next potential release' state for GBGP. Branches can be temporary and might be for working on resolving a specific Trac Ticket. |
| 42 | |
| 43 | Instructions for developers working with branches in GBGP are available [https://trac.grassaf.org/ropp/wiki/gbgp_branches here]. |
| 44 | |
| 45 | === Preparation for building === |
| 46 | |
| 47 | Having checked out {{{gbgp_src}}} (trunk, tag or branch) some commands need to be run to locally create intermediate configuration and make files not in the repository, before the {{{configure / make / make install}}} sequence can begin: |
| 48 | {{{ |
| 49 | aclocal -I m4 --force |
| 50 | automake -a -c |
| 51 | autoconf |
| 52 | }}} |
| 53 | Thereafter, if any changes are made to the low-level {{{configure.ac}}} or {{{Makefile.am}}} template files, an {{{autoreconf}}} should be sufficient. The whole sequence needs to be re-run if any .m4 (macro) file is changed. |
| 54 | |
| 55 | === Developing new code === |
| 56 | |
| 57 | In order to add a new sub-directory to the GBGP build system within a module it is necessary to edit the {{{AC_CONFIG_FILES}}} list of sub-directory Makefiles in the top-level {{{configure.ac}}} file. It is also necessary to update the {{{SUBDIRS}}} list of subdirectories in the top-level {{{Makefile.am}}} file. |
| 58 | |
| 59 | To add any new subroutine files to the build system it is necessary to update the {{{build/Makefile.am}}} file by defining a list of subroutines with a suitable collection name and then adding the collection name to the {{{libropp_<modname>_a_SOURCES}}} list. If any new F90 modules are to be built, the module names should be added to the {{{MODULES}}} listing. |
| 60 | |
| 61 | All '.f90' and 'Makefile' files are included in the GBGP distribution as default. In order to include other files (e.g. data files) within the GBGP distribution, it is necessary to explicitly define these as {{{EXTRA_DIST}}} within the {{{Makefile.am}}} file in the appropriate subdirectory. |
| 62 | |
| 63 | Having edited {{{configure.ac}}} and or {{{Makefile.am}}} files, type {{{autorconf}}} to generate the corresponding {{{configure}}} or {{{Makefile.in}}} scripts. In order to generate the updated {{{Makefile}}} script it is necessary to run {{{configure}}}, usually from a compiler-specific configuration file with the appropriate compiler flag settings and library paths. |
| 64 | |
| 65 | {{{ |
| 66 | autoreconf |
| 67 | ropp_configure_<compiler>_<architecture> |
| 68 | }}} |
| 69 | |
| 70 | |
| 71 | === Writing documentation === |
| 72 | |
| 73 | A number of !LibreOffice, MS Word and LaTeX template files tailored for GBGP are contained in the repository. To access these to your local machine, you can use: |
| 74 | {{{ |
| 75 | svn co https://svn.grassaf.org/gbgp/gbgp_doc/trunk/gbgp_templates ./gbgp_templates |
| 76 | }}} |