Run time path configuration
Anthony J Heading
heading_anthony@jpmorgan.com
Mon Jul 27 05:34:00 GMT 1998
Hi,
I've been looking for an hour or so at how I might remove the
hard-wiring of directory names into the various executables, and be able to
define the top of the tree by an environment variable. Although all this
stuff is concentrated in two or three files, it's not as simple as I'd
hoped. I'm thinking about allowing configuration of paths of the form
"?GCC_BASE/lib/gcc-lib/" and thus run-time interpolating the GCC_BASE
environment variable.
I'm then thinking about reversing this into the Makefile, e.g.
-DGCC_INCLUDE_DIR=\"`echo '$(libsubdir)/include' | sed
s@/usr/local/@?$(dynprefix)/@`\"
or somesuch, give or take a bit of quoting. Does that seem a sensible
approach, or is this a dumb thing to be trying?
Lastly, why does cccp.c continue to exist when cpplib appears to do
the same thing, and must be out of nappies (U.S. diapers?) by now? Can I
ignore it by using some cunning set of config options?
Cheers
Anthony
More information about the Gcc
mailing list