Source trees: Difference between revisions

No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
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>
Line 5: Line 11:
* 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>
<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