Go to the first, previous, next, last section, table of contents.


Flat or Non-Flat Directory Structures

Some GNU packages are distributed as tar files which unpack in a single directory, these are said to be flat distributions. Other GNU packages have a one level hierarchy of subdirectories, using for example a subdirectory named `doc/' for the Texinfo manual and man pages, another called `lib/' for holding functions meant to replace or complement C libraries, and a subdirectory `src/' for holding the proper sources for the package. These other distributions are said to be non-flat.

For now, we cannot say much about flat distributions. A flat directory structure has the disadvantage of increasing the difficulty of updating to a new version of GNU gettext. Also, if you have many PO files, this could somewhat pollute your single directory. In the GNU gettext distribution, the `misc/' directory contains a shell script named `combine-sh'. That script may be used for combining all the C files of the `intl/' directory into a pair of C files (one `.c' and one `.h'). Those two generated files would fit more easily in a flat directory structure, and you will then have to add these two files to your project.

Maybe because GNU gettext itself has a non-flat structure, we have more experience with this approach, and this is what will be described in the remaining of this chapter. Some maintainers might use this as an opportunity to unflatten their package structure. Only later, once gained more experience adapting GNU gettext to flat distributions, we might add some notes about how to proceed in flat situations.


Go to the first, previous, next, last section, table of contents.