GP - The GNU Pascal Make Utility
********************************

   GP is a utility to automate the building of Pascal programs using
the GPC compiler. It is distributed as part of the GPC project.

   GP is a substitute for GPC's automake feature which will be removed
in the future. If you have been using automake (or planned to), you are
recommended to try GP instead. If you used GPC without automake (e.g.,
using self-written Makefiles or otherwise manually), you probably do
not need GP.

   On installing GP from a source distribution, read INSTALL.

   The GP Manual is contained in `gp.info' which you can read with any
info reader. You can also make a printable documentation with `make
dvi' if you have texi2dvi installed or `make pdf' using texi2pdf.

Very quick start:

   Call `gp' instead of `gpc'.

Quick start:

   * Use `gp' instead of `gpc --automake --executable-file-name'. Most
     other GPC options can be used the same way with GP.

     GP accepts, but ignores `--automake' (by default) and
     `--executable-file-name' (without argument).

   * If the source file given on the command line is a unit or module,
     GP recognizes this automatically and does not try to link it, so
     you don't have to give the option `-c'.

   * If your compilers are not called `gpc' and `gcc' you can set `PC'
     and `CC' either on the command line or as environment variables.
     This is mostly the same you would do when using `make'.

   * Note the new `.gpd' files, e.g. if you want to clean a build
     directory. (But you might want to consider using `gp --clean' or
     `gp --clean-objects' for this purpose.)


The main features of GP are:

   * Automatically finds all dependencies, units used and include files
     as well as C, assembler and object files and libraries referenced
     in `{$L}' and `{$R}' directives.

   * Recompiles everything when necessary (no need to give
     `--automake').

   * Avoids unnecessary recompilations if only the implementation of a
     unit used has changed since the last compilation, by comparing a
     MD5 value of the interfaces of units. Recompilation is even
     avoided if only comments in the interface have changed, but not
     when they influence line numbers - since the GNU tools store line
     number information in object and other files, this does constitute
     a small difference.

   * Supports `--autobuild' to recompile everything.

   * Does not use GPC's buggy automake feature, so it should work also
     on systems where automake doesn't. Also, in many cases, it will
     use less total memory than GPC's automake because it calls the
     compiler iteratively rather than recursively.

   * Recognizes and supports transparently cyclic unit dependencies
     (where, naturally, at least one dependency in each cycle must be in
     the implementation rather than the interface).

   * Uses the base name of the main program's file name as the
     executable name by default, rather than `a.out' (no need to give
     `--executable-file-name' or `-o foo', but these options are also
     supported). In the strange case that you want your output file to
     be called `a.out', you can use `-o a.out'.

   * Does not try to link a unit given on the command line (no need to
     give `-c' for units, but `-c' is also supported in case you want
     to compile, but not link, a program).

   * Tries appending a `.pas', `.p', `.pp' or `.dpr' suffix (in this
     order) to the file name given on the command line when necessary,
     i.e. you can invoke it as `gp foo.pas' or just `gp foo'.

   * Calls `gcc' rather than `cc1' (which GPC would call) to compile C
     files, so it also works if the versions of the installed GCC
     compiler and the backend the installed GPC is based on don't match.

   * Supports GPC's path options (`--unit-path', `--object-path',
     `--unit-destination-path', `--object-destination-path',
     `--executable-path') options and the `GPC_UNIT_PATH' environment
     variable transparently, also for units given on the command line
     (where GPC ignores `--unit-destination-path').

   * Supports `--include-path' and `--library-path' which work the same
     way as `-I' and `-L', respectively, but can be given multiple
     directories at once.

   * Uses all unit and object paths as include paths automatically, to
     simplify using units or C files with includes in other directories.

   * Stores the compiler version, target platform and options given
     (together with other dependency information) in files with suffix
     `.gpd' ("GNU Pascal Dependencies") and recompiles files when the
     compiler version, platform or options differ from those they were
     compiled with.

   * Compiles the main program to an object file before linking, so it
     does not have to be recompiled when only a unit's implementation
     changes, and you have it available in case you want to link it
     explicitly.

   * The options `--progress-messages' and `--progress-bar' are
     extended to give information on the progress of the compilation of
     the whole project (not only of a single source file as when
     calling `gpc' directly).


   Some limitations:

   * Extended Pascal module support is experimental.

   * More than one unit/module/program in one source file is not
     supported.

   * Modules with interface and implementation parts in separate source
     files are not supported. This seems to be difficult to do at all,
     since the information where to find the implementation module is
     simply missing from the source. If you have any good ideas on this
     topic, please send them to the GPC list.

   * Other more or less strange things may not be supported. If you
     find anything, let me know, so I can decide whether to support it
     or to document that it's not supported.


   GP is Copyright (C) 2000-2006 Free Software Foundation, Inc.

   GP was written by Frank Heckenbach <frank@pascal.gnu.de>.

   This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, version 2.

   This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

   You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.

