mån 2009-09-07 klockan 07:29 +1000 skrev Robert Collins: > On Sun, 2009-09-06 at 23:25 +0200, Henrik Nordstrom wrote: > > Not sure I am comfortable with adding dependencies to automakes own > > targets.. > > > > and no, we are not fine with just that. See the rest of previous > > response.. To repeat there is more issues here than uninstall racing, we > > don't even install properly if someone tries to override the default > > locations by make DEFAULT_CONFIG_FILE=... DEFAULT_MIME_TABLE=... > > We should definitely fix that :). If its plausible that automake should > know and avoid the problem itself, lets file a bug. Otherwise we'll have > to work around it I guess.
automake can't know. There is two things about this, both unsupported by automake a) The xxx.default construct, where xxx is only installed if missing and only removed if identical to xxx.default. b) make time override of certain filenames (full path including name) on a per-file basis. Support for 'a' is missing from automake, which is a shortcoming. Can imagine other projects may see benefit from this. The way automake expects 'b' to be done is to specify a different prefix at configure time for the whole category of files but keeping the filename as specified in automake.am (possibly with suffix depending type & os, i.e. .exe on Windows). Regarding 'a' I have another idea.. we could just add a comment with the hash of the file. # Config install hash. Remove if editing the file: `md5sum squid.conf.default` and compare this hash instead of looking for squid.conf.default. At build time when making squid.conf: echo "# Config install hash. Remove if editing the file:`md5sum squid.conf`" >>squid.conf Uninstall: orig_sum=`grep "^# Config install hash. Remove if editing the file:" squid.conf | cut -d: -f2` sum="`grep -v # Config install hash. Remove if editing the file:" squid.conf | md5sum`" test "$sum" = "$orig_sum" && rm squid.conf Regards Henrik
