On Wed, 2 Apr 1997, The African Chief wrote:
I think this could be the way forward. Having a multitude of command line switches is very good, in that it gives the programmer more flexibility to use the compiler in the way that he/she likes, not in the way that somebody else thinks they should. However, the price of flexibility is complexity. In case you haven't done this, can you introduce a .CFG file (like with Borland) where one can put all the command line switches that they want to use?
You can do all of this in a Makefile.
The compiler will read the .CFG file before doing anything else, and will adjust its behaviour accordingly. I personally prefer this approach to using environment variables or the such. You can make many sample .CFG files (e.g., borland.cfg, extended.cfg, iso.cfg, etc) which people can then rename to GPC.CFG or whatever.
Sorry if all this already exists.
Environment variables are used to override default paths to libraries etc. Commandline switches are used to select compiler behaviour (optimization, debugging, dialect etc.)
For unix, setting environment variables is usually not necessary because you build your own compiler with "taylormade" defaults hardcoded in the compiler binary.
For MS-DOS, the compiler is often downloaded as a binary and installed in a path other than the one specified at compile time. DJGPP has an elegant solution for them: `djgpp.env'. That way, you don't have to clutter your MS-DOS environment with a lot of environment variables.
Remaining are cygwin32 and OS/2 platforms. cygwin32 is still experimental, maybe they implement something like `djgpp.env'.
GPC has a config file: `specs'. You can change some of GPC's behaviour here. Future versions of GPC may come with different driver binaries (`gpc', `bpc', `epc' etc.) which preset a number of switches to select a certain Pascal dialect.
Greetings, JanJaap
--- Thus spake the master programmer: "After three days without programming, life becomes meaningless." [The Tao Of Programming]