MCPcopy Create free account
hub / github.com/Tencent/phxsql / PrintComm

Function PrintComm

tools/create_makefile.py:83–101  ·  view source on GitHub ↗
(path, target_name, lib_name)

Source from the content-addressed store, hash-verified

81
82
83def PrintComm(path, target_name, lib_name):
84 inc_res=GetSourceTagFromDeps(path, lib_name, "INCS")
85 cppflags_res=GetSourceTagFromDeps(path, lib_name, "EXTRA_CPPFLAGS")
86 full_lib_path_res=GetSourceTagFromDeps(path, lib_name, "FULL_LIB_DEPS_PATH")
87
88 obj_name = "%s_%s" % (lib_name.upper(), "SRC")
89 inc_name = "%s_%s" % (lib_name.upper(), "INCS")
90 full_lib_path_name = "%s_%s" % (lib_name.upper(), "FULL_LIB_PATH")
91 extra_cpp_flag_name = "%s_%s" % (lib_name.upper(), "EXTRA_CPPFLAGS")
92
93 makefile.write("%s=$(%s)\n" % (obj_name, GetLableName(lib_name, "OBJ")))
94 makefile.write("%s=$(sort %s)\n" % (inc_name, ' '.join(inc_res)))
95 makefile.write("%s=$(sort %s)\n" % (full_lib_path_name, ' '.join(full_lib_path_res)))
96 makefile.write("%s=%s\n\n" % (extra_cpp_flag_name,' '.join(cppflags_res)))
97
98 makefile.write("CPPFLAGS+=$(patsubst %%,-I%%, $(%s))\n" % inc_name)
99 makefile.write("CPPFLAGS+=$(%s)\n\n" % extra_cpp_flag_name)
100
101 return (obj_name,inc_name, full_lib_path_name, extra_cpp_flag_name)
102
103def PrintReferenceDIR(target_name, direct_inc_name):
104 makefile.write("%s_dir:$(%s)\n" % (target_name, direct_inc_name))

Callers 2

PrintLibFunction · 0.85
PrintBinFunction · 0.85

Calls 3

GetSourceTagFromDepsFunction · 0.85
GetLableNameFunction · 0.85
joinMethod · 0.80

Tested by

no test coverage detected