]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
A locally modified 'mkinstalldirs' is not an error.
authorBruno Haible <bruno@clisp.org>
Mon, 7 Mar 2005 19:57:48 +0000 (19:57 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:12:22 +0000 (12:12 +0200)
gettext-tools/misc/ChangeLog
gettext-tools/misc/autopoint.in

index ab3dd7c968926c85b825e1fd97f7ae4720ddcd3e..4cacb10cfe65f201bb5dd2545c0a232999c20630 100644 (file)
@@ -1,3 +1,9 @@
+2005-03-06  Bruno Haible  <bruno@clisp.org>
+
+       * autopoint.in (func_destfile): Also set a variable 'sharedowner'.
+       For files with shared ownership, treat local modification as a warning.
+       Suggested by Alexandre Duret-Lutz <adl@src.lip6.fr>.
+
 2005-03-05  Bruno Haible  <bruno@clisp.org>
 
        * gettextize.in: When a po/POTFILES.in does not exist, create an
index caacc51adce7288fe30a45c02d2e109aa982ce51..691d21ed5f331ad689bf48283894e6b6121610ba 100644 (file)
@@ -416,9 +416,11 @@ cd ..
 # func_destfile file
 # determines the destination file, relative to the package's top level
 # directory, for a given file name, relative to archive.
-# Sets variable
+# Sets variables
 # - destfile        relative destination file name, or
 #                   empty if the file shall be omitted
+# - sharedowner     yes if the file is not only owned by GNU gettext but may
+#                   be installed by automake or other tools, otherwise empty
 func_destfile ()
 {
   # There are five categories of files:
@@ -427,10 +429,12 @@ func_destfile ()
   # m4/* -> $m4dir/
   # intl/* -> intl/
   # po/* -> po/
+  sharedowner=
   case `echo "$1" | sed -e 's,[^/]*$,,'` in
     "" )
       case "$1" in
-        config.rpath | mkinstalldirs ) destfile="$auxdir$1" ;;
+        config.rpath ) destfile="$auxdir$1" ;;
+        mkinstalldirs ) destfile="$auxdir$1" sharedowner=yes ;;
         * ) destfile="$1" ;;
       esac
       ;;
@@ -455,9 +459,13 @@ if test -z "$force"; then
         if cmp -s "$work_dir/archive/$file" "$destfile"; then
           :
         else
-          echo "autopoint: File $destfile has been locally modified." 1>&2
-          mismatch=yes
-          diff -c "$work_dir/archive/$file" "$destfile" | sed -e "1s,$work_dir/archive/,," >> "$mismatchfile"
+          if test -n "$sharedowner"; then
+            echo "autopoint: warning: File $destfile has been locally modified." 1>&2
+          else
+            echo "autopoint: File $destfile has been locally modified." 1>&2
+            mismatch=yes
+            diff -c "$work_dir/archive/$file" "$destfile" | sed -e "1s,$work_dir/archive/,," >> "$mismatchfile"
+          fi
         fi
       fi
     fi
@@ -521,8 +529,12 @@ for file in `find "$work_dir/archive" -type f -print | sed -e "s,^$work_dir/arch
       if cmp -s "$work_dir/archive/$file" "$destfile"; then
         :
       else
-        # Overwrite locally modified file.
-        mustcopy=yes
+        if test -n "$force"; then
+          # Overwrite locally modified file.
+          mustcopy=yes
+        fi
+        # If --force is not specified, don't overwrite locally modified files
+        # for which GNU gettext is a shared owner.
       fi
     else
       mustcopy=yes