Jens Rieks <[EMAIL PROTECTED]> wrote: > On Wednesday 28 April 2004, Leopold Toetsch wrote: >> >> STRING * Parrot_get_runtime_path(interp, file_type, filename) >> >> or some such. File type is one of [dynamic/shared extension, include_file, >> library] currently. > I had no luck with writing this function, mainly because I do not know much > about parrots internals, especially when it comes to filename/path handling > and testing if a particular file exists (without doing "bruteforce" opens).
There is no portable way to test if a file exists. A generic version could just try to open it (which BTW can protect from races between access(2) and open). Platform specific versions can do a better job if needed. >> The searchorder should be configurable finally, for now current directory >> and runtime/parrot/* should do it. > Is runtime/parrot/include and runtime/parrot okay for the moment? Yep. We can always extend it. We need something for ICU though, e.g. keep headers and blib/lib but move the libs into runtime/parrot/icu. >> [1] and imcc/imcc.l:include_file() > How can I regenerate the corresponding C files? > I looks like there's no Makefile rule for it, intentionally not? You have to Configure.pl --maintainer to get the appropriate Makefile rules. And you need a working flex. > jens leo