Difference between revisions of "Build Environment Effort/Zen of gbuild"
From Apache OpenOffice Wiki
B michaelsen (Talk | contribs) (→Zen of gbuild) |
B michaelsen (Talk | contribs) (→Zen of gbuild) |
||
Line 5: | Line 5: | ||
* Have exactly one $(OUTDIR) target per declaration file. | * Have exactly one $(OUTDIR) target per declaration file. | ||
* Use only tools as defined by [http://en.wikipedia.org/wiki/POSIX POSIX:2008] and supported on all platforms. Exception: GNU extensions are allowed for cp, make, tar and touch. | * Use only tools as defined by [http://en.wikipedia.org/wiki/POSIX POSIX:2008] and supported on all platforms. Exception: GNU extensions are allowed for cp, make, tar and touch. | ||
− | * | + | * Use only POSIX sh, POSIX awk, C/C++ and GNU make in gbuild core. |
− | * | + | * Otherwise, put the file in the extensions subdirectory and do not depend the core functionality on it. |
* Use the gb_Output_* functions for notifications. | * Use the gb_Output_* functions for notifications. | ||
* Keep all platform specific stuff confined in the platform subdirectory of gbuild. | * Keep all platform specific stuff confined in the platform subdirectory of gbuild. | ||
* Never use relative paths, only absolute paths starting with $(OUTDIR), $(WORKDIR) and the repository roots (for example $(SRCDIR)) should be used. | * Never use relative paths, only absolute paths starting with $(OUTDIR), $(WORKDIR) and the repository roots (for example $(SRCDIR)) should be used. | ||
* Adhere to the [http://www.python.org/dev/peps/pep-0020/ Zen of Python], for it is valid in any language. | * Adhere to the [http://www.python.org/dev/peps/pep-0020/ Zen of Python], for it is valid in any language. |
Latest revision as of 11:17, 22 November 2010
Zen of gbuild
- One use make process, do not recurse.
- Always have good dependencies and good clean targets.
- Have exactly one $(OUTDIR) target per declaration file.
- Use only tools as defined by POSIX:2008 and supported on all platforms. Exception: GNU extensions are allowed for cp, make, tar and touch.
- Use only POSIX sh, POSIX awk, C/C++ and GNU make in gbuild core.
- Otherwise, put the file in the extensions subdirectory and do not depend the core functionality on it.
- Use the gb_Output_* functions for notifications.
- Keep all platform specific stuff confined in the platform subdirectory of gbuild.
- Never use relative paths, only absolute paths starting with $(OUTDIR), $(WORKDIR) and the repository roots (for example $(SRCDIR)) should be used.
- Adhere to the Zen of Python, for it is valid in any language.