Alex Rousskov wrote:
On 03/16/2009 08:21 PM, Robert Collins wrote:
On Mon, 2009-03-16 at 20:01 -0600, Alex Rousskov wrote:
I have moved registration code from src/acl/* sources into a
src/AclRegs.cc file, making the latter the source file for Squid
executable. With this change, Squid knows about specific ACL types
(because they are needed by the registration code) and the
corresponding
ACL classes get linked.
I'd really like it if we can add/remove ACL types by just dropping a
single file in the source, rather than N different places.
Me too, but I do not see a good solution that would allow us to do that
right now.
I have code that does "single drop-in" elsewhere, but it is using
installable shared libraries, something that Squid does not have. This
seems to be a libtool or libtool knowledge limitation so hopefully
somebody will find a workaround or libtool will get better.
There is also non-recursive Makefile option that should probably be
investigated eventually. The current SourceLayout work will make that
investigation easier. I wonder how non-recursive Makefiles deal with
command-line length limits, when the project has hundreds of sources?
http://miller.emu.id.au/pmiller/books/rmch/
Meanwhile, adding a couple of lines to a second file is not a big deal,
IMO. If nothing else, it is better than directly including 40 source
files in 20 executable definitions :-).
Idea:
src/acls directory as you originally proposed, which contains all the
AclX.h and AclX.cc files for ACL named types *only* (resu goes into
src/acl library.
Make runs a helper script to generate AclReg_gen.cc similar to DiskIO,
but generates AclX->Instance() calls from the filenames found in that
directory.
New ACL simply get dropped into that directory and added to its Makefile.am
Amos
--
Please be using
Current Stable Squid 2.7.STABLE6 or 3.0.STABLE13
Current Beta Squid 3.1.0.6