[Gross] Makefile cleanup for installing grossd.conf
naked at iki.fi
Tue Apr 15 15:31:39 EEST 2008
Eino Tuominen wrote:
> Nuutti Kotivuori wrote:
>> I found this bit in the Makefile.am:
>> if test ! -f $(sysconfdir)/grossd.conf; then $(INSTALL_DATA)
>> $(srcdir)/doc/examples/grossd.conf $(sysconfdir); fi
>> As a minor point, I dislike the test for existence of grossd.conf.
>> Sure, that's handy when testing and developing, but those sorts of
>> things in the Makefile make things hard for the package maintainers -
>> and can confuse some users.
> Can you give me an example, please. I have thought that overwriting
> existing config would make things even more confusing, when upgrading.
Well, the issue is not that the behaviour would be confusing in
itself, it's just that it's different from the common norm on how most
packages do it.
As a user, I might expect the file to be overwritten on 'make install'
(especially if my prefix is something else than /) and then wonder why
nothing works as the configuration file is still from the old version
- though I don't think I would ever 'upgrade' a piece of software just
by compiling a new version and saying make install.
But, like said, a minor point, perhaps relevant only to me.
>> But the real problem is that the commandline doesn't take in to
>> account $(DESTDIR).
>> It should be:
>> if test ! -f $(DESTDIR)$(sysconfdir)/grossd.conf; then $(INSTALL_DATA)
>> $(srcdir)/doc/examples/grossd.conf $(DESTDIR)$(sysconfdir); fi
> Thats a bug, thanks for pointing it out! I'll fix it shortly.
Actually, you could handle this the way most packages do it:
confdir = $(sysconfdir)
conf_DATA = grossd.conf
That would require moving grossd.conf to the root of the source
distribution though, if there are no changes in the source search
Obviously it's entirely up to you, either goes.
More information about the Gross