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(a)pascal.gnu.de>. It is distributed
under the terms of the GNU General Public License, version 2.
Frank
--
Frank Heckenbach, frank(a)g-n-u.de, http://fjf.gnu.de/, 7977168E
GPC To-Do list, latest features, fixed bugs:
http://www.gnu-pascal.de/todo.html
GPC download signing key: 51FF C1F0 1A77 C6C2 4482 4DDC 117A 9773 7F88 1707
I have uploaded a new beta version of GPC to
<http://www.gnu-pascal.de/beta/>.
This version contains mostly bugfixes and only few and smaller new
features. Therefore, if no serious bugs will be found in the next
fews days, it can be recommended for production work.
Waldek Hebisch and I are currently working on some larger changes,
including qualified identifiers, range checking and support for
gcc-3.4.0. An alpha version with these changes, which might be less
stable, will probably be released in a few weeks.
BUILD NOTE: If you modify the GPC sources, you now need bison-1.875c
and flex-2.5.27 (<http://lex.sourceforge.net>) to rebuild. These
versions must be matched exactly. Newer flex versions, in particular
2.5.31, might work as well, but contain a known unportability, so I
did not test them, and I recommend 2.5.27. (Other programs such as
yacc and lex instead of bison and flex also will not do.) I have
included the files generated by bison and flex in the distribution
(also in the "minimal" distribution), so you should not need these
tools when you only want to build GPC.
NOTE: The `Pipe' unit was renamed to `Pipes' because of a name
conflict. Unfortunately, this requires a small change to all
programs that use this unit.
New features:
* arithmetic expressions now work as lower array/subrange bounds
(fjf248.pas, fjf293.pas, fjf336.pas, fjf346a.pas, fjf622.pas)
* records/objects with many fields are processed faster
* parameters of procedural types now support Standard Pascal
procedural parameters, conformant/open arrays and `type of'
inquiries (fjf939*.pas)
* empty parameter lists can be written as `()' (chief54*.pas,
delphi6*.pas) (D)
* GMP unit: `mpf_sin', `mpf_cos'
* the test suite output is now by default stored in DejaGnu
compatible files `gpc.log' and `gpc.sum' in the `p/test/'
directory; other available test targets are `pascal.check-short'
and `pascal.check-long' (@)
* new options `-W[no-]dynamic-arrays' (fjf931*.pas)
* new argument to `_p_initialize' (@)
* new function `UMask'
* new option `--no-debug-source'
* new lexer (no directly user-visible difference, but should allow
for better handling of lexer-based problems in the future)
Fixed bugs:
* `pow' and `**' are really EP conformant now (in particular `x pow
y' and `x ** y' are an error if x = 0 and y <= 0) (emil27*.pas)
* `protected var' parameters must only accept references
(unlike `const' parameters) (gale5*.pas)
* `pack' must not pack the component type of arrays
(fjf940[b-e].pas)
* in some circumstances packed fields were allowed as `var'
parameters (fjf940a.pas)
* bugs with nonlocal gotos out of routines declaring file
variables (nonloc*.pas) (fix involved a change in the internal
representation of file variables)
* 'foo'#42 must not be rejected in `--borland-pascal'
(chief53.pas)
* `--implementation-only' didn't work correctly
(bo4-19.pas)
* messages referring to object methods now point to the method
declaration rather than the end of the object type declaration
* initializers for types containing nested schemata now work
(fjf914*.pas)
* various smaller bugs
Frank
--
Frank Heckenbach, frank(a)g-n-u.de, http://fjf.gnu.de/, 7977168E
GPC To-Do list, latest features, fixed bugs:
http://www.gnu-pascal.de/todo.html
GPC download signing key: 51FF C1F0 1A77 C6C2 4482 4DDC 117A 9773 7F88 1707