In this section we demonstrate checking out and changing a file. |
|
|
|
Given that we have built etoc, we really should test it before we go any further, let's test etoc: % ./etoc : ptr to func returning ptr to array of funcs returning ints int (*(*x)())[](); : func returning int int x(); : func returning void ? [type 'help'] : ^D This is a very old program in that it predates void, and that's the change we're going to make, but first let's see what files exist. % ls etoc etoc.c etoc.o incls._ qmkhist._ srclist._ The files etoc and etoc.o should be obvious. etoc.c is the file produced by the lex of etoc.l, incls._ is the cache for the incls program, qmkhist._ is the history of builds, dependencies, etc., and srclist._ is the sls Ls output. Some sls magic |
Using sls to list all the significant files in the path:
|
% sls -cf # -f to limit to files /g/dt/cook/obj/ctoe: etoc etoc.c etoc.o incls._ qmkhist._ srclist._ /p/cook/s3.4/ctoe: ctoe.1 ctoe.c ctoe.h ctoel.l ctoey.y etoc.1 etoc.l qeffile % sls -s -c # -s to list @Suffixes files /p/cook/s3.4/ctoe: ctoe.1 ctoe.c ctoel.l ctoey.y etoc.1 etoc.l Note that etoc.c is not listed by the second sls since given the existence of etoc.l, it is assumed that the latter file is the source and the former is an intermediate file. vci: The Version Control System Interface |
| Let's check out etoc.l to make our fix: % vci co -e etoc.l /p/cook/s3.4/ctoe/RCS/etoc.l,v --> etoc.l revision 1.1 (locked) done % sls -cs /g/dt/cook/work/ctoe: etoc.l /p/cook/s3.4/ctoe: ctoe.1 ctoe.c ctoel.l ctoey.y etoc.1 # note that copy of etoc.l in baseline is hidden % sls -cs -a # -a flag to get all files /g/dt/cook/work/ctoe: etoc.l /p/cook/s3.4/ctoe: ctoe.1 ctoe.c ctoel.l ctoey.y etoc.1 etoc.l # note etoc.l in both working and baseline directories The vci command is actually a wrapper for a variety of version systems (e.g., SCCS, RCS, CVS, Perforce). The system to be used is named by the VCSys variable in the root.vrs file. The vci wrapper also provides semantics not normally provided by the underlying system. In this instance vci was actually executed from the object directory but the RCS ,v file is in the baseline, and the file is checked out into the working directory. Now we change the file as required and rebuild etoc: % qed `sls etoc.l` # use vi if you must a .257 /g/dt/cook/work/ctoe/etoc.l # make the changes and quit -- details given on next page % qef etoc #{ etoc @gobo 2003/07/18 03:50:21 # QEFHALTFILE: /g/dt/cook/obj/ctoe/%qef10602b.hlt Moved: /p/cook/s3.4/ctoe/etoc.l -> /g/dt/cook/work/ctoe/etoc.l + qlex /g/dt/cook/work/ctoe/etoc.l + cc -c -I. -I/g/dt/cook/work/ctoe -I/p/cook/s3.4/ctoe \ -I/p/qtree/9.1/linux2_0i/include etoc.c + cc -o etoc etoc.o -L/p/qtree/9.1/linux2_0i/lib \ -ldt /p/qtree/9.1/linux2_0i/lib/libl.a #} E0 gobo@/g/dt/cook/obj/ctoe 2003/07/18 03:50:21(0) % echo func returning void | ./etoc # test new version void x();
Given our change has been exhaustively tested, we can now check it in. |
cook17.qh - 1.17 - 03/10/24 |