[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: |
Derek Price |
Subject: |
[bug-gnulib] Re: gnulib-tool plays nice with make |
Date: |
Wed, 02 Mar 2005 14:04:05 -0500 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Simon Josefsson wrote:
| 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.
Um, I noticed that but I didn't need it and I wasn't sure that --lgpl
changed all files or that perl -p wouldn't notice that it shouldn't
touch its output file if it hadn't changed, but it might. Of course,
you should be able to get the same effect by moving the --lgpl
processing before the copy and sending its output to a tmp file, then
using cmp on that instead of the orignal file when necessary.
Regards,
Derek
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCJg4kLD1OTBfyMaQRApGyAJ9op89AvgxA/IlOVfyVt29pfQKvUgCfeUWI
AT5bdSygZqKvKRnYgyCoCFQ=
=+Pk2
-----END PGP SIGNATURE-----