Difference between revisions of "Build System Analysis:build.pl versus makefile"
JanIversen (talk | contribs) |
JanIversen (talk | contribs) |
||
Line 16: | Line 16: | ||
| build all projects from very beginning till current one | | build all projects from very beginning till current one | ||
| "make" builds all modules | | "make" builds all modules | ||
− | "make <module>" builds to and with <module> | + | "make <module>" builds to and with <module> (same as --from) |
|- | |- | ||
| --from | | --from | ||
| build all projects dependent from the specified (including it) till current one | | build all projects dependent from the specified (including it) till current one | ||
− | | | + | | "make <module>" builds to and with <module>. Remark the Makefile represent real dependencies. <module>/Makefile touches a file "solver/.../<module>.done" in every run and the central makefile have rules like "<module>.done : <module_depend>.done ...", this means that modules needed to be generated are called. |
|- | |- | ||
| --genPO | | --genPO | ||
Line 39: | Line 39: | ||
| "make clear" to clear all modules | | "make clear" to clear all modules | ||
"<module>/make clear" to clear a single module | "<module>/make clear" to clear a single module | ||
+ | "<module>/make clear --depend" to clear all depending modules | ||
|- | |- | ||
| --with_branches- | | --with_branches- | ||
Line 144: | Line 145: | ||
| --job=job_string | | --job=job_string | ||
| execute custom job in (each) module. job_string is a shell script/command to be executed instead of regular dmake jobs | | execute custom job in (each) module. job_string is a shell script/command to be executed instead of regular dmake jobs | ||
− | | | + | | "make --job=job_string" |
|- | |- | ||
| --pre_job=pre_job_string | | --pre_job=pre_job_string | ||
| execute preliminary job in (each) module. pre_job_string is a shell script/command to be executed before regular job in the module | | execute preliminary job in (each) module. pre_job_string is a shell script/command to be executed before regular job in the module | ||
− | | | + | | "make --pre_job=job_string" |
|- | |- | ||
| --post_job=job_string | | --post_job=job_string | ||
| execute a postprocess job in (each) module. post_job_string is a shell script/command to be executed after regular job in the module | | execute a postprocess job in (each) module. post_job_string is a shell script/command to be executed after regular job in the module | ||
− | | | + | | "make --post_job=job_string" |
|} | |} | ||
There will be 1 Makefile in main with all intermodule dependencies (first line in prj/build.lst) and | There will be 1 Makefile in main with all intermodule dependencies (first line in prj/build.lst) and | ||
1 Makefile in each module with the dependencies in prj/build.lst, this makefile will also have target=deliver which contains all lines from prj/deliver.lst | 1 Makefile in each module with the dependencies in prj/build.lst, this makefile will also have target=deliver which contains all lines from prj/deliver.lst |
Revision as of 12:02, 18 October 2013
build.pl versus central makefile
In order to refactor our build system, the functionality of build.pl and how it can be translated into a central makefile have been analyzed.
The following table contains all build.pl options, with description (build --help), and the make (in main) equivalent
Option | Description | Makefile |
---|---|---|
--all | build all projects from very beginning till current one | "make" builds all modules
"make <module>" builds to and with <module> (same as --from) |
--from | build all projects dependent from the specified (including it) till current one | "make <module>" builds to and with <module>. Remark the Makefile represent real dependencies. <module>/Makefile touches a file "solver/.../<module>.done" in every run and the central makefile have rules like "<module>.done : <module_depend>.done ...", this means that modules needed to be generated are called. |
--genPO | extract en-US PO file(s), no build/deliver (usable for '-all' and '-from' keys) | "make genPO" to extract from all modules
"<module>/make genPO" to extract from a single module |
--exclude_branch_fromd | exclude module(s) and its branch from the build | not suported |
--mode OOo | build only projects needed for OpenOffice.org | not suported |
--prepare | clear all projects for incompatible build from prj_name till current one [for platform] (cws version) | "make clear" to clear all modules
"<module>/make clear" to clear a single module "<module>/make clear --depend" to clear all depending modules |
--with_branches- | the same as "--from" but with build all projects in neighbour branches | not suported |
--skip | do not build certain module(s) | not suported |
--since | build all projects beginning from the specified till current one (the same as "--all:prj_name", but skipping prj_name) | "make <module>" |
--checkmodules | check if all required parent projects are availlable | "make -q" dry-run for dependencies all modules
"make <module> -q" dry-run for dependencies of <module> |
--show | show what is going to be built | "make -q" dry-run for dependencies all modules
"make <module> -q" dry-run for dependencies of <module> "<module>/make -q" dry-run for all files in <module> |
--file | generate command file file_name | not suported |
--deliver | only deliver, no build (usable for '-all' and '-from' keys) | "make deliver" delivers all modules
"<module>/make deliver" delivers a single module |
-P | start multiprocessing build, with number of processes passed | "make -j<x>" where <x> is number of parallel processes |
--server | start build in server mode (clients required) | not suported |
--setenvstring (--server) | string for configuration of the client environment | not suported |
--port (--server) | set server port, default is 7890. You may pass several ports, the server will be started on the first available
otherwise the server will be started on first available port from the default range 7890-7894 |
not suported |
--client_timeout (--server) | time frame after which the client/job is considered to be lost. Default is 120 min | not suported |
--dlv_switch | use deliver with the switch specified | not suported |
--help | print help info | not suported |
--ignore | force tool to ignore errors | "make -i" |
--html | generate html page with build status file named unxlngx6.pro.build.html will be generated in /share/opensource/aoo/branches/l10n40/main | not suported, make does not provide such a feature, but 2 scripts will be provided make_log, that calls make and redirect output to a log file, and make_html, that calls make and pipes output through a html formatter. |
--html_path | set html page path | not suported |
--dontgraboutput | do not grab console output when generating html page | not suported |
--genconf | generate/modify workspace configuration file | not suported |
--add | add active module(s) to configuration file | edit Makefile |
--remove | removeactive modules(s) from configuration file | edit Makefile |
--removeall
--clear |
remove all active modules(s) from configuration file | edit Makefile |
--stoponerror | stop build when error occurs (for mp builds) | default unless -i is used |
--interactive | start interactive build process (process can be managed via html page) | not suported |
--job=job_string | execute custom job in (each) module. job_string is a shell script/command to be executed instead of regular dmake jobs | "make --job=job_string" |
--pre_job=pre_job_string | execute preliminary job in (each) module. pre_job_string is a shell script/command to be executed before regular job in the module | "make --pre_job=job_string" |
--post_job=job_string | execute a postprocess job in (each) module. post_job_string is a shell script/command to be executed after regular job in the module | "make --post_job=job_string" |
There will be 1 Makefile in main with all intermodule dependencies (first line in prj/build.lst) and 1 Makefile in each module with the dependencies in prj/build.lst, this makefile will also have target=deliver which contains all lines from prj/deliver.lst