[wplug] Software builds.
Michael Semcheski
lists at immuneit.com
Sat Feb 10 08:52:06 EST 2007
This is something I do -- I don't like object files cluttering my source
directories.
Usually, I put all my obj files in the same directory. But if there are
two different targets I'm dealing with, I try to keep their intermediate
output in different directories. For instance, I've got debug and
release targets. Debug has debugging symbols, release does not. If I
make debug, I don't want it to overwrite the release objects and vice versa.
Another thing I do... I have a general purpose library, which is used by
multiple applications. I have a script that copies all the header files
from the library to a common directory when something is checked in.
The advantage there is that in the application, I only have to include
Packages\Include, not Packages\Num, Packages\Strm, etc.
I use CVS. I'm sure subversion is better, but I use CVS. One thing I
like about CVS, which I'm nervous about subversion, is that CVS stores
the repository as a set of RCS files. That is, there is a one to one
relationship between repository files and files under source control.
This makes me sleep easier, knowing that its easy to manually extract
something from the repository. Plus, if one thing gets corrupted in the
repository (which I've not experienced) then you aren't totally
screwed. And it makes backups simpler.
But really, the important thing isn't which source control you use, its
that you use it.
Other things, which are worth mentioning, but this is becoming a long email:
Proper, standardized include guards.
Comments. Lots of comments.
Encapsulation.
Loose couplings.
Comments. This time, I mean it.
kabel wrote:
> A professor of mine recently got on my case as to how I build
> software.. he advocates two directories, one for source, one for
> builds. Packages get their own subdirectory in each, with source
> going in the appropriate subdir. and builds done in the other.
>
> I've never heard of doing it this way, and he may well have been
> referring to a specific case, but does anyone else do this?
>
> What other good practices have I missed out on along these lines?
More information about the wplug
mailing list