changeset 377:19d966c1d2c6

out to each directory with static_gen_header.pl
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Mon, 13 Jul 2020 15:57:24 +0900
parents 718e7398b2c3
children 297515214d9b
files src/gearsTools/static_gen_header.pl src/gearsTools/trans_impl.pl
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/gearsTools/static_gen_header.pl	Tue Jul 07 16:41:31 2020 +0900
+++ b/src/gearsTools/static_gen_header.pl	Mon Jul 13 15:57:24 2020 +0900
@@ -53,7 +53,11 @@
 if ($opt{o}) {
     $emit_file = $opt{o};
 } else {
-    $emit_file = "$type.h"
+    if ($opt{impl}) {
+      $emit_file = "impl/$type.h"
+    } else {
+      $emit_file = "interface/$type.h"
+    }
 }
 
 
--- a/src/gearsTools/trans_impl.pl	Tue Jul 07 16:41:31 2020 +0900
+++ b/src/gearsTools/trans_impl.pl	Mon Jul 13 15:57:24 2020 +0900
@@ -191,9 +191,11 @@
 sub _emit_cg {
   my ($out, $data_gears) = @_;
   my @cg = ();
+
   while ($data_gears =~ /__code ([\w(\.)\*\s,]+?\)),?/g) {
     push(@cg, $1);
   }
+
   if (@cg) {
     if (@cg == 2) {
       print $out "    if (:TODO:) {\n";