1%YAML 1.2 2--- | 3 <%! 4 # TODO (mxyan): Make this list from build.yaml 5 textual_headers = ["include/grpc/support/atm_gcc_atomic.h", 6 "include/grpc/support/atm_gcc_sync.h", 7 "include/grpc/support/atm_windows.h", 8 "include/grpc/support/sync_custom.h", 9 "include/grpc/support/sync_posix.h", 10 "include/grpc/support/sync_windows.h", 11 "include/grpc/support/tls_gcc.h", 12 "include/grpc/support/tls_msvc.h", 13 "include/grpc/support/tls_pthread.h", 14 "include/grpc/impl/codegen/atm_gcc_atomic.h", 15 "include/grpc/impl/codegen/atm_gcc_sync.h", 16 "include/grpc/impl/codegen/atm_windows.h", 17 "include/grpc/impl/codegen/sync_custom.h", 18 "include/grpc/impl/codegen/sync_posix.h", 19 "include/grpc/impl/codegen/sync_windows.h"] 20 21 def grpc_public_headers_no_dir(libs): 22 out = [] 23 for lib in libs: 24 if lib.name in ("grpc", "gpr"): 25 out += lib.get('public_headers', []) 26 out = [f for f in out if f not in textual_headers] 27 out = [hdr.split('/', 2)[2] for hdr in out] 28 return out 29 30 # Generate the list of platform-specific headers as textual headers so that 31 # they are not built when the module is built but only when they are named by 32 # an #include directive. 33 def grpc_public_textual_headers_no_dir(libs): 34 out = [] 35 for lib in libs: 36 if lib.name in ("grpc", "gpr"): 37 out += lib.get('public_headers', []) 38 out = [f for f in out if f in textual_headers] 39 out = [hdr.split('/', 2)[2] for hdr in out] 40 return out 41 42 def header_lines(files): 43 return ('\n ').join('header "%s"' % f for f in files) 44 45 def textual_header_lines(files): 46 return ('\n ').join('textual header "%s"' % f for f in files) 47 %> 48 framework module grpc { 49 umbrella header "grpc.h" 50 51 ${header_lines(grpc_public_headers_no_dir(libs))} 52 53 ${textual_header_lines(grpc_public_textual_headers_no_dir(libs))} 54 55 export * 56 module * { export * } 57 } 58 59