Re: Automake and directories

Jukka Zitting <[email protected]> Fri, 17 Feb 2006 18:51:13 +0200
Newsgroups gmane.comp.web.midgard.devel
Message-ID <[email protected]>
Hi,

On 2/17/06, Piotras <[email protected]> wrote:
> OK, I think we are coming back to desktop application vs web based one.

Not really, the same issue affects both types of applications.

> I think we can follow midgard config object and overwrite its properties
> on application level if needed. So "hardcoded" ( defined in header file ) data
> could be used unless overwitten by application.

This sounds rather complex.The less an application needs to worry
about such details the better.

More generally about the configured directories. How about if we used
something like the following for CPPFLAGS instead of the path
calculation code in _get_config_dir() in src/config.c? The confdir,
blobdir, and sharedir paths from _get_config_dir() could all be
replaced with:

    -DMIDGARD_CONF_DIR=\"$(sysconfdir)/midgard/conf.d\" \
    -DMIDGARD_BLOB_DIR=\"$(sharedstatedir)/midgard/blobs\" \
    -DMIDGARD_SHARE_DIR=\"$(pkgdatadir)\"

The default ./configure would put these in:

    MIDGARD_CONF_DIR=/usr/local/etc/midgard/conf.d
    MIDGARD_BLOB_DIR=/usr/local/var/midgard/blobs
    MIDGARD_SHARE_DIR=/usr/local/share/midgard

The current custom paths could be recreated with:

    ./configure --prefix=/usr --sysconfdir=/etc --sharedstatedir=/var/lib

This way we wouldn't need any of the path building logic in
_get_config_dir() or in datagard.conf.

BR,

Jukka Zitting

--
Yukatan - http://yukatan.fi/ - [email protected]
Software craftmanship, JCR consulting, and Java development