I have different libraries and executables as subprojects in my hierarchy. Most of them are demons. Therefore, I have the appropriate files cfgthat these applications read during startups.
I have two questions.
- allows you to have a simple scenario: a single project without a hierarchy. I need to run the application with / without
install. Therefore, if I put the installation directive to save cfg to /etc, I can get the constant cfg path. But in cases that I might not want to install. I want to run an executable file right after execution make. So how to manage cfg in a way that works with / without install? - My next scenario is where I have a hierarchy of subprojects. where the need for monitoring both
a.cfgand b.cfg. and all cfg are saved separately in another subproject. Is this design useful? Can I specify paths to cfg files from a, band monitorin this scenario?
However, I can include include directives inside monitor.cfg to enable a.cfg and b.cfg. But it comes down to the same problem. address paths to cfg files with / without installation.
abcd
cfg
abcd
a.cfg
b.cfg
monitor.cfg
includes/cfg
sources
-> libabcd-cfg.so
components
a: cfg
-> a
b: cfg
-> b
monitor: cfg
-> monitor
One simple solution is to save the set of global search paths in a view cfg/includes/cfg/defs.hthat first searches in .and then searches in /etc. However, configuration files stored in another project .will not work.