Check out my first novel, midnight's simulacra!
Source trees: Difference between revisions
From dankwiki
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
Rules for source trees | Rules for source trees, collected over the years. | ||
==Targets== | |||
* Honor the standard targets of the [http://www.gnu.org/prep/standards/html_node/Standard-Targets.html FSF coding standards]: | |||
** <tt>all</tt> compiles all installable object files, and usually not documentation | |||
** <tt>install</tt> publishes object files. <tt>uninstall</tt> removes them. neither ought write within the tree. | |||
** <tt>dist</tt> rolls up a distributable. | |||
==Cleanup== | ==Cleanup== | ||
<b>Rule: <tt>make clean</tt> in a pristine source tree ought be idempotent</b> | <b>Rule: <tt>make clean</tt> in a pristine source tree ought be idempotent</b> |
Latest revision as of 23:18, 1 June 2010
Rules for source trees, collected over the years.
Targets
- Honor the standard targets of the FSF coding standards:
- all compiles all installable object files, and usually not documentation
- install publishes object files. uninstall removes them. neither ought write within the tree.
- dist rolls up a distributable.
Cleanup
Rule: make clean in a pristine source tree ought be idempotent
- Never remove controlled files as part of a make clean
- Never build files as part of a make clean
- svn status --no-ignore ought generate the same output across multiple clean runs
Generated files
Rule: make all in a pristine source tree oughtn't change files in source control
- Don't keep generated files in source control
- It ought be possible to write a make clean which operates entirely based off "ignore" properties
Rule: make all oughtn't generate files unknown to source control
- Use source control systems' "ignore" capabilities
- svn status oughtn't generate output following a make all