* gnulib-tool (func_get_automake_snippet): Merge multiple sed
invocations.

Signed-off-by: Ralf Wildenhues <ralf.wildenh...@gmx.de>
---

Noting that these sed scripts can be merged may not be trivial,
you may believe me that it is alright in this case.  ;-)

I have not timed the impact of this.

Cheers,
Ralf

 ChangeLog   |    4 ++++
 gnulib-tool |    3 +--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 30f6bdb..260821a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2010-01-17  Ralf Wildenhues  <ralf.wildenh...@gmx.de>
 
+       gnulib-tool: small sed optimization.
+       * gnulib-tool (func_get_automake_snippet): Merge multiple sed
+       invocations.
+
        gnulib-tool: avoid forks with func_get_* functions.
        * gnulib-tool (func_get_description)
        (func_get_status, func_get_notice, func_get_applicability)
diff --git a/gnulib-tool b/gnulib-tool
index 8ab1c77..5ab640f 100755
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -1665,8 +1665,7 @@ func_get_automake_snippet ()
       sed_extract_mentioned_files='s/^lib_SOURCES[      ]*+=[   ]*//p'
       already_mentioned_files=` \
         { eval 'echo "$'${cachevar}'_makefile"'; echo; } \
-        | sed -e "$sed_combine_lines" \
-        | sed -n -e "$sed_extract_mentioned_files" | sed -e 's/#.*//'`
+        | sed -n -e 's/#.*//' -e "$sed_combine_lines" -e 
"$sed_extract_mentioned_files"`
       func_get_filelist $1
       all_files=$module_files
       func_filter_filelist lib_files "$nl" "$all_files" 'lib/' '' 'lib/' ''
-- 
1.6.5.1.31.gad12b



Reply via email to