previous up next print clean
Next: File naming conventions Up: INTRODUCTION Previous: INTRODUCTION

Directory layout and clean up

Typically we put in one directory all files needed to create a family of figures except for the input data (which maybe somewhere else), and the final plot files which go in FIGDIR. Software developement people often go to great lengths to keep separate directories for binary files of different machine types, but most researchers pile everything in the same directory, and whenever they switch machine types, they issue a cake clean to remove everything rebuildable (which includes all machine dependent code). Thus, you might expect every figure-building cakefile to include a rule like

        clean& :
                rm junk* *.o *.x etc etc
Instead, most people prefer to use a cleaning rule named jclean which silently removes files named core, a.out, *.o, *.x, *.H, *.A, *.M, *.ps, *.v, *.v3, *.V, junk* and a few others produced by compilers and debuggers on various machines. It also removes fortran files that can be rebuilt from other languages. To invoke jclean, a figure-building cakefile includes the rule
        clean& : jclean

This line means that when someone types cake clean in the directory containing a cakefile with this rule that jclean must be built. Neither clean nor jclean are files; they are abstract and the & is a signal for cake not to complain when no file named clean appears after the completion of cake clean. You probably agree with our standard cleaning rule, but if you want to check, you can type cake -n clean which does nothing but tell you what would be done were you to type cake clean. Another useful cleaning rule is texclean which cleans the directory of intermediate TEXrelated files. Experience shows that when you begin regular use of a cleaning rule like these, the number of files cluttering your life will drop immensely and you will have a much easier time finding things.


previous up next print clean
Next: File naming conventions Up: INTRODUCTION Previous: INTRODUCTION
Stanford Exploration Project
11/17/1997