On Thu, Feb 02, 2006 at 04:27:08PM -0800, Ben Pfaff wrote:
     John Darrington <[EMAIL PROTECTED]> writes:
     
     > I take it your plan would be to have each directory compiled as a
     > static library, and linked into the binary at the end?  
     
     Does Automake offer a better way?  I seem to recall that I tried
     doing something like
             pspp_SOURCES = a.c b.c c.c ... subdir/x.c subdir/y.c
     and it choked on it.  Really that'd be easier than dealing with a
     bunch of libraries, though, if it worked.

I don't know of another way, but I guess we could look into it.
     
     > And what about header file search paths?  Currently, *every*
     > file in *every* directory searches *every* directory for it's
     > *.h #includes.  IMHO this is wrong, and would be cumbersome for
     > such a large number of directories. So this would need to be
     > thought about.
     
     I don't think that's the scheme we use now.  We don't, for
     example, have lib/linreg or src/expressions in the search path.
     Instead we have lib and src in the search path, and to include
     e.g. expressions/public.h we write 
             #include "expressions/public.h"
     
     I wouldn't expect to add to the search path as we add
     directories; instead, to add directory names to the #include
     directives.
     
     Actually, it sounds like we're in agreement on that.

I'm not so sure that I entirely agree.  Explicitly #including the path
could get cumbersome if several levels of directories are used.  For
example, in the structure you suggested, we'd be seeing lines like:

#include "commands/dictionary/value-labels.h":

On the other hand, this does have the advantage that it makes the
programmer think more carefully about what he's depending upon.  Right
now, I have mixed opinions about which is the better way.

J'

-- 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://pgp.mit.edu or any PGP keyserver for public key.


Attachment: signature.asc
Description: Digital signature

_______________________________________________
pspp-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/pspp-dev

Reply via email to