On 02/04/2010 05:04 PM, John Plevyak wrote:
Another question is how do we want to handle versions? Should we have:
ats/ats-2.0.h ?
gtk uses /usr/include/gtk-2.0
python in /usr/include/python2.5
gcc uses /usr/include/g++/4.1.2
Some folks also have a single .h which pulls in everything:
We touched on this issue before, and I'm not sure it's really necessary?
I mean, the reason why things like gtk version their stuff is because
both users and developers are quite likely to have applications that
need different versions of the include /libraries. So it's both a
run-time and a compile time "issue". But how important is that for us? I
mean, for "production", there almost certainly would be very few cases
where someone would run ATS v2.0 and ATS v3.0 on the same box.
So, the "use" case for ATS to version the includes would be for
developers / packagers who needs to produce plugins for more than one
version. I'm not for or against "handling" that in our packaging, but I
think it's pretty reasonable that someone would either have to specify a
specific -I directive manually, or simply have a couple of VMs with
different installations. At a minimum, they would have to manually do
something to switch between include versions.
If we go the version route, I do like to have the "default" behavior.
I'm not sure we should "pollute" the top level include dir, so maybe
something like this (slightly modified from John's proposal):
/usr/local/include/ats/ats.h -> symlink to ./acive/ats.h
/usr/local/include/ats/remap_api.h -> symlink to ./active/remap.h
/usr/local/include/ats/active -> symlink to ./2.0 (or ./3.0)
/usr/local/include/ats/2.0/ats.h
/usr/local/include/ats/2.0/remap.h
/usr/local/include/ats/3.0/ats.h
/usr/local/include/ats/3.0/ats.h
(if we are dropping "api" from the InkAPI.h name, lets drop it from "remap_api" too I
think? :) Once we have a finished "stub" library for linking/testing plugins, we'd have to do
something similar for any .so or .a's I think (but lets not solve that problem now).
The above would make it pretty darn easy to compile for multiple
versions, just change the /active/ symlink accordingly.
-- Leif