Previous mail
Next mail
Unformatted/full headers
Overview 10 days
Subject
Date
Thread
Author
From: Jan-Jaap van der Heijden
Subject: Standard Compatibility [was: Re: New Alpha]
Date: 4 Apr 1997, 13:23:05
On Fri, 4 Apr 1997, Frank Heckenbach wrote:
>
> - A way to read in configuration files (like "gpc @gpc.cfg") seems good (in
> addition to environment variables and command line options). Even if gpc
> doesn't read in a config file by default, it should be no problem to set
> an alias accordingly (BTW, even modern DOSes support something like alias
> in the form of DosKey...)
>
Let me remind you that:
1) A config file already exists and it is called `specs' (`specs.gpc' if
you're using the djgpp version). It is shared among all members of the GNU
compiler family. Introducing a second, gpc specific config file doesn't
make sence IMHO.
2) GPC doesn't have to be modified to implement the @file trick. This is
a DOS "feature" to overcome DOS commandline-length limitations.
If you want a certain behaviour than:
------------- begin bpc.cfg --------------
--automake
--borland-pascal
--my-wild-language-switch
--------------- end bpc.cfg --------------
and:
------------- begin bpc.bat --------------
@echo off
gpc @c:\djgpp\bin\bpc.cfg %1 %2 %3 %4 %5 %6 %7 %8 %9
--------------- end bpc.bat --------------
This will do just what you want. Usually you would put the
long-name options which select the dialect in the CFG file (you want these
always on/off) and set optimization (-On) and debugging (-gn) from the
command line.
3) If you are a delphi/tp user and want point-and-click userfriendlyness,
I suggest you install RHIDE. Will look very familiar. Can even write one
of those dreaded makefiles for you ;-)
> - Putting those flags in a makefile is also an option, but only if one
> is to use makefiles at all. Personally, I don't like makefiles, and I
> think Pascal programs don't need makefiles, since all the dependencies
> between modules are there in the code (unlike C). Therefore, I'd like
> to be able to compile any Pascal program with simply
> "gpc --automake progname.pas". Any compiler options should be in the
> source (at least there should be a way to do so).
>
Answered above (I hope)
> BTW (not quite to this topic): Is there any reason why the default
> output file is called "a.out" (or "a.exe" with DOS) - other than
> historical reasons? Wouldn't it make more sense to default to the
> base filename of the main program, in order to save programmers from
> typing "gpc -o x x.pas"?
>
Besides hisotorical reasons, it is ofen used in automated testsuites
(in a unix environment) where the compiler is run on a large set of source
files.
> - Naming the program gpc, spc, epc and bpc seems like a sensible way for
> Un*x, but on systems that don't support either hard or symbolic links
> (aka DOS), it would mean 4 separate binaries - probably not a good solution
> there (although those DOS users who want to do only Borland style could
> rename gpc.exe to bpc.exe). So this could be one, but not the only, way to
> choose the defaults.
>
I'm currently experimenting with a seperate compiler pre-driver (like g++
and f77) which can set the language switches when invoked as `bpc' or
`gpc' etc. It's about 15K which is small compared to the 1.5M of gpc1,
even if you install it 4 times because your OS lacks symlinks.
just my HFL 0.02,
JanJaap
---
Thus spake the master programmer:
"After three days without programming, life becomes meaningless."
[The Tao Of Programming]
Previous mail
Next mail
Unformatted/full headers
Overview 10 days
Subject
Date
Thread
Author
| Author | Subject | Date |
|---|---|---|
| Frank Heckenbach | Standard Compatibility [was: Re: New Alpha] | 4 Apr 1997, 12:43:21 |
Note: This page contains information that does not originate from the owner of this web site, but from the authors of the mails archived. The owner of this web site is not responsible for the content of such information. Any use of that infomation requires the consent of the respective author.
Where WWW addresses (URLs) in the mails archived are marked as hyperlinks, this is only for the comfort of the reader. The content of the web pages linked to like this does not necessarily reflect the opinion of the owner of this web site or of the authors of the mails archived. The owner of this web site is not responsible for the content of such web pages. Those pages are explicitly not to be considered as part of the content of this page, but merely as references.
This page was created by Crystal 0.999 (Linux 2.4.27/i686).