2 ############################################################
3 # source: cppprog-srcpkg.shlib
4 # author: devenkong(18151155@qq.com)
6 ############################################################
7 # Copyright (C) 2022- Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software
9 # Foundation gives unlimited permission to copy, distribute
11 ############################################################
13 # paramters about cpp programs src-pkg for strnode.shlib.
15 ############################################################
27 ##############################
28 # section: public comment info
29 ##############################
33 ##############################
34 # section: variable define
35 ##############################
39 # designdir:desc/md/catalog/imi/uml;
40 # unittestdir:cppunit/shunit/stdout/timecost;
42 # [shbuiltin] libdir:def/h; shlibdir:shlib;
44 # [cpplibmodule] libdir:desc/cpp/h/cppunit/vala/mdl;
45 # [cpplibmdlitem] libdir:cpp/h/cppunit/vala/mdl;
46 # [cpplibunit] libdir:desc/cpp/h/cppunit;
47 # [cpplibunititem] libdir:cpp/h/cppunit;
49 # [cppmodule] srcdir:desc/cpp/h/cppunit/vala/mdl;
50 # [cppmdlitem] srcdir:cpp/h/cppunit/vala/mdl;
51 # [cppunit] srcdir:desc/cpp/h/cppunit;
52 # [cppunititem] srcdir:cpp/h/cppunit;
55 ################################################################################################
56 # @ node defination for catalog.
57 # in this section, it defines catanode, dirnode, itemnode, contnode, and the corresponding dirnode
58 # and itemnode in different OUTPUT_DIR.
59 ################################################################################################
61 # catanode for catalog
63 #########################
64 attr_create catalog
::catanode
::STR_FMT
='<@{NCATAID}>@{ALIAN}[@{NTYPE}]@{ALIAN}@{NNAME}@{ALIAN}[@{NDESC}]'
65 #attr_create catalog::catanode::regex='<([a-zA-Z0-9_ ]*)> [([a-zA-Z0-9_ ]*)] ([a-zA-Z0-9_ ]*) "([a-zA-Z0-9_ ]*)"'
66 # it's used for multi-blank seperator recognizing between data columns.
67 attr_create catalog
::catanode
::ALIAN_REGEX
='${ALIAN_REGEX}'
68 # when generating catalog, set ' ' as the seperator char.
69 attr_create catalog
::catanode
::ALIAN
=' '
70 attr_create catalog
::catanode
::PAIRCHARS
='<>[]""{}'
73 #########################
74 attr_create catalog
::dirnode
::NFTYPE
='srcdir/testdir/designdir:descfile'
77 #########################
78 # it's the node under current dir. and NODEDIR=''.
79 # it's used for code under a dirnode directly.
80 attr_create catalog
::itemnode
::NODEDIR
=''
81 attr_create catalog
::itemnode
::NFTYPE
='
83 testdir:shtest/stdout/timecost;
87 #########################
88 # it's the node under current dir. and NODEDIR='@{node}'.
89 # '@{node}' is under dirnode, and all code under the dir of '@{node}'.
90 attr_create catalog
::itemshlibnode
::NODEDIR
='@{node}'
91 attr_create catalog
::itemshlibnode
::NFTYPE
='
93 testdir:shtest/stdout/timecost;
97 #########################
98 # it's the node under current dir. and NODEDIR='@{node}'.
99 # '@{node}' is under dirnode, and all code under the dir of '@{node}'.
100 attr_create catalog
::itemshlibnode
::NODEDIR
='@{node}'
101 attr_create catalog
::itemshlibnode
::NFTYPE
='
103 testdir:shtest/stdout/timecost;
107 #########################
108 # it's the node under current dir. and NODEDIR='@{node}'.
109 # '@{node}' is under dirnode, and all code under the dir of '@{node}'.
110 attr_create catalog
::itemcnode
::NODEDIR
='@{node}'
111 attr_create catalog
::itemcnode
::NFTYPE
='
112 srcdir:c/h/cunittest/mdl;
113 testdir:shtest/stdout/timecost;
117 #########################
118 # it's the node under current dir. and NODEDIR='@{node}'.
119 # '@{node}' is under dirnode, and all code under the dir of '@{node}'.
120 attr_create catalog
::itemcppnode
::NODEDIR
='@{node}'
121 attr_create catalog
::itemcppnode
::NFTYPE
='
122 srcdir:cpp/h/cppunittest;
123 testdir:shtest/stdout/timecost;
127 #########################
128 # it's the node under current dir. and NODEDIR='@{node}'.
129 # '@{node}' is under dirnode, and all code under the dir of '@{node}'.
130 attr_create catalog
::itemmdlnode
::NODEDIR
='@{node}'
131 attr_create catalog
::itemmdlnode
::NFTYPE
='
132 srcdir:c/h/cunittest/mdl;
133 testdir:shtest/stdout/timecost;
137 #########################
138 # it's the node under current dir. and NODEDIR='@{node}'.
139 # '@{node}' is under dirnode, and all code under the dir of '@{node}'.
140 attr_create catalog
::itemvalanode
::NODEDIR
='@{node}'
141 attr_create catalog
::itemvalanode
::NFTYPE
='
142 srcdir:c/h/cunittest/vala;
143 testdir:shtest/stdout/timecost;
146 # content node string
147 # the output of content string is generated by STR_FMT, but the reverse procedure is produced
150 #########################
151 #attr_create catalog::contnode::STR_FMT='@{NDESC}'
152 #attr_create catalog::contnode::regex='<([a-zA-Z0-9_ ]*)> [([a-zA-Z0-9_ ]*)] ([a-zA-Z0-9_ ]*) "([a-zA-Z0-9_ ]*)"'
153 #attr_create catalog::contnode::sepchar='.'
154 #attr_create catalog::contnode::attr_wrap=( "none" "wrap1" "wrap2" "wrap3" "<" "<<" "<<<" "[" "\"" "[" )
155 #attr_create catalog::contnode::attr_idx=\( NDESC \)
156 #attr_create catalog::contnode::nid_idx= 0
159 #############################################################
161 #############################################################
164 #########################
165 # main file for itemnode.
166 attr_create catalog
::testdir
::SUBDIR
='testing'
167 attr_create catalog
::testdir
::OUTPUT_DIR_FMT
='@{SRCPKG_DIR}/@{SUBDIR}/@{LAYEDDIR}/@(NODEDIR)'
168 attr_create catalog
::testdir
::STR_FMT
='@{NCATAID}.@{NNAME}.@{NTYPE}'
169 attr_create catalog
::testdir
::SEPCHAR
='.'
170 attr_create catalog
::testdir
::sfx
='.@{NTYPE}'
173 # it's used for node listing, under a dir.
175 #########################
177 attr_create catalog
::testdir
::dirnode
::STR_FMT
='@{NCATAID}.@{NNAME}.@{NTYPE}'
178 attr_create catalog
::testdir
::dirnode
::SEPCHAR
='.'
179 # list files under a dir. get the main node info, and use it to get item info.
180 # -1, list one file per line.
181 # -d, list dir without its content.
182 # -X, list dir first, then files. it's the default opt.
183 # -U, do not sort. all those sorting opt are actived in cmdline opt sequence.
184 # -f, do not sort. enable -aU, disable -ls --color.
185 # -v, natual sort. by number. if @{NCATAID} specified in generating, file/dir with name
186 # of id, which can be used for sorting, and filter other un-matched file. put this opt
187 # at the last position.
188 # -S, sort by size, largest first.
189 # -t, sort by modify time.
190 # -c, sort by create time.
191 # --sort=time, sort by access time. valid arguments are none, time, size, extension, version.
192 # @{NFEXT_LIST}, main/major ext-name, the first file ext-name defined in NFTYPE. or ext-name list.
193 # or use specified ext-name directly.
195 # -r, reverse order while sorting.
196 attr_create catalog
::testdir
::dirnode
::ls_opt_fmt
='-f -1 -d -v @{NFEXT_LIST} @{NTYPE_LIST} | grep -v "@{NFEXT_DISABLE_LIST}"'
197 #attr_create catalog::testdir::dirnode::NFEXT_DISABLE_LIST='_test\.sh'
198 # it should be defined in global info.
199 attr_create catalog
::testdir
::dirnode
::NFEXT_LIST
='*.sh'
200 # it should be defined in global info.
201 attr_create catalog
::testdir
::dirnode
::NTYPE_LIST
='*.item *.dir *.module *.unit'
205 #########################
206 # used for dir creating, all sub-files put in it. if not defined, it do not use dir creating step.
207 #attr_create catalog::dirnode::STR_FMT='@{NNAME}.desc.@{NFEXT}'
208 # it's used for itemnode files listing.
209 # or use @{get_ext_opt_list} to run script func.
210 attr_create catalog
::testdir
::itemnode
::ls_opt_fmt
='-f -1 -d -v @{NFEXT_LIST} | grep -e "@{NFEXT_DISABLE_LIST}"'
211 attr_create catalog
::testdir
::itemnode
::NFEXT_DISABLE_LIST
='_test\.sh'
212 # this paramter is generated when catalog::itemXXXnode analyzing. the file ext-name list is generated by
213 # catalog::<file-type>::sfx, and <file-type> is defined in catalog::itemXXXnode::NFTYPE.
214 attr_create catalog
::testdir
::itemnode
::NFEXT_LIST
='*_test.sh *.stdout *.timecost *.desc'
215 attr_create catalog
::testdir
::itemnode
::SEPCHAR
='.'
218 #############################################################
220 #############################################################
223 #########################
224 # main file for itemnode.
225 attr_create catalog
::srcdir
::SUBDIR
='src'
226 attr_create catalog
::srcdir
::OUTPUT_DIR_FMT
='@{SRCPKG_DIR}/@{SUBDIR}/@{LAYEDDIR}/@(NODEDIR)'
227 attr_create catalog
::srcdir
::STR_FMT
='@{NCATAID}.@{NNAME}.@{NTYPE}'
228 attr_create catalog
::srcdir
::SEPCHAR
='.'
229 attr_create catalog
::srcdir
::sfx
='.@{NTYPE}'
232 # it's used for node listing, under a dir.
234 #########################
235 attr_create catalog
::srcdir
::dirnode
::STR_FMT
='@{NCATAID}.@{NNAME}.@{NTYPE}'
236 attr_create catalog
::srcdir
::dirnode
::SEPCHAR
='.'
237 attr_create catalog
::srcdir
::dirnode
::ls_opt_fmt
='-f -1 -d -v @{NFEXT_LIST} @{NTYPE_LIST} | grep -v "@{NFEXT_DISABLE_LIST}"'
238 attr_create catalog
::srcdir
::dirnode
::NFEXT_DISABLE_LIST
='_test\.sh'
239 attr_create catalog
::srcdir
::dirnode
::NFEXT_LIST
='*.sh'
240 attr_create catalog
::srcdir
::dirnode
::NTYPE_LIST
='*.item *.dir *.module *.unit'
244 #########################
245 #attr_create catalog::dirnode::STR_FMT='@{NNAME}.desc.@{NFEXT}'
246 attr_create catalog
::srcdir
::itemnode
::ls_opt_fmt
='-f -1 -d -v @{NFEXT_LIST} | grep -e "@{NFEXT_DISABLE_LIST}"'
247 attr_create catalog
::srcdir
::itemnode
::NFEXT_DISABLE_LIST
='_test\.c'
248 attr_create catalog
::srcdir
::itemnode
::NFEXT_LIST
='*.c *.h *_test.c'
249 attr_create catalog
::srcdir
::itemnode
::SEPCHAR
='.'
252 #############################################################
254 #############################################################
257 #########################
258 # main file for itemnode.
259 attr_create catalog
::designdir
::SUBDIR
='doc/design-doc'
260 attr_create catalog
::designdir
::OUTPUT_DIR_FMT
='@{SRCPKG_DIR}/@{SUBDIR}/@{LAYEDDIR}/@(NODEDIR)'
261 attr_create catalog
::designdir
::STR_FMT
='@{NCATAID}.@{NNAME}'
262 attr_create catalog
::designdir
::SEPCHAR
='.'
265 # it's used for node listing, under a dir.
267 #########################
268 attr_create catalog
::designdir
::dirnode
::STR_FMT
='@{NCATAID}.@{NNAME}.@{NTYPE}'
269 attr_create catalog
::designdir
::dirnode
::SEPCHAR
='.'
270 attr_create catalog
::designdir
::dirnode
::ls_opt_fmt
='-f -1 -d -v @{NFEXT_LIST} @{NTYPE_LIST} | grep -v "@{NFEXT_DISABLE_LIST}"'
271 attr_create catalog
::designdir
::dirnode
::NFEXT_DISABLE_LIST
='_test\.sh'
272 attr_create catalog
::designdir
::dirnode
::NFEXT_LIST
='*.sh'
273 attr_create catalog
::designdir
::dirnode
::NTYPE_LIST
='*.item *.dir *.module *.unit'
277 #########################
278 #attr_create catalog::dirnode::STR_FMT='@{NNAME}.desc.@{NFEXT}'
279 attr_create catalog
::designdir
::itemnode
::ls_opt_fmt
='-f -1 -d -v @{NFEXT_LIST} | grep -e "@{NFEXT_DISABLE_LIST}"'
280 attr_create catalog
::designdir
::itemnode
::NFEXT_DISABLE_LIST
='_test\.sh'
281 attr_create catalog
::designdir
::itemnode
::NFEXT_LIST
='*.sh *.stdout *.timecost'
282 attr_create catalog
::designdir
::itemnode
::SEPCHAR
='.'
285 #############################################################
287 #############################################################
290 #########################
291 # main file for itemnode.
292 attr_create catalog
::docdir
::SUBDIR
='doc/manual'
293 attr_create catalog
::docdir
::STR_FMT
='@{NCATAID}.@{NNAME}'
294 attr_create catalog
::docdir
::SEPCHAR
='.'
297 # it's used for node listing, under a dir.
299 #########################
300 attr_create catalog
::docdir
::dirnode
::STR_FMT
='@{NCATAID}.@{NNAME}.@{NTYPE}'
301 attr_create catalog
::docdir
::dirnode
::SEPCHAR
='.'
302 attr_create catalog
::docdir
::dirnode
::ls_opt_fmt
='-f -1 -d -v @{NFEXT_LIST} @{NTYPE_LIST} | grep -v "@{NFEXT_DISABLE_LIST}"'
303 attr_create catalog
::docdir
::dirnode
::NFEXT_DISABLE_LIST
='_test\.sh'
304 attr_create catalog
::docdir
::dirnode
::NFEXT_LIST
='*.sh'
305 attr_create catalog
::docdir
::dirnode
::NTYPE_LIST
='*.item *.dir *.module *.unit'
309 #########################
310 #attr_create catalog::dirnode::STR_FMT='@{NNAME}.desc.@{NFEXT}'
311 attr_create catalog
::docdir
::itemnode
::ls_opt_fmt
='-f -1 -d -v @{NFEXT_LIST} | grep -e "@{NFEXT_DISABLE_LIST}"'
312 attr_create catalog
::docdir
::itemnode
::NFEXT_DISABLE_LIST
='_test\.sh'
313 attr_create catalog
::docdir
::itemnode
::NFEXT_LIST
='*.sh *.stdout *.timecost'
314 attr_create catalog
::docdir
::itemnode
::SEPCHAR
='.'
318 ##############################
320 ##############################