1\par 2\section{Cleaning up and packaging} 3\label{section:cleanup} 4\par 5Let's say we've just created the {\tt spooles.a} library and then 6typed {\tt make all\_drivers} when in the {\tt spooles} directory. 7All the executable programs are now on disk, 8and taking up a lot of space. 9To remove all the executable programs, we don't need to go into 10each object's {\tt driver} program and remove them one by one. 11We can do this from the top level directory by typing 12{\tt make clean}. 13\par 14This process visits each of the objects' {\tt src/}, {\tt doc/} and 15{\tt drivers/} directories one by one. 16In the {\tt src/} directories, any {\tt *.o} and {\tt *.a} files 17are removed. 18In the {\tt doc/} directories, any {\tt *.dvi} files are removed. 19In the {\tt drivers/} directories, any {\tt *.o} and {\tt *.a} files 20are removed, as well as all driver program executables. 21(The {\tt makefile} in a drivers directory keeps track of the 22driver programs in the {\tt DRIVERS} variable. 23Modify this as necessary if you add a driver program to the 24directory.) 25\par 26Let's say you've got {\bf SPOOLES} working on one system and you 27want to move it to another system. 28Even after cleanup (via the {\tt make clean} call) there may be a 29large number of files that don't need to be moved. 30Or perhaps you'd like to {\tt tar} everything that is necessary without 31removing your {\tt spooles.a} library and executables that took so 32long to compile. 33\par 34The {\tt dotar} shell script is used to package up everything that 35is necessary into one tar file. 36You should modify this as necessary. 37Here are the lines from {\tt dotar} that archive what is necessary 38from the {\tt A2} object. 39\begin{verbatim} 40 A2.h \ 41 A2/{*.h,makefile} \ 42 A2/src/{makefile,makeGlobalLib,*.c} \ 43 A2/drivers/{do*,makefile,*.c} \ 44 A2/doc \ 45\end{verbatim} 46This {\tt tar}'s the header file and middle level makefile, 47then goes into the {\tt src/} directory and {\tt tar}'s the makefiles 48and source code, 49then goes into the {\tt drivers/} directory 50and {\tt tar}'s the makefiles, driver programs and shell scripts, 51and then {\tt tar}'s everything in the {\tt doc/} directory. 52This happens for every object, with a few minor exceptions. 53\par 54