From b8e9e9c8463118e0996a120489ae8d9a4bd42969 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sat, 30 Jan 2016 18:35:13 +0100 Subject: [PATCH] Fixing the Ruby build after all these merges. --- src/ruby/ext/grpc/extconf.rb | 3 +- src/ruby/ext/grpc/rb_grpc_imports.generated.c | 2 +- src/ruby/ext/grpc/rb_grpc_imports.generated.h | 42 +++++++++---------- .../grpc/rb_grpc_imports.generated.c.template | 2 +- .../grpc/rb_grpc_imports.generated.h.template | 4 +- 5 files changed, 26 insertions(+), 27 deletions(-) diff --git a/src/ruby/ext/grpc/extconf.rb b/src/ruby/ext/grpc/extconf.rb index 52c512e0150..84ee3f8364a 100644 --- a/src/ruby/ext/grpc/extconf.rb +++ b/src/ruby/ext/grpc/extconf.rb @@ -90,13 +90,12 @@ unless File.exist?(File.join(grpc_lib_dir, 'libgrpc.a')) ENV['BUILDDIR'] = output_dir puts 'Building internal gRPC into ' + grpc_lib_dir - system("make -j -C #{grpc_root} #{grpc_lib_dir}/libgpr.a #{grpc_lib_dir}/libgrpc.a CONFIG=#{grpc_config}") + system("make -j -C #{grpc_root} #{grpc_lib_dir}/libgrpc.a CONFIG=#{grpc_config}") exit 1 unless $? == 0 end $CFLAGS << ' -I' + File.join(grpc_root, 'include') $LDFLAGS << ' ' + File.join(grpc_lib_dir, 'libgrpc.a') -$LDFLAGS << ' ' + File.join(grpc_lib_dir, 'libgpr.a') if grpc_config == 'gcov' $CFLAGS << ' -O0 -fprofile-arcs -ftest-coverage' $LDFLAGS << ' -fprofile-arcs -ftest-coverage -rdynamic' diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c index fe04ee6a5dc..879154dbc3e 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c @@ -35,7 +35,7 @@ #ifdef GPR_WIN32 -#include "rb_grpc_imports.h" +#include "rb_grpc_imports.generated.h" census_initialize_type census_initialize_import; census_shutdown_type census_shutdown_import; diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index f7b851d398d..7714cd87f2e 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -40,27 +40,27 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include typedef int(*census_initialize_type)(int features); extern census_initialize_type census_initialize_import; diff --git a/templates/src/ruby/ext/grpc/rb_grpc_imports.generated.c.template b/templates/src/ruby/ext/grpc/rb_grpc_imports.generated.c.template index af2afe168a0..e09a58781da 100644 --- a/templates/src/ruby/ext/grpc/rb_grpc_imports.generated.c.template +++ b/templates/src/ruby/ext/grpc/rb_grpc_imports.generated.c.template @@ -37,7 +37,7 @@ #ifdef GPR_WIN32 - #include "rb_grpc_imports.h" + #include "rb_grpc_imports.generated.h" %for api in c_apis: ${api.name}_type ${api.name}_import; diff --git a/templates/src/ruby/ext/grpc/rb_grpc_imports.generated.h.template b/templates/src/ruby/ext/grpc/rb_grpc_imports.generated.h.template index 7873df583a5..9f17edeec01 100644 --- a/templates/src/ruby/ext/grpc/rb_grpc_imports.generated.h.template +++ b/templates/src/ruby/ext/grpc/rb_grpc_imports.generated.h.template @@ -32,7 +32,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ - + #ifndef GRPC_RB_GRPC_IMPORTS_H_ #define GRPC_RB_GRPC_IMPORTS_H_ @@ -43,7 +43,7 @@ #include %for header in sorted(set(api.header for api in c_apis)): - #include <${header}> + #include <${'/'.join(header.split('/')[1:])}> %endfor %for api in c_apis: