4 declare -g -A LANG_EXT_NAME
20 # build sub-cmd map to step.
33 STEP_SRC="STEP_BUILD_DEST"
47 ###########################################################
49 ##########################################################
62 # steps before dest-constructing.
63 STEP_TOOLCHAIN_CHK="toolchain_chk()"
64 STEP_DEV_ENV_CHK="dev_env_chk()"
65 STEP_DEP_LIB_CHK="dep_lib_chk()"
66 STEP_DEP_SYSHDR_CHK="dep_syshdr_chk()"
68 STEP_CONFIG_GEN="config_gen()"
69 STEP_VERSION_GEN="version_gen()"
72 ###########################################################
73 # main compile build step
74 ###########################################################
78 # @ append second parameter with item in first list.
82 STEP_ONE_DEST_INIT="step_one_dest_init()"
83 STEP_BUILD_ONE_DEST="step_build_one_dest()"
84 # STEP_CONSTRUCT_INIT="construct_init()"
88 STEP_PRI_PREV_CONSTRUCT
89 TASKLIST(DEST_LIST, STEP_BUILD_ONE_DEST)
90 STEP_PRI_POST_CONSTRUCT"
93 STEP_ONE_DEST_INIT(DEST_NAME)
94 STEP_PRI_PREV_DEST_BUILD
95 # STEP_DEST_CHK(DEST_NAME)
96 TASKLIST(LANG_LIST, STEP_LANG_SRC_TPCHK)
97 TASKLIST(LANG_LIST, STEP_LANG_CMPL)
98 STEP_LINK(OBJ_LIST, DEST_FILENAME)
99 # put this step into STEP_LINK
100 # STEP_PROGINFO(DEBUG)
101 STEP_PRI_POST_DEST_BUILD"
103 # TBD: append corresponding dest steps,
104 # some of them need STRIP in non DEBUG version.
108 # STEP_OBJLIST2SRCLIST=objlist2srclist
110 STEP_EXE_DEST="STEP_DEFAULT_DEST
112 STEP_DLL_DEST="STEP_DEFAULT_DEST
114 STEP_LIB_DEST="STEP_DEFAULT_DEST"
115 STEP_LIBDLL_DEST="STEP_DEFAULT_DEST"
116 STEP_DRV_DEST="STEP_DEFAULT_DEST
118 STEP_LA_DEST="STEP_DEFAULT_DEST"
119 STEP_LO_DEST="STEP_DEFAULT_DEST"
120 STEP_OBJ_DEST="STEP_DEFAULT_DEST"
123 STEP_ONE_DEST_INIT(DEST_NAME)
124 STEP_PRI_PREV_DEST_BUILD
125 # STEP_DEST_CHK(DEST_NAME)
126 TASKLIST(LANG_LIST, STEP_LANG_SRC_TPCHK)
127 TASKLIST(LANG_LIST, STEP_LANG_CMPL)
128 STEP_LINK(OBJ_LIST, DEST_FILENAME)
129 TASKLIST(LANG_LIST, STEP_LANG_SRC2UNITSRC)
130 TASKLIST(LANG_LIST, STEP_LANG_SRC_TPCHK)
131 TASKLIST(LANG_LIST, STEP_LANG_CMPL)
132 STEP_LINK(OBJ_LIST, DEST_FILENAME)
133 # TASKLIST(LANG_LIST, STEP_STRIP(DEBUG))
134 # put this step into STEP_LINK
135 # STEP_PROGINFO(DEBUG)
136 STEP_PRI_POST_DEST_BUILD"
140 TASKLIST(LANG_LIST, STEP_LANG_CMPL)"
143 STEP_ONE_DEST_INIT(DEST_NAME)
144 STEP_PRI_PREV_DEST_BUILD
145 # STEP_DEST_CHK(DEST_NAME)
146 TASKLIST(LANG_LIST, STEP_LANG_SRC_TPCHK)
147 TASKLIST(LANG_LIST, STEP_LANG_SRC2EXE)
148 # TASKLIST(LANG_LIST, STEP_STRIP(DEBUG))
149 # put this step into STEP_LINK
150 # STEP_PROGINFO(DEBUG)
151 STEP_PRI_POST_DEST_BUILD"
154 STEP_HEX_DEST="STEP_DEFAULT_DEST STEP_EXE2HEX"
155 STEP_BIN_DEST="STEP_DEFAULT_DEST STEP_EXE2BIN"
158 ###########################################################
160 ###########################################################
162 # TBD: have not been implemented.
164 TASKLIST(HELPER_DOC_LIST, STEP_DOC_BUILD)
165 TASKLIST(UMDOC_LIST, STEP_DOC_BUILD)
166 TASKLIST(WEBDOC_LIST, STEP_DOC_BUILD)"
169 ###########################################################
171 ###########################################################
173 TASKLIST="step_tasklist()"
174 STEP_STRIP="progstrip()"
175 STEP_PROGINFO="prog_sizeinfo()"
177 STEP_LANG_SRC_TPCHK="step_lang_src_tpchk()"
178 STEP_LANG_CMPL="step_one_lang_cmpl()"
180 STEP_LANG_SRC2EXE="step_lang_src2exe()"
181 STEP_LANG_SRC2UNITSRC="step_lang_src2unitsrc()"
184 ###############################################
189 # dest names are named as "exe/dll/lib/drv", it'scan
190 # the short name of output file, it doesn't means
191 # that it uses windows sytle name. if it use 'elf' for
192 # a executable file, it's not general in various env.
195 # C_SRC_LIST defined in .list file
196 STEP_C_LANG_CMPL="TASKLIST(C_SRC_CMPL_LIST, STEP_C_SRC_CMPL)"
204 # CXX_SRC_LIST defined in .list file
205 STEP_CXX_LANG_CMPL="TASKLIST(CXX_SRC_CMPL_LIST, STEP_CXX_SRC_CMPL)"
213 # CPP_SRC_LIST defined in .list file
214 STEP_CPP_LANG_CMPL="TASKLIST(CPP_SRC_CMPL_LIST, STEP_CPP_SRC_CMPL)"
222 # ASM_SRC_LIST defined in .list file
223 STEP_ASM_LANG_CMPL="TASKLIST(ASM_SRC_CMPL_LIST, STEP_ASM_SRC_CMPL)"
231 # SH_SRC_LIST defined in .list file
232 STEP_SH_LANG_CMPL="TASKLIST(SH_SRC_CMPL_LIST, STEP_SH_SRC_CMPL)"
240 ###############################################
244 # C_SRC_LIST defined in .list file
245 STEP_C_LANG_SRC2EXE="TASKLIST(C_SRC_CMPL_LIST, STEP_C_SRC2EXE)"
255 # CXX_SRC_LIST defined in .list file
256 STEP_CXX_LANG_SRC2EXE="TASKLIST(CXX_SRC_LIST, STEP_CXX_SRC2EXE)"
266 # CPP_SRC_LIST defined in .list file
267 STEP_CPP_LANG_SRC2EXE="TASKLIST(CPP_SRC_LIST, STEP_CPP_SRC2EXE)"
277 # ASM_SRC_LIST defined in .list file
278 STEP_ASM_LANG_SRC2EXE="TASKLIST(ASM_SRC_LIST, STEP_ASM_SRC2EXE)"
288 # SH_SRC_LIST defined in .list file
289 STEP_SH_LANG_SRC2EXE="TASKLIST(SH_SRC_LIST, STEP_SH_SRC2EXE)"
299 ###############################################
304 STEP_LINK="step_link()"
306 # build steps below is setted accroding DEST_TYPE in dest.imi
335 STEP_UNITLIBDLL_LINK="
381 ###############################################
383 # those proc functions are defined in <srcpkg>.shlib,
384 # it's a privaate function for a srcpkg.
387 # private steps in a dest-constructing.
388 STEP_PRI_PREV_CONSTRUCT="on_prev_construct()"
389 STEP_PRI_POST_CONSTRUCT="on_post_construct()"
390 STEP_PRI_PREV_DEST_BUILD="on_prev_dest_build()"
391 STEP_PRI_POST_DEST_BUILD="on_post_dest_build()"
392 STEP_PRI_PREV_CMPL="on_prev_cmpl()"
393 STEP_PRI_POST_CMPL="on_post_cmpl()"
394 STEP_PRI_PREV_LINK="on_prev_link()"
395 STEP_PRI_POST_LINK="on_post_link()"
396 STEP_PRI_PREV_INSTPKG_GEN="on_prev_instpkg_gen()"
397 STEP_PRI_POST_INSTPKG_GEN="on_post_instpkg_gen()"
398 STEP_PRI_PREV_ARCH_BUILD="on_prev_arch_build()"
399 STEP_PRI_POST_ARCH_BUILD="on_post_arch_build()"
402 #################################################################
407 "[STEP_TEX_2_MAN STEP_TEX_2_TXT STEP_TEX_2_PDF STEP_TEX_2_HTML STEP_MD_2_HTML STEP_HTML_2_CHM ]"
435 STEP_DOC_GEN="TASKLIST(GEN_DOC_TYPE_LIST, doc_gen())"
437 STEP_INFO_2_MAN="info_2_man()"
438 STEP_INFO_2_HTML="info_2_html()"
439 STEP_INFO_2_PDF="info_2_pdf()"
440 STEP_TEX_2_MAN="tex_2_man()"
441 STEP_TEX_2_INFO="tex_2_info()"
442 STEP_TEX_2_TXT="tex_2_txt()"
443 STEP_TEX_2_PDF="tex_2_pdf()"
444 STEP_TEX_2_HTML="tex_2_html()"
445 STEP_TEX_2_DVI="tex_2_dvi()"
446 STEP_TEX_2_DOCBOOK="tex_2_docbook()"
447 STEP_DOCBOOK_2_TXT="docbook_2_txt()"
448 STEP_DOCBOOK_2_PDF="docbook_2_pdf()"
449 STEP_DOCBOOK_2_HTML="docbook_2_html()"
450 STEP_DOCBOOK_2_DVI="docbook_2_dvi()"
452 STEP_MD_2_HTML="md2html()"
453 STEP_RST_2_HTML="rst2html()"
454 STEP_HTML_2_CHM="html2chm()"
457 STEP_APIDOC_GEN="apidocgen()"
458 STEP_GRAPHVIZE_GEN="graphvize()"
460 #################################################################
463 STEP_INTL_GEN="intl()"
488 ###############################################
490 # hdrtpchk() is included in tpchk().
491 # this step decrease files to be compiled.
492 # in compile step, it will run tpchk() and hdrtpchk()
496 # <LANG>_SRC_LIST defined in .list file
497 STEP_C_LANG_SRC_TPCHK="c_lang_src_tpchk()"
498 STEP_CXX_LANG_SRC_TPCHK="cxx_lang_src_tpchk()"
499 STEP_CPP_LANG_SRC_TPCHK="cpp_lang_src_tpchk()"
500 STEP_ASM_LANG_SRC_TPCHK="asm_lang_src_tpchk()"
501 STEP_SH_LANG_SRC_TPCHK="sh_lang_src_tpchk()"