Re: move-if-change and parallel make

2011-01-28 Thread Ralf Wildenhues
, Ralf move-if-change: cope with concurrent mv of identical file. * build-aux/move-if-change (CMPPROG): Accept environment variable as an override for `cmp'. (usage): Document CMPPROG. Adjust comparison to drop stdout. Cope with failure of mv if the target file ex

Re: move-if-change and parallel make

2011-01-23 Thread Ralf Wildenhues
amp; $cmpprog -- "$1" "$2" >/dev/null; then > >rm -f -- "$1" > > else > > - mv -f -- "$1" "$2" > > + if mv -f -- "$1" "$2"; then :; else > > +# Ignore failure due to a concurrent move-if-change.

Re: move-if-change and parallel make

2011-01-22 Thread Paul Eggert
f -- "$1" "$2" > + if mv -f -- "$1" "$2"; then :; else > +# Ignore failure due to a concurrent move-if-change. > +$cmpprog "$1" "$2" >/dev/null 2>&1 && rm -f -- "$1" The two cmpprog invocati

move-if-change and parallel make

2011-01-22 Thread Ralf Wildenhues
cy going from 'cmp -s' to cmp is not a problem. Or is all of this totally overkill here? Thanks, Ralf move-if-change: cope with concurrent mv of identical file. * build-aux/move-if-change (CMPPROG): Accept environment variable as an override for `cmp'. (usage):

Re: move-if-change

2007-10-01 Thread Paul Eggert
Eric Blake <[EMAIL PROTECTED]> writes: > But I've checked this in anyways: > http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=commit;h=da27171 I suspect that nobody needs it nowadays; in that case it might be better to omit it from gnulib, as it might confuse people into thinking that it's useful.

Re: move-if-change

2007-09-28 Thread Eric Blake
Karl Berry freefriends.org> writes: > > Does anyone know where a canonical copy of move-if-change is stored? > > There never was a canonical location afaik. > > So I too think the Autoconf version is the best place to start, and you > should just put it in gnuli

Re: move-if-change

2007-09-28 Thread Karl Berry
Does anyone know where a canonical copy of move-if-change is stored? There never was a canonical location afaik. So I too think the Autoconf version is the best place to start, and you should just put it in gnulib now, if/since you need it. The gcc/emacs/etc. versions are unlikely to be

Re: move-if-change

2007-09-28 Thread Paul Eggert
Eric Blake <[EMAIL PROTECTED]> writes: > Does anyone know where a canonical copy of move-if-change is stored? It used to be in Autoconf, but got removed between 2.60 and 2.61; see <http://lists.gnu.org/archive/html/autoconf-patches/2006-08/msg00040.html>. If you really nee

Re: move-if-change

2007-09-28 Thread Jim Meyering
Eric Blake <[EMAIL PROTECTED]> wrote: > ...and we should make gnulib > become the canonical home of a proper implementation? I would like to add it > into gnulib/build-aux, so that projects can easily grab the latest version of > it from gnulib. That sounds like the way to go.

move-if-change

2007-09-28 Thread Eric Blake
Does anyone know where a canonical copy of move-if-change is stored? Or maybe no existing version is good enough for GNU standards, and we should make gnulib become the canonical home of a proper implementation? I would like to add it into gnulib/build-aux, so that projects can easily grab