]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
authorphcoder <phcoder@localhost>
Thu, 4 Jun 2009 19:39:51 +0000 (19:39 +0000)
committerphcoder <phcoder@localhost>
Thu, 4 Jun 2009 19:39:51 +0000 (19:39 +0000)
Simplify sed expressions and improve awk

* Makefile.in (install-local): simplify sed expression
* gencmdlist.sh: likewise
* genmoddep.awk: avoid adding module as a dependency of itself

ChangeLog
Makefile.in
gencmdlist.sh
genmoddep.awk

index 1e53ca4b5dbc52cb4a8873a683d75ef5ad48c810..c1675f6f8f1dad1572ae9ab35b3a1a7f43b65660 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,17 @@
+2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       Simplify sed expressions and improve awk
+
+       * Makefile.in (install-local): simplify sed expression
+       * gencmdlist.sh: likewise
+       * genmoddep.awk: avoid adding module as a dependency of itself
+
 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
 
        Add missing start symbols
 
        * boot/i386/pc/boot.S: add start
-       boot/i386/pc/pxeboot.S: likewise
+       boot/i386/pc/pxeboot.S: likewise
        
 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
 
index cd79b0b05f4a4220a6031399c45127de1bf6f548..e00f9c38f55b803a8363d1de615511a9f79e6c8e 100644 (file)
@@ -213,7 +213,7 @@ install-local: all
        for file in $$list; do \
          if test -f "$$file"; then dir=; else dir="$(srcdir)/"; fi; \
          dest="`echo $$file | sed 's,include/,,'`"; \
-         destdir="`echo $$dest | sed 's,\(^\|/\)[^/]*$$,,g'`"; \
+         destdir="`echo $$dest | sed 's,[^/]*$$,,g'`"; \
          $(mkinstalldirs) $(DESTDIR)$(includedir)/$$destdir; \
          if test -f "$$dir$$file"; then \
            $(INSTALL_DATA) $$dir$$file $(DESTDIR)$(includedir)/$$dest; \
index 5d3897c7dda64e5bcba5ebca00167744aa247ce8..7f2549099f4f3d05fd9ad0ecef336e6f74efc0e7 100644 (file)
@@ -17,4 +17,6 @@ module=$1
 
 grep -v "^#" | sed -n \
  -e "/grub_register_command *( *\"/{s/.*( *\"\([^\"]*\)\".*/\1: $module/;p;}" \
- -e "/\(grub_register_extcmd\|grub_register_command_p1\) *( *\"/{s/.*( *\"\([^\"]*\)\".*/*\1: $module/;p;}"
+ -e "/grub_register_extcmd *( *\"/{s/.*( *\"\([^\"]*\)\".*/*\1: $module/;p;}" \
+ -e "/grub_register_command_p1 *( *\"/{s/.*( *\"\([^\"]*\)\".*/*\1: $module/;p;}"
+
index c079b3672974d74cb6831c07ac0fb28f655d65ba..5b9bc621d6594b6b8fbe279ae971d82a9be87df5 100644 (file)
@@ -50,7 +50,7 @@ END {
     for (i in depmods) {
       depmod = depmods[i];
       # Ignore kernel, as always loaded.
-      if (depmod != "kernel")
+      if (depmod != "kernel" && depmod != mod)
        uniqmods[depmod] = 1;
     }
     modlist = ""