sed on apple's platform is more limited here is workaround. awk needs
a check not to make module depend on itself in some cases

-- 
Regards
Vladimir 'phcoder' Serbinenko
diff --git a/Makefile.in b/Makefile.in
index cd79b0b..e00f9c3 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -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; \
diff --git a/gencmdlist.sh b/gencmdlist.sh
index 5d3897c..7f25490 100644
--- a/gencmdlist.sh
+++ b/gencmdlist.sh
@@ -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;}"
+
diff --git a/genmoddep.awk b/genmoddep.awk
index c079b36..5b9bc62 100644
--- a/genmoddep.awk
+++ b/genmoddep.awk
@@ -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 = ""
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to