changeset 615:0717d50838b2

remove auto_generate_context.pl
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Mon, 18 May 2020 16:52:24 +0900
parents 06f18cf2cd5e
children 206371e00c7d
files src/parallel_execution/auto_generate_context.pl
diffstat 1 files changed, 0 insertions(+), 87 deletions(-) [+]
line wrap: on
line diff
--- a/src/parallel_execution/auto_generate_context.pl	Mon May 18 16:43:52 2020 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-#!/usr/bin/env perl
-use strict;
-use warnings;
-use FindBin;
-use lib "$FindBin::Bin/lib";
-
-use Gears::Context;
-use Getopt::Std;
-my %opt;
-getopts("w" => \%opt);
-
-my $h = find_target_from_camke_list();
-
-my $target = shift;
-unless (exists $h->{$target}) {
-  map { print "$_\n" }  keys %$h;
-  print "invalid target name\n";
-  exit 0;
-}
-
-my @cbc_files;
-
-for my $file_name (split / /, $h->{$target}) {
-  if ($file_name =~ /^\s*$/) {
-    next;
-  }
-  chomp $file_name;
-  push(@cbc_files,$file_name);
-}
-
-my $output     = $opt{w} ? "$FindBin::Bin/context.h" : "stdout";
-my $gears      = Gears::Context->new(compile_sources => \@cbc_files, find_root => $FindBin::Bin, output => $output);
-my $data_gears = $gears->extraction_dg_compile_sources();
-my $g          = $gears->set_data_gear_header_path();
-
-my $dg2path    = $gears->update_dg_each_header_path($data_gears,$g);
-
-my $tree = $gears->createImplTree_from_header($dg2path);
-$gears->tree2create_context_h($tree);
-
-
-sub find_target_from_camke_list {
-  open my $fh, '<', "CMakeLists.txt";
-  my $in_gears = 0;
-  my $target;
-  my %res;
-
-  while (my $line = <$fh>) {
-    if ($in_gears == 1) {
-      $in_gears++;
-      next;
-    }
-
-    if ($in_gears == 2) {
-       $line =~ s/\s*(\w+)\s*/$1/g;
-       $target = $line;
-       chomp $target;
-       $in_gears++;
-       next;
-    }
-
-    if ($in_gears == 3) {
-      $in_gears++;
-      next;
-    }
-
-    if ($in_gears == 4) {
-      $res{$target} = $line;
-      chomp $res{$target};
-      $in_gears = 0;
-      next;
-    }
-
-    if ($line =~ /^GearsCommand\(/) {
-        $in_gears++;
-    }
-
-  }
-  return \%res;
-}
-
-#GearsCommand(
-#  TARGET
-#      rbtree
-#  SOURCES
-#      SingleLinkedQueue.cbc test/rbTree_test.cbc RedBlackTree.cbc SingleLinkedStack.cbc compare.c
-#)