[anjuta] Make gbf-am-parse work with subdirectory targets (bgo#580247)



commit f10f8bfb0032ec943462f594ac5ab33f9e29c0cd
Author: Daniel Elstner <daniel kitta gmail com>
Date:   Sun Apr 26 01:21:37 2009 +0200

    Make gbf-am-parse work with subdirectory targets (bgo#580247)
    
    * plugins/gbf-am/GBF/General.pm (canonicalize_name): Canonicalize the
    the target name the same way Automake does:  Only alpha-numeric ASCII
    characters and the strudel "@" are allowed in a variable name.
    
    In particular, this fixes the handling of directory separators "/" in
    target names.  Thus, Anjuta now works with non-recursive make.
---
 plugins/gbf-am/GBF/General.pm |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/plugins/gbf-am/GBF/General.pm b/plugins/gbf-am/GBF/General.pm
index 2cd0019..a573595 100644
--- a/plugins/gbf-am/GBF/General.pm
+++ b/plugins/gbf-am/GBF/General.pm
@@ -37,11 +37,10 @@ sub report_warning
 
 sub canonicalize_name
 {
-    my ($name);
+    my ($name) = @_;
+
+    $name =~ s'[^0-9 A-Z_a-z]'_'g;
 
-    $name = $_[0];
-    $name =~ tr/\.-/_/;
-    
     return $name;
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]