[PATCH 1 of 3] config/config.mk: call sed in the Right Way

Titus von Boxberg titus@v9g.de
Sun Jul 3 07:32:00 GMT 2011


# HG changeset patch
# User Titus von Boxberg <titus@v9g.de>
# Date 1309676910 -7200
# Node ID dd2371a9fbe2a05152cc5947b59ec708b940d026
# Parent  e3523df95b6bd0992eea629a6b03c04037c89c35
config/config.mk: call sed in the Right Way

calling sed as sed destroys portability.
call sed as $(sed) in makefiles before the build process is started.

diff -r e3523df95b6b -r dd2371a9fbe2 config/config.mk
--- a/config/config.mk	Thu Jun 30 18:14:01 2011 +0200
+++ b/config/config.mk	Sun Jul 03 09:08:30 2011 +0200
@@ -93,11 +93,11 @@
 	    if [ "$(5)" = "Y" ]; then                                           \
 	      echo "    depends on $(3)_$${_entry}_AVAILABLE";                  \
 	    fi;                                                                 \
-	    sed -r -e '/^## depends on /!d; s/^## /    /;' $${file} 2>/dev/null;\
-	    sed -r -e '/^## select /!d; s/^## /    /;' $${file} 2>/dev/null;    \
+	    $(sed) -r -e '/^## depends on /!d; s/^## /    /;' $${file} 2>/dev/null;\
+	    $(sed) -r -e '/^## select /!d; s/^## /    /;' $${file} 2>/dev/null;    \
 	    if grep -E '^## help' $${file} >/dev/null 2>&1; then                        \
 	      echo "    help";                                                          \
-	      sed -r -e '/^## help ?/!d; s/^## help ?/      /;' $${file} 2>/dev/null;   \
+	      $(sed) -r -e '/^## help ?/!d; s/^## help ?/      /;' $${file} 2>/dev/null;   \
 	    fi;                                                                         \
 	    echo "";                                                            \
 	  done;                                                                 \
@@ -154,11 +154,11 @@
 	    echo "menuconfig $(3)_$${_entry}";                                  \
 	    echo "    bool";                                                    \
 	    echo "    prompt \"$${entry}\"";                                    \
-	    sed -r -e '/^## depends on /!d; s/^## /    /;' $${file} 2>/dev/null;\
-	    sed -r -e '/^## select /!d; s/^## /    /;' $${file} 2>/dev/null;    \
+	    $(sed) -r -e '/^## depends on /!d; s/^## /    /;' $${file} 2>/dev/null;\
+	    $(sed) -r -e '/^## select /!d; s/^## /    /;' $${file} 2>/dev/null;    \
 	    if grep -E '^## help' $${file} >/dev/null 2>&1; then                        \
 	      echo "    help";                                                          \
-	      sed -r -e '/^## help ?/!d; s/^## help ?/      /;' $${file} 2>/dev/null;   \
+	      $(sed) -r -e '/^## help ?/!d; s/^## help ?/      /;' $${file} 2>/dev/null;   \
 	    fi;                                                                         \
 	    echo "";                                                            \
 	    echo "if $(3)_$${_entry}";                                          \

--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list