changeset 963:2e4c84f2683f

convert #interface into // include
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 18 Mar 2021 10:34:06 +0900
parents 359913ba0175
children c5c3e9f1533a
files src/parallel_execution/generate_context.pl src/parallel_execution/generate_stub.pl
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/parallel_execution/generate_context.pl	Wed Mar 17 20:00:15 2021 +0900
+++ b/src/parallel_execution/generate_context.pl	Thu Mar 18 10:34:06 2021 +0900
@@ -51,12 +51,13 @@
 
 my $ddir = "c";
 
-our($opt_o,$opt_d,$opt_h,$opt_w, $opt_project);
+our($opt_o,$opt_d,$opt_h,$opt_w, $opt_project,$opt_D);
 GetOptions(
     "o=s"       => \$opt_o,
     "d=s"       => \$opt_d,
     "h"         => \$opt_h,
     "w"         => \$opt_w,
+    "D"         => \$opt_D,
     "project=s" => \$opt_project,
 );
 
@@ -91,7 +92,7 @@
   $project  = $projects{$opt_project};
 }
 
-if (! -f "context.h") {
+if ($opt_D || ! -f "context.h") {
   generateContextHeader($opt_w, $opt_o, $project, @ARGV);
 }
 
--- a/src/parallel_execution/generate_stub.pl	Wed Mar 17 20:00:15 2021 +0900
+++ b/src/parallel_execution/generate_stub.pl	Thu Mar 18 10:34:06 2021 +0900
@@ -687,6 +687,7 @@
               debug_print("generateDataGear",__LINE__, $_) if $opt_debug;
                 my $interfaceHeader = $1;
                 # #interface not write
+                print $fd "// include \"$1\"\n";
                 next unless ($interfaceHeader =~ /context.h/);
             } elsif (/^#include "(.*).h"$/) {
               debug_print("generateDataGear",__LINE__, $_) if $opt_debug;