Mail Archives: djgpp/1999/02/27/02:07:23
At 12:22 PM 2/25/99 -0800, you wrote:
>It's possible, however, that they edited the Makefile (some Makefiles
>are to be edited for local configuration) with an editor that munged it.
Yucky. I stay far far away from editors that mung makefiles, sticking with
PFE and RHIDE.
The makefile for my current project self-configures. First thing it builds
is a small C++ program that tests a few machine characteristics and then
runs gcc three or four times on little sources like "namespace foo { extern
int bar; }" to check for things like namespace support and to detect
whether the version of gcc used has certain bugs or not. Basically by
compiling small well-formed translation units that will bomb if and only if
soem bug is resent/feature is absent, and looking at the errorlevel gcc
returns.
The results are output (using stdio since whether the iostreams are in
global or in std:: is not known when this baby compiles) as some macro
defines in a header. Then the makefile runs this thing and thereby
generates the header. Everything else #includes the generated configure
header.
It's been tested BTW, and it works.
--
.*. "Clouds are not spheres, mountains are not cones, coastlines are not
-() < circles, and bark is not smooth, nor does lightning travel in a
`*' straight line." -------------------------------------------------
-- B. Mandelbrot |http://surf.to/pgd.net
_____________________ ____|________ Paul Derbyshire pderbysh AT usa DOT net
Programmer & Humanist|ICQ: 10423848|
- Raw text -