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== | ||
==Cleanup== | ==Cleanup== | ||
<b>Rule: <tt>make clean</tt> in a pristine source tree ought be idempotent</b> | |||
* Never remove controlled files as part of a <tt>make clean</tt> | * Never remove controlled files as part of a <tt>make clean</tt> | ||
* Never build files as part of a <tt>make clean</tt> | * Never build files as part of a <tt>make clean</tt> | ||
** <tt>svn status --no-ignore</tt> ought generate the same output across multiple <tt>clean</tt> runs | ** <tt>svn status --no-ignore</tt> ought generate the same output across multiple <tt>clean</tt> runs | ||
===Generated files=== | ===Generated files=== | ||
<b>Rule: <tt>make all</tt> in a pristine source tree oughtn't change files in source control</b> | |||
* Don't keep generated files in source control | * Don't keep generated files in source control | ||
** It ought be possible to write a <tt>make clean</tt> which operates entirely based off "ignore" properties | ** It ought be possible to write a <tt>make clean</tt> which operates entirely based off "ignore" properties | ||
<b>Rule: <tt>make all</tt> oughtn't generate files unknown to source control</b> | |||
* Use source control systems' "ignore" capabilities | * Use source control systems' "ignore" capabilities | ||
** <tt>svn status</tt> oughtn't generate output following a <tt>make all</tt> | ** <tt>svn status</tt> oughtn't generate output following a <tt>make all</tt> |
Revision as of 01:55, 31 May 2010
Rules for source trees
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