diff options
author | 2016-01-04 12:34:29 -0800 | |
---|---|---|
committer | 2016-01-04 12:34:29 -0800 | |
commit | ea21ca234c01be8fc95c1fed0a2ea264773208db (patch) | |
tree | 67aa86b353c57289bbab152789ebb201b241e927 | |
parent | 47c50cc4d312907ca0012f74d3fcf2c89975baf4 (diff) |
Fix makefile, codegen bugs
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | templates/Makefile.template | 5 | ||||
-rw-r--r-- | templates/test/core/surface/public_headers_must_be_c89.c.template | 3 | ||||
-rw-r--r-- | test/core/surface/public_headers_must_be_c89.c | 2 |
4 files changed, 10 insertions, 5 deletions
@@ -11459,7 +11459,10 @@ $(BINDIR)/$(CONFIG)/public_headers_must_be_c89: $(PUBLIC_HEADERS_MUST_BE_C89_OBJ endif $(OBJDIR)/$(CONFIG)/test/core/surface/public_headers_must_be_c89.o: $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a -$(OBJDIR)/$(CONFIG)/test/core/surface/public_headers_must_be_c89.o: CFLAGS := $(CFLAGS) -std=c89 +$(OBJDIR)/$(CONFIG)/test/core/surface/public_headers_must_be_c89.o : test/core/surface/public_headers_must_be_c89.c + $(E) "[C] Compiling $<" + $(Q) mkdir -p `dirname $@` + $(Q) $(CC) $(CFLAGS) $(CPPFLAGS) -std=c89 -pedantic -MMD -MF $(addsuffix .dep, $(basename $@)) -c -o $@ $< deps_public_headers_must_be_c89: $(PUBLIC_HEADERS_MUST_BE_C89_OBJS:.o=.dep) diff --git a/templates/Makefile.template b/templates/Makefile.template index 435b4079cb..07dec93f38 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -1860,7 +1860,10 @@ % if tgt.language == 'c89': % for src in tgt.src: - $(OBJDIR)/$(CONFIG)/${os.path.splitext(src)[0]}.o: CFLAGS := <%text>$(CFLAGS)</%text> -std=c89 + $(OBJDIR)/$(CONFIG)/${os.path.splitext(src)[0]}.o : ${src} + $(E) "[C] Compiling $<" + $(Q) mkdir -p `dirname $@` + $(Q) $(CC) $(CFLAGS) $(CPPFLAGS) -std=c89 -pedantic -MMD -MF $(addsuffix .dep, $(basename $@)) -c -o $@ $< % endfor % endif diff --git a/templates/test/core/surface/public_headers_must_be_c89.c.template b/templates/test/core/surface/public_headers_must_be_c89.c.template index 942e355313..aff4ac5bcc 100644 --- a/templates/test/core/surface/public_headers_must_be_c89.c.template +++ b/templates/test/core/surface/public_headers_must_be_c89.c.template @@ -35,7 +35,8 @@ <% def is_platform_header(hdr): - for platform_identifier in ['_gcc', '_win32', '_pthread', '_zookeeper']: + for platform_identifier in ['_gcc', '_win32', '_pthread', + '_zookeeper', '_msvc', '_posix']: if platform_identifier in hdr: return True return False diff --git a/test/core/surface/public_headers_must_be_c89.c b/test/core/surface/public_headers_must_be_c89.c index 7b7b68fb86..4a3ffbd09e 100644 --- a/test/core/surface/public_headers_must_be_c89.c +++ b/test/core/surface/public_headers_must_be_c89.c @@ -53,11 +53,9 @@ #include <grpc/support/subprocess.h> #include <grpc/support/sync.h> #include <grpc/support/sync_generic.h> -#include <grpc/support/sync_posix.h> #include <grpc/support/thd.h> #include <grpc/support/time.h> #include <grpc/support/tls.h> -#include <grpc/support/tls_msvc.h> #include <grpc/support/useful.h> int main(int argc, char **argv) { |