things. The settings you might normally want to change are already
presented. You may make changes, then re-configure (using `c`), so that it
gets a chance to make changes that depend on yours and perform more
-checking. This might require several configuration stages when you are
-using `ccmake` - when you are using `cmake` the
-iteration is done behind the scenes.
+checking. It may take several configuration passes to reach the desired
+configuration, in particular if you need to resolve errors.
A key thing to consider here is the setting of
`CMAKE_INSTALL_PREFIX`. You will need to be able to write to this
super-user privileges, you should use them only for the installation
phase, and never for configuring, building, or running GROMACS!
-When `cmake` or `ccmake` have completed iterating, the
-cache is stable and a build tree can be generated, with `g` in
-`ccmake` or automatically with `cmake`.
+When you have reached the desired configuration with `ccmake`, the
+build system can be generated by pressing `g`. This requires that the previous
+configuration pass did not reveal any additional settings (if it did, you need
+to configure once more with `c`). With `cmake`, the build system is generated
+after each pass that does not produce errors.
You cannot attempt to change compilers after the initial run of
`cmake`. If you need to change, clean up, and start again.
Thus the names of all programs and libraries will be appended with
`_mod`.
+### Changing installation tree structure ###
+
+By default, a few different directories under `CMAKE_INSTALL_PREFIX` are used
+when when GROMACS is installed. Some of these can be changed, which is mainly
+useful for packaging GROMACS for various distributions. The directories are
+listed below, with additional notes about some of them. Unless otherwise noted,
+the directories can be renamed by editing the installation paths in the main
+CMakeLists.txt.
+
+`bin/`
+ : The standard location for executables, some scripts, and some symlinks.
+ Some of the scripts hardcode the absolute installation prefix, which needs
+ to be changed if the scripts are relocated.
+`include/gromacs/`
+ : The standard location for installed headers.
+`lib/`
+ : The standard location for libraries. The default depends on the system, and
+ is determined by CMake.
+ The name of the directory can be changed using `GMX_LIB_INSTALL_DIR` CMake
+ variable.
+`share/gromacs/`
+ : Various data files and some documentation go here.
+ The `gromacs` part can be changed using `GMX_DATA_INSTALL_DIR`. Using this
+ CMake variable is the preferred way of changing the installation path for
+ `share/gromacs/top/`, since the path to this directory is built into
+ `libgromacs` as well as some scripts, both as a relative and as an absolute
+ path (the latter as a fallback if everything else fails).
+`share/man/`
+ : Installed man pages go here.
+
## Building GROMACS ##
Once you have configured with `cmake`, you can build GROMACS. It is