summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2006-01-23 12:09:42 +0000
committerAndreas Gruenbacher <agruen@suse.de>2006-01-23 12:09:42 +0000
commitef8f0df0f7785c44a227fc95ebbb2ac24ecf283d (patch)
tree1e66df45cfd311526ebecf02cd2fcb7b8a2d6ad8
parent774b5b35adf93e9e3d665c996e399cdd89b9ed8b (diff)
downloadquilt-ef8f0df0f7785c44a227fc95ebbb2ac24ecf283d.tar.gz
- Check if awk supports sub().
- Syntax changes in patchfns for Solaris /usr/xpg4/bin/awk.
-rw-r--r--configure.ac17
-rw-r--r--quilt.changes6
-rw-r--r--quilt/scripts/patchfns.in6
3 files changed, 25 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index c677f47..a3056c7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
AC_INIT([quilt],[0.42],[quilt-dev@nongnu.org])
AC_CONFIG_AUX_DIR(config)
AC_PREREQ(2.53)
-AC_REVISION ($Revision: 1.64 $)
+AC_REVISION ($Revision: 1.65 $)
PACKAGE_RELEASE=1
AC_SUBST(PACKAGE_RELEASE)
@@ -146,6 +146,21 @@ its path with the '--with-sed=' option.
fi
QUILT_COMPAT_PROG_PATH(AWK, awk, [gawk awk])
+
+AC_MSG_CHECKING([whether $AWK supports sub])
+if test "`echo first | $AWK 'sub(/first/, "last")' 2>/dev/null`" = "last"; then
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([
+Sorry, you have a version of awk which doesn't understand sub( ).
+$PACKAGE_NAME needs it. If you have access to a version of awk
+which does understand such constructs, you can supply its path
+with the '--with-awk=' option.
+Solaris users can use /usr/xpg4/bin/awk.
+])
+fi
+
QUILT_COMPAT_PROG_PATH(POD2MAN, pod2man)
QUILT_COMPAT_PROG_PATH(COLUMN, column)
QUILT_COMPAT_PROG_PATH(GETOPT, getopt)
diff --git a/quilt.changes b/quilt.changes
index 2152879..befcc8a 100644
--- a/quilt.changes
+++ b/quilt.changes
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Mon Jan 23 13:05:48 CET 2006 - jayvdb@gmail.com
+
+- Check if awk supports sub().
+- Syntax changes in patchfns for Solaris /usr/xpg4/bin/awk.
+
+-------------------------------------------------------------------
Mon Jan 23 11:58:20 CET 2006 - agruen@suse.de
- Stop using GNU awk's gensub.
diff --git a/quilt/scripts/patchfns.in b/quilt/scripts/patchfns.in
index ea886fb..3286a2e 100644
--- a/quilt/scripts/patchfns.in
+++ b/quilt/scripts/patchfns.in
@@ -370,7 +370,7 @@ patches_after()
then
cat_series \
| awk '
- seen { print }
+ seen == 1 { print }
$0 == "'"$patch"'" { seen=1 }
'
else
@@ -392,7 +392,7 @@ patches_on_top_of()
[ -e $DB ] || return
awk '
$0 == "'"$patch"'" { seen=1 ; next }
- seen { print }
+ seen == 1 { print }
' $DB
}
@@ -614,7 +614,7 @@ filenames_in_patch()
{ sub(/\t.*/, "")
sub(/^... /, "")
for (n=0 ; n<'"$strip"'; n++)
- sub(/^([^/]+\/)/, "")
+ sub(/^([^\/]+\/)/, "")
print $0 }' $patch_file
fi
}