2 ############################################################
4 # author: devenkong(18151155@qq.com)
6 ############################################################
8 # src-pkg compile utility. it orgnize compile file list
9 # and paramters like Makefile, but it is implemented by shell
11 ############################################################
29 ##############################
30 # section: public comment info
31 ##############################
35 ##############################
36 # section: variable define
37 ##############################
42 |prog $0 'project build util-program.'
43 |blank '[compile operation]'
46 |param |- |-- |---help |= |%<help> |&<on_help> |'this helper text doc.'
48 |blank '[information query]'
49 |param |- |-- |---list |=<content> |%<list> |&<on_list> |'<null>/target/pkg/instpkg/dest/dep.'
50 |param |- |-- |---get |=<pkgname> |%<get> |&<on_get> |'download the pkg.'
52 |param |- |-- |---init |= |%<init> |&<on_init> |'unpack archive src code pkg from backup dir to current dir.'
53 |param |- |-- |---srcbak |= |%<srcbak> |&<on_srcbak> |'backup src to default src bak dir, which is configured in build paramter files.'
54 |param |- |-- |---clean |= |%<clean> |&<on_clean> |'clean files in compile procedure.'
55 |param |- |-- |---distclean |= |%<distclean> |&<on_distclean> |'clean src pkg .'
57 |blank '[src-pkg setting]'
58 |param |- |-- |---setting |= |%<setting> |&<on_setting> |'set src pkg build paramters.'
59 |param |- |-- |---arch |=<arch> |%<arch> |&<on_arch> |'target cpu architechture.'
60 |param |- |-- |---release |= |%<release> |&<on_release> |'build release version.'
61 |param |- |-- |---debug |= |%<debug> |&<on_debug> |'build debug version.'
64 |param |- |-- |---config |= |%<config> |&<on_config> |'config src pkg.'
65 |param |- |-- |---test |= |%<test> |&<on_test> |'run test script for current src pkg.'
66 |param |- |-- |---doc |= |%<doc> |&<on_doc> |'build man and info helper doc.'
67 |param |- |-- |---umdoc |= |%<umdoc> |&<on_umdoc> |'build user manual doc in various kinds of doc type.'
68 |param |- |-- |---pkgs |= |%<pkgs> |&<on_pkgs> |'build compiled binary executables to an installable pkg.'
69 |param |- |-- |---install |= |%<install> |&<on_install> |'install compiled install pkg.'
72 |param |- |-- |---default |= |%<default> |&<on_default> |'compile all dest in a src pkg.'
73 |param |- |-- |---all |= |%<all> |&<on_all> |'buildinclude step of default, test, doc, umdoc, pkgs.'
74 |param |- |-- |---full |= |%<full> |&<on_full> |'compile all platform setted cpu platform in compiler toolchain.'
75 |param |- |-- |---cross |= |%<cross> |&<on_cross> |'build default cross platform setted in src-pkg. it is setted by arch subcmd.'
76 |param |- |-- |---target |=<arch> |%<target> |&<on_target> |'build specified cross platform.'
77 |param |- |-- |---srcpkg |=<pkgname> |%<srcpkg> |&<on_srcpkg> |'build specified sub src pkg.'
78 |param |- |-- |---instpkg |=<instpkg> |%<instpkg> |&<on_instpkg> |'build relative executables in a specified install pkg.'
79 |param |- |-- |---dest |=<destname> |%<dest> |&<on_dest> |'build specified executables in a src pkg.'
82 |param |- |-- |---example |= |%<example> |&<on_example> |'build example code if it exist.'
83 |param |- |-- |---webpages |= |%<webpages> |&<on_webpages> |'build webpages translate various doc file .'
86 |param |- |-- |---mandoc |= |%<mandoc> |&<on_mandoc> |'build man doc.'
87 |param |- |-- |---infodoc |= |%<infodoc> |&<on_infodoc> |'build info doc.'
88 |param |- |-- |---tutorial |= |%<tutorial> |&<on_tutorial> |'build tutorial doc. it is an example guide doc.'
89 |param |- |-- |---pdfdoc |= |%<pdfdoc> |&<on_pdfdoc> |'build pdf user manual doc.'
90 |param |- |-- |---htmldoc |= |%<htmldoc> |&<on_htmldoc> |'build html user manual doc.'
101 clean - clean all the project under this workspace.
102 all - default. use native compiler to compile program.
103 cross - use CROSS_COMPILE to compile a cross program.
106 pkg - copy headers libs and programs into pkg dir.
107 devinstall - install pkg to system.
108 install - install executables to system.
109 crosspkg - copy headers libs and programs into pkg dir.
110 crossdevinstall - install pkg to cross-compiler.
111 crossinstall - install executables to system.
113 # [project operation]
114 addtestprj - create test project as a templete, exe & lib.
115 addtestprj - create test project as a templete, exe & lib.
116 list - list project in this workspace
117 addexe PRJ=<name> - add a new executable project from templete.
118 addlib PRJ=<name> - add a new library project from templete.
120 listclear - clear all sub project in ws compile list.
121 rename OPRJ=<pld-name> PRJ=<new-name>
125 version - get workspace version as A.B.C format.
126 verinc1 - increase first version number A.
127 verinc2 - increase second version number B.
128 verinc3 - increase third version number C.
131 check-env - check running enviroument, check make, gcc, inc
132 path, lib path, and so on. espesially usefull under
133 CROSS_COMPILE, it can automatically check lib path.
134 # distclean - make src-tarball all project in workspace to
135 - source dir, clean project dirs, move other
137 backup - distclean, and src-tarball the workspace.
138 init - init project code in source dir, add them to workspace.
139 src-tarball - make a src tarball for this workspace.
193 ##############################
194 # section: private function
195 ##############################
198 # fsyntax: on_subcmd_proc <param_name> <param_value>
199 # fdesc: on all sub-cmd response. it invoke paramter proc function
200 # defined in src pkg.
204 # TBD: invoke sub-cmd proc function defined in src pkg.
210 # fdesc: on help sub-cmd.
220 # fdesc: on help sub-cmd.
231 # fdesc: on help sub-cmd.
241 # fdesc: on help sub-cmd.
251 # fdesc: on help sub-cmd.
261 # fdesc: on help sub-cmd.
271 # fdesc: on help sub-cmd.
281 # fdesc: on help sub-cmd.
292 # fdesc: on help sub-cmd.
302 # fdesc: on help sub-cmd.
312 # fdesc: on help sub-cmd.
322 # fdesc: on help sub-cmd.
333 # fdesc: on help sub-cmd.
343 # fdesc: on help sub-cmd.
353 # fdesc: on help sub-cmd.
363 # fdesc: on help sub-cmd.
373 # fdesc: on help sub-cmd.
383 # fdesc: on help sub-cmd.
394 # fdesc: on help sub-cmd.
404 # fdesc: on help sub-cmd.
414 # fdesc: on help sub-cmd.
424 # fdesc: on help sub-cmd.
434 # fdesc: on help sub-cmd.
444 # fdesc: on help sub-cmd.
454 # fdesc: on help sub-cmd.
465 # fdesc: on help sub-cmd.
475 # fdesc: on help sub-cmd.
486 # fdesc: on help sub-cmd.
496 # fdesc: on help sub-cmd.
506 # fdesc: on help sub-cmd.
516 # fdesc: on help sub-cmd.
526 # fdesc: on help sub-cmd.
536 ##############################
537 # section: public function
538 ##############################
555 ##############################
557 ##############################