[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gnulib] Re: gnulib-tool plays nice with make
From: |
Simon Josefsson |
Subject: |
[bug-gnulib] Re: gnulib-tool plays nice with make |
Date: |
Wed, 02 Mar 2005 19:48:31 +0100 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux) |
Derek Price <address@hidden> writes:
> I've updated gnulib-tool --import to copy files iff they have changed so
> that when no files have changed, then the second make in the sequence:
>
> make
> ../gnulib/gnulib-tool --import MODULELIST
> make
>
> will do nothing when no files change. Patch attached.
> - test -n "$dry_run" && dry=echo
> - $dry cp -p "$gnulib_dir/$f" "$destdir/$g"
> + # Avoid munging timestamps if the file hasn't changed.
> + if cmp "$gnulib_dir/$f" "$destdir/$g" >/dev/null 2>&1; then :; else
> + $dry cp -p "$gnulib_dir/$f" "$destdir/$g"
> + fi
> # Update license.
> if test -z "$dry_run" && test -n "$lgpl" && test -n "$source"; then
> perl -pi -e 's/GNU General/GNU Lesser General/g;' \
The cmp will always fail if --lgpl is given, won't it?
Seem like a good patch nevertheless, as it doesn't make anything worse
than before.
Thanks,
Simon