Simplify sed script and make awk script more robust
PATCH 4/18 Simplify sed script and make awk script more robust
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
Signature · 2 lines
Regards Vladimir 'phcoder' Serbinenko
Makefile.in +1 -1
@@ -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; \
gencmdlist.sh +3 -1
@@ -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;}" +
genmoddep.awk +1 -1
@@ -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 = ""
Quoted 2 lines · Vladimir 'phcoder' Serbinenko
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
Sorry for not being able to review this series earlier. This patch doesn't seem to be properly explained. It's not clear is you are simplifying the expression without loss in functionality or you chose to ignore some cases.
Signature · 2 lines
Regards, Pavel Roskin
Quoted 8 lines · Pavel Roskin
Quoted 2 lines · Vladimir 'phcoder' Serbinenko
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
Sorry for not being able to review this series earlier. This patch doesn't seem to be properly explained. It's not clear is you are simplifying the expression without loss in functionality or you chose to ignore some cases.
I simplify without the loss of functionality. First simplification is to split a sed expression using (*|*) construction into two expressions and the second is not to care about trailing /. Even if it's nicer to avoid double / in filenames I believe it isn't a problem for any system
Quoted 12 lines
--
Regards,
Pavel Roskin_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Signature · 2 lines
Regards Vladimir 'phcoder' Serbinenko