]> git.sur5r.net Git - kconfig-frontends/commitdiff
Compatibility with BSD version of `sed'
authorClement Chauplannaz <chauplac@gmail.com>
Wed, 8 May 2013 07:27:06 +0000 (09:27 +0200)
committerYann E. MORIN <yann.morin.1998@free.fr>
Wed, 8 May 2013 10:32:25 +0000 (12:32 +0200)
Rewrite calls to `sed' to remove '-r/--regexp-extended' parameter, which is not
supported by BSD `sed'.
BSD `sed' does implement regular expressions, but enables them with parameter
'-E' which in turn is not officially supported by GNU `sed' - in fact it is
implemented but not documented.

Signed-off-by: Clement Chauplannaz <chauplac@gmail.com>
[yann.morin.1998@free.fr: tweak the root-menu hunk]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
bootstrap
configure.ac
libs/images/Makefile.am
scripts/ksync.sh
scripts/version.sh
utils/Makefile.am

index ef523d377b7065e110fe49c40e6f793dbc452c73..4dd9407e790ab387996f542e7770ec7e43193fcc 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -2,7 +2,7 @@
 set -e
 
 printf "Creating macrodir...\n"
-macrodir="$( sed -r -e '/^AC_CONFIG_MACRO_DIR\(\[(.*)\]\)/!d;'  \
+macrodir="$( sed    -e '/^AC_CONFIG_MACRO_DIR(\[\(.*\)\])/!d;'  \
                     -e 's//\1/;'                                \
                     configure.ac                                \
            )"
index ad0cf5fb78e7626f71b8d30aef1accb61d1586ea..554974bde7622ec12ae27d733f572d1e07342c29 100644 (file)
@@ -93,9 +93,7 @@ AC_ARG_ENABLE(
         [yes], [root_menu=Configuration],
         [no],  [root_menu=],
                [# Escape the $ signs, otherwise they would get munged by make
-                # Also, append a space at the end, to separate the package
-                # name from the literal 'Configuration'
-                root_menu="$( echo "$enableval" |sed -r -e 's/\$/\\$$/g;' )"])])
+                root_menu="$( echo "$enableval" |sed -e 's/\$/\\$$/g;' )"])])
 AC_SUBST([root_menu], [${root_menu=Configuration}])
 
 AC_ARG_ENABLE(
index c29b1ab4cd4e30e34cdb0cfaf0212866f8a858c5..009e238523f5dd785b942e914210eac6b4056ad6 100644 (file)
@@ -6,8 +6,8 @@ BUILT_SOURCES = images.c images.h
 CLEANFILES = images.c images.h
 
 images.c: images.c_orig
-       $(AM_V_GEN)$(SED) -r -e 's/^static //' $< >$@
+       $(AM_V_GEN)$(SED) -e 's/^static //' $< >$@
 
 images.h: images.c_orig
-       $(AM_V_GEN)$(SED) -r -e '/^static (const char \*xpm_(.+)\[\]) = \{/!d; s//extern \1;/' \
+       $(AM_V_GEN)$(SED) -e '/^static \(const char \*xpm_\(.\{1,\}\)\[\]\) = {/!d; s//extern \1;/' \
                          $< >$@
index 97fb3fe4df63b157e4e9aae56ea90b1cdfda0bac..aa7464e7ac434455ac48765c486c9a5693000c4d 100755 (executable)
@@ -20,7 +20,7 @@ k_cset_old=$( head -n 1 .version |awk '{ print $(2); }' )
 
 # Get the kernel version
 eval $( head -n 5 "${k_dir}/Makefile"                       \
-        |sed -r -e 's/^/K_/; s/"//g; s/ = ?/="/; s/$/"/;'   \
+        |sed -e 's/^/K_/; s/"//g; s/ = \{0,1\}/="/; s/$/"/;'  \
       )
 k_cset="$( cd "${k_dir}";                   \
            git log -n 1 --pretty='format:%H' \
@@ -58,4 +58,4 @@ printf "Synced-up these changes:\n"
     "${k_cset_old}..${k_cset}"                  \
     ${k_files}                                  \
 )|tee -a "scripts/ksync.log"                    \
- |sed -r -e 's/^/    /;'
+ |sed -e 's/^/    /;'
index 80d104103caf27def442801311a788bccdec3174..fbeb7df1f632b9089002784e5456e31385240101 100755 (executable)
@@ -26,7 +26,7 @@ if [ ${internal} -ne 0 ]; then
 fi
 
 k_ver_plain="$( printf "%s" "${k_ver}"  \
-                |sed -r -e 's/-rc.*//;' )"
+                |sed -e 's/-rc.*//;' )"
 
 case "${kf_ver}" in
     git) kf_ver="-$( git rev-parse --short HEAD )"
index 57ff28896e6898af598525cfbc35de5a8578160b..b3f55df4bb8083f2f84c527c85ed80fad4b39b7b 100644 (file)
@@ -16,6 +16,6 @@ CLEANFILES = tweak
 EXTRA_DIST = tweak.in tweak.in.patch
 
 tweak: tweak.in
-       $(AM_V_GEN)$(SED) -r -e "s/@CONFIG_@/$(config_prefix)/g"    \
+       $(AM_V_GEN)$(SED) -e "s/@CONFIG_@/$(config_prefix)/g"    \
                          $< >$@
        @chmod +x $@