I have uploaded the first public beta version of GP to http://gnu-pascal.de/contrib/frank/misc/gp-0.54.tar.gz.
GP is a utility to automate the building of Pascal programs using the GPC compiler. It is the intended replacement for GNU Pascal's problematic automake feature.
If you have been using automake, please try building with GP instead. When GP works sufficiently, it will be included with GPC in one of the next releases, and automake support will later be dropped from GPC.
If you only ever used GPC without automake (e.g., using self-written Makefiles or otherwise manually) and do not plan otherwise, you probably do not need GP.
Please read the included files REAMD and INSTALL, as usual.
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.
Quick start:
* Use `gp' instead of `gpc --automake --executable-file-name'. Most other GPC options can be used the same way with GP.
* 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' wither 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') 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:
* The handling of default options and simpler usage of dialect options (as discussed on the mailing list) is not yet included. This will be added in a later revision. However, this does not have any influence on the main functionality of building Pascal programs (you just have to give your options explicitly, as you do when calling `gpc').
* 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-2004 Free Software Foundation, Inc. It was written by Frank Heckenbach frank@pascal.gnu.de. It is distributed under the terms of the GNU General Public License, version 2.
Frank