7575# a config-specifc generated header
7676rule %r{#{ CPP_HART_GEN_DST } /.*/include/udb/cfgs/[^/]+/[^/]+\. hxx\. unformatted} => proc { |tname |
7777 parts = tname . split ( "/" )
78- filename = parts [ -1 ]
78+ filename = parts [ -1 ] . sub ( / \. unformatted$/ , "" )
7979 [
8080 "#{ CPP_HART_GEN_SRC } /templates/#{ filename } .erb" ,
8181 "#{ CPP_HART_GEN_SRC } /lib/gen_cpp.rb" ,
@@ -85,7 +85,7 @@ rule %r{#{CPP_HART_GEN_DST}/.*/include/udb/cfgs/[^/]+/[^/]+\.hxx\.unformatted} =
8585 ]
8686} do |t |
8787 parts = t . name . split ( "/" )
88- filename = parts [ -1 ]
88+ filename = parts [ -1 ] . sub ( / \. unformatted$/ , "" )
8989 config_name = parts [ -2 ]
9090
9191 cfg_arch = cfg_arch_for ( config_name )
@@ -99,9 +99,9 @@ rule %r{#{CPP_HART_GEN_DST}/.*/include/udb/cfgs/[^/]+/[^/]+\.hxx\.unformatted} =
9999end
100100
101101rule %r{#{ CPP_HART_GEN_DST } /.*/include/udb/cfgs/[^/]+/[^/]+\. hxx} => proc { |tname |
102- [ tname . rsub ( ". unformatted", "" ) ]
102+ [ " #{ tname } . unformatted"]
103103} do |t |
104- sh "clang-format #{ t . name . rsub ( '. unformatted' , '' ) } > #{ t . name } "
104+ sh "clang-format #{ t . name } . unformatted > #{ t . name } "
105105end
106106
107107rule %r{#{ CPP_HART_GEN_DST } /.*/src/cfgs/[^/]+/[^/]+\. cxx} => proc { |tname |
@@ -226,6 +226,7 @@ namespace :gen do
226226 end
227227
228228 Rake ::Task [ "#{ CPP_HART_GEN_DST } /#{ build_name } /CMakeLists.txt" ] . invoke
229+
229230 Rake ::Task [ "#{ CPP_HART_GEN_DST } /#{ build_name } /include/udb/hart_factory.hxx" ] . invoke
230231 Rake ::Task [ "#{ CPP_HART_GEN_DST } /#{ build_name } /include/udb/db_data.hxx" ] . invoke
231232 Rake ::Task [ "#{ CPP_HART_GEN_DST } /#{ build_name } /src/db_data.cxx" ] . invoke
@@ -250,7 +251,6 @@ namespace :gen do
250251 Rake ::Task [ "#{ CPP_HART_GEN_DST } /#{ build_name } /include/udb/#{ File . basename ( f ) } " ] . invoke
251252 end
252253
253- #Rake::Task["#{CPP_HART_GEN_DST}/#{build_name}/build/Makefile"].invoke
254254 end
255255 end
256256end
0 commit comments