progname=$0
package=gnulib
-cvsdatestamp='$Date: 2006-11-13 12:34:33 $'
+cvsdatestamp='$Date: 2006-11-13 12:35:01 $'
last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'`
version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'`
nl='
Options for --import and --update:
--dry-run For --import, only print what would have been done.
-s, --symbolic, --symlink Make symbolic links instead of copying files.
+ --local-symlink Make symbolic links instead of copying files, only
+ for files from the local override directory.
Report bugs to <bug-gnulib@gnu.org>."
}
# - autoconf_minversion minimum supported autoconf version
# - do_changelog false if --no-changelog was given, : otherwise
# - doit : if actions shall be executed, false if only to be printed
-# - symbolic true if --symbolic was given, blank otherwise
+# - symbolic true if --symlink was given, blank otherwise
+# - lsymbolic true if --local-symlink was given, blank otherwise
{
mode=
destdir=
do_changelog=:
doit=:
symbolic=
+ lsymbolic=
supplied_opts="$@"
-s | --symbolic | --symboli | --symbol | --symbo | --symb | --symlink | --symlin | --symli | --syml | --sym | --sy )
symbolic=true
shift ;;
+ --local-symlink | --local-symlin | --local-symli | --local-syml | --local-sym | --local-sy | --local-s )
+ lsymbolic=true
+ shift ;;
--help | --hel | --he | --h )
func_usage
func_exit $? ;;
# - autoconf_minversion minimum supported autoconf version
# - doit : if actions shall be executed, false if only to be printed
# - symbolic true if files should be symlinked, copied otherwise
+# - lsymbolic true if files from local_gnulib_dir should be symlinked,
+# copied otherwise
func_import ()
{
# Get the cached settings.
echo "Replacing file $g (non-gnulib code backuped in ${g}~) !!"
fi
mv -f "$destdir/$g" "$destdir/${g}~" || func_fatal_error "failed"
- if test -n "$symbolic" && test -z "$lookedup_tmp" \
+ if { test -n "$symbolic" \
+ || { test -n "$lsymbolic" \
+ && test "$lookedup_file" = "$local_gnulib_dir/$f"; }; } \
+ && test -z "$lookedup_tmp" \
&& cmp "$lookedup_file" "$tmpfile" > /dev/null; then
func_ln_if_changed "$lookedup_file" "$destdir/$g"
else
# frequently that developers don't put autogenerated files into CVS.
if $doit; then
echo "Copying file $g"
- if test -n "$symbolic" && test -z "$lookedup_tmp" \
+ if { test -n "$symbolic" \
+ || { test -n "$lsymbolic" \
+ && test "$lookedup_file" = "$local_gnulib_dir/$f"; }; } \
+ && test -z "$lookedup_tmp" \
&& cmp "$lookedup_file" "$tmpfile" > /dev/null; then
func_ln_if_changed "$lookedup_file" "$destdir/$g"
else
cp -p "$lookedup_file" "$testdir/$g"
else
ln "$lookedup_file" "$testdir/$g" 2>/dev/null ||
- if test -z "$symbolic"; then
- cp -p "$lookedup_file" "$testdir/$g"
- else
+ if { test -n "$symbolic" \
+ || { test -n "$lsymbolic" \
+ && test "$lookedup_file" = "$local_gnulib_dir/$f"; }; }; then
func_ln "$lookedup_file" "$testdir/$g"
+ else
+ cp -p "$lookedup_file" "$testdir/$g"
fi
fi
done