[csw-devel] SF.net SVN: gar:[6116] csw/mgar/gar/v2/bin/depmaker

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Thu Aug 27 12:25:06 CEST 2009


Revision: 6116
          http://gar.svn.sourceforge.net/gar/?rev=6116&view=rev
Author:   wahwah
Date:     2009-08-27 10:25:05 +0000 (Thu, 27 Aug 2009)

Log Message:
-----------
depmaker: Adding an option to support text files.

Modified Paths:
--------------
    csw/mgar/gar/v2/bin/depmaker

Modified: csw/mgar/gar/v2/bin/depmaker
===================================================================
--- csw/mgar/gar/v2/bin/depmaker	2009-08-26 20:19:05 UTC (rev 6115)
+++ csw/mgar/gar/v2/bin/depmaker	2009-08-27 10:25:05 UTC (rev 6116)
@@ -27,12 +27,14 @@
 my $do_script = 1;
 my $be_quiet  = 0;
 my (@nodep, $rootdir);
+my $text_files = 0;
 GetOptions(
     'script!'   => \$do_script,
     'quiet|q'   => \$be_quiet,
     'root=s'    => \$rootdir,
     'nodep=s'   => \@nodep,
     'help|h'    => \&usage,
+    'text|t'    => \$text_files,
     'version|V' => sub {
         print STDERR "$self v$VERSION\n";
         exit 2;
@@ -43,7 +45,7 @@
 my $nodep = join "|", @nodep;
 
 sub usage {
-    print STDERR "Usage: $self [--no/script] [--nodep <pkg>] [--root <path>] < path_list > depend\n";
+    print STDERR "Usage: $self [--text] [--no/script] [--nodep <pkg>] [--root <path>] < path_list > depend\n";
     exit 1;
 }
 
@@ -111,6 +113,9 @@
             $depfiles{$lib}++ if $lib;
         }
     }
+    elsif ($text_files and $ftype =~ /text/) {
+        $depfiles{$filesrc}++;
+    }
 }
 exit 0 unless scalar keys %depfiles;
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list