I have now implemented stuff which enables part of the package management system. It works like this:
1. Put Felix code in a nice_place. 2. Add FLX_LIB_DIRS: nice_place to your layout control file. The default one is: $HOME/.felix/config/felix.fpc The Felix compiler flxg will now search for include files in directory "nice_place" as well as the usual places. That's it! The recommended nice place is: /usr/local/lib/felix/packages/share/lib You can have any number of nice places, and you can include spaces in filenames with quotes: FLX_LIB_DIRS: nice_place "another nice place" (and quotes by using the other kind of quote .. escapes are not supported because the escape char \ is also the separator on Windows). (at least .. i think that will work :) How you get stuff into your package directory is up to you. This mechanism will work now for pure Felix code. For bindings to C/C++: in order to support #include file searching, static linkage,load time dynamic linkage and run time dynamic linkage, Felix usually uses a package directive like: .. requires package "gmp" ... which in turn requires a file gmp.fpc to exist in the package database. That is normally found in: $FLX_CONFIG_DIR which is usually $FLX_TARGET_DIR/config which is usually FLX_INSTALL_DIR/host/config In other words, we need gmp.fpc to be in the target config directory, but this is tricky. Such a file would be clobbered on an upgrade. I do not know how to do this yet. The package file is going to be different for each target, in fact it may be gmp isn't available on say iPhone. Probably we will have FLX_PACKAGE_DIR/target/config to put the files in (for each target). The user will have to do this. Felix can't know how to find things or what name various libraries have. Some kind of guessing system might be useful. Packages might come with prebuilt configs for popular layouts (eg Debian Linux, -lgmp -lgmpxx works I think). This means the next step will be to allow the user to specify extra config directories to search. Note of course if you do not use packages in your package .. er I mean you do not use "require package" then you can just manually specify the switches on the flx command line. -- john skaller skal...@users.sourceforge.net http://felix-lang.org ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language