Zelphir Kaltstahl <zelphirkaltst...@posteo.de> writes:
> Do you have an example for when one would bake in > system-specific data-paths? To satisfy distribution packaging standards your project files may end up in different directories and cannot assume that the relative relationship between files remains unchanged. So if you include images, for example, and your code loads them then your code cannot assume that they are both in the same directory. Your compiled code may end up in a sub-directory of ${prefix}/lib/guile/3.0/site-ccache while your image data might end up in ${prefix}/share/${application_name}/images. Or it could be something completely different. Conventional “configure” scripts (as generated by autoconf) give the user the ability to overwrite default locations by passing “--prefix”, “--localstatedir”, “--libdir”, “--datadir”, “--datarootdir”, etc. The fewer assumptions your code makes about locations the happier the distro packagers will be. Autoconf and Automake let you record configured locations by replacing @placeholders@ in template files ending on “.in”. Often you’d have a config.scm.in that contains references to these placeholders and is converted to config.scm during the run of the “configure” script. -- Ricardo