MS RFC 83: Source tree reorganization

Author:Daniel Morissette
Contact:dmorissette at
Last Edited:011-11-25
Version:MapServer 6.2

1. Overview

With the inclusion of the new MapCache and TinyOWS components in the MapServer project, it would be ideal to reorganize the directory structure of the source tree to facilitate builds and maintenance in the future.

2. Current directory structure

ls -R | grep -v svn | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/   /' -e 's/-/|/'


Where the most interesting pieces are:


3. New proposed directory structure

The most important change is that most of the .c/.h source files currently in the mapserver root directory will be moved to one of two new sub-directories:

  • lib: Contains all the mapserver core source files that are built into and shared with multiple components. This directory would also be the home of when we create it.
  • apps: Contains the source files related to the traditional mapserv CGI/FastCGI application and command-line utilities such as shp2img, etc.

A new “tinyows” sub-directory will be created to serve as the future home of TinyOWS source files.

The result will look like this:


For the time being, the following files will continue to reside in the mapserver root directory:
HISTORY.TXT (applicable to releases of the full suite)

Initially the root directory’s will be the same one that we currently have, and it will update the in the lib, apps and mapscript sub-directories.

Our long term goal (to happen slowly over time) is that most of the sub-directories (especially mapserv, mapscript, mapcache and tinyows) will also eventually contain their own standalone configure script and Makefile to allow building a given component independently. At that point the master configure script and Makefile in the mapserver root directory will simply call each sub-project’s configure and Makefile to automate building of multiple selected components at once.

HISTORY.TXT files will be maintained at two levels:

  • HISTORY.TXT in root directory: contains history information relevant to releases of the full suite
  • HISTORY.TXT in each sub-project directory: contains detailed history information related to each specific component. The current HISTORY.TXT would be moved to the sub-directory.

4. Backwards Compatibility Issues

Patches against older releases may not apply directly any more due to files moving around. For the same reasons, merging of changes from a svn sandbox or branch may be more complicated.

5. Bug ID

  • TBD

6. Voting history

No vote yet.