3 MAINTAINING A VARIANT OF EiC via CVS
\r
4 BUILDING A BINARY DISTRIBUTION
\r
5 COMMITTING EiC to CVS
\r
7 --------------------------------------------------------------------
\r
8 MAINTAINING A VARIANT OF EiC via CVS
\r
10 If you have or intend to be modifying EiC's source distribution for
\r
11 your own personal needs, but also want your distribution to be kept up
\r
12 to date with EiC's public distribution, then one way to do this is to
\r
13 use CVS. With CVS you can keep track of several versions of EiC
\r
14 simultaneously and it will allow you to merge different versions
\r
15 together. Thereby, incorporating changes from one version into
\r
18 For details on using CVS please refer to:
\r
20 Version Management with CVS by Per Cederqvist
\r
22 http://www.loria.fr/~molli/cvs/doc/cvs_toc.html
\r
24 Most Linux distribution come with CVS, but if you need to install CVS,
\r
25 it can be obtained from:
\r
27 http://www.cyclic.com/cyclic-pages/cvsdev.html
\r
30 The following will show you how to maintain your personal distribution
\r
31 of EiC so that you can easily incorporate new features or bug fixes
\r
32 from the latest official release of EiC into your own version. Also,
\r
33 you are advised to read all of the this section prior to starting.
\r
35 In the following it will be assumed that your EiC source directory
\r
36 contains only EiC source files. Therefore, before starting make sure
\r
37 your EiC directory has been clobbered:
\r
40 % cd $HOMEofEiC // PATH_TO_THE_EiC_DIRECTORY
\r
41 % cd doc; make clobber; cd .. ; make clobber
\r
43 The clobber directive is more severe than a clean, as it
\r
44 removes everything that clean does plus targets and installed
\r
47 First place a copy of the public version of EiC under CVS control
\r
48 using the following cvs command:
\r
50 cvs import -m"Message" <Dir> <Vendor-Tag> <Release-Tag>
\r
53 Message A string that specifies some information about the current
\r
54 operation. If you do not give it, CVS will prompt you by
\r
55 opening up an editor according to $CVSEDITOR or $EDITOR
\r
56 and which can be quite slow and annoying at times.
\r
58 Dir The directory where the current source will be stored in
\r
59 the CVS repository.
\r
61 Vendor-Tag The tag for the entire branch. This tag will be used
\r
62 to identify the Vendor's copy of the source (the public version
\r
63 of EiC), rather than your personal version.
\r
65 Release-Tag The Release-Tag is used to identify the files at the
\r
66 leaves, of the Vendor's branch, created each time you execute
\r
70 For example, lets say you are starting from EiC version 3.7:
\r
72 % cvs import -m"import of EiC 3.7" EiC EiC_dist V_3_7
\r
74 This command will create a branch with number 1.1.1, and which is the
\r
75 CVS branch number for the Vendor's branch. The above command will also
\r
76 place a copy of EiC's source distribution in the directory
\r
77 $CVSROOT/EiC. It will label the Vendor's branch as `EiC_dist' and
\r
78 assign it the release tag `V_3_7'.
\r
81 Before you start working with any code in the repository you must
\r
82 first check out a working copy from the repository. To make sure
\r
83 everything worked and to check out the latest version from the
\r
84 repository do the following:
\r
91 Note: you have checked out the latest revision on the `main trunk' of
\r
92 the EiC repository and not the code on the Vendor's branch `EiC_dist', although
\r
93 at this stage they are identical. This means you should have a copy of
\r
94 the main trunk of the EiC repository, and all commits will be
\r
95 committed to the main trunk and not to the Vendor's branch.
\r
97 Now, examine the status of a file, such as the starteic.c file, by
\r
98 using the CVS status subcommand:
\r
101 % cvs status -v starteic.c
\r
103 ===================================================================
\r
104 File: starteic.c Status: Up-to-date
\r
106 Working revision: 1.1.1.1 Sat Jun 20 07:37:46 1998
\r
107 Repository revision: 1.1.1.1 /usr/local/cvsroot/EiC/src/starteic.c,v
\r
109 Sticky Date: (none)
\r
110 Sticky Options: (none)
\r
113 V_3_7 (revision: 1.1.1.1)
\r
114 EiC_dist (branch: 1.1.1)
\r
117 This tells us that we are working with revision 1.1.1.1, which also
\r
118 coincides with the revision version 1.1.1.1 with tag V_3_7. While it
\r
119 it is not clear from the above information, but this is also revision
\r
120 1.1 on the main trunk.
\r
122 If you already have a modified copy of EiC then just copy your files
\r
123 over the top of the files in this EiC directory. However, to simulate
\r
124 changes that you may make to the EiC source files, and for this
\r
125 example, I will just edit `starteic.c' and change:
\r
127 "EiC V3.7 - Copyright (c) 1995 to 1998,"
\r
129 "myEiC V3.7 - Copyright (c) 1995 to 1998,"
\r
132 Next, commit the changes via:
\r
134 % cvs commit -m"update of EiC" starteic.c
\r
135 Checking in starteic.c;
\r
136 /usr/local/cvsroot/EiC/src/starteic.c,v <-- starteic.c
\r
137 new revision: 1.2; previous revision: 1.1
\r
140 If I had not specified the file `starteic.c', then the commit command
\r
141 would have worked recursively on all files within this directory and
\r
142 its subdirectories. It is also a good idea to use `cvs -n update'
\r
143 before making a commit, as this will inform you, without making any
\r
144 changes, what changes will occur, and will give you the opportunity to
\r
145 make appropriate changes as needed; such as adding any new files and
\r
148 Now the CVS repository for EiC will look something like this:
\r
152 main trunk --> | 1.1 |--->| 1.2 |
\r
153 (1) +-----+ +-----+
\r
156 Vendor's branch --> | 1.1.1.1 |
\r
157 (1.1.1) +---------+
\r
164 Note, only file starteic.c will have the revision number 1.2, all the
\r
165 rest will have revision number 1.1.1.1, which is also 1.1.
\r
167 When a new version of EiC is released, and for this example I will use
\r
168 version 3.7.1, the first thing to do is to make sure you have
\r
169 committed your working revision of EiC to CVS (see examples
\r
170 above). Then untar the new release of EiC into some temporary
\r
174 % tar xvzf EiCsrc_3_7_1.tgz
\r
176 % cvs import -m"update EiC V3.7.1" EiC EiC_dist V_3_7_1
\r
178 The above import command is almost identical to the previous import
\r
179 command, with the only difference being that a new release tag is
\r
180 being specified, V_3_7_1.
\r
182 After the above, the repository will look like:
\r
186 main trunk --> | 1.1 |--->| 1.2 |
\r
187 (1) +-----+ +-----+
\r
189 \+---------+ +---------+
\r
190 Vendor's branch --> | 1.1.1.1 | --->| 1.1.1.2 |
\r
191 (1.1.1) +---------+ +---------+
\r
195 tag V_3_7 tag V_3_7_1
\r
198 Any files in the Vendor's branch that have changed between version 3.7
\r
199 and 3.7.1 will have the revision number 1.1.1.2 else their revision
\r
200 number will remain at 1.1.1.1. If there are any files in the main
\r
201 trunk that have local changes then CVS will warn that you must merge
\r
202 the changes into the main trunk, and for this example, CVS reports:
\r
205 1 conflicts created by this import.
\r
206 Use the following command to help the merge:
\r
208 cvs checkout -jEiC_dist:yesterday -jEiC_dist EiC
\r
211 The above report is warning that not only are changes detected between
\r
212 the main trunk and the Vendor's branch, but some of these changes also
\r
213 conflict. This means that the same lines of code have been altered
\r
214 between the Vendor's source and the main trunk source. To resolve
\r
215 these difference first change to your local working EiC directory:
\r
219 After you have commited your working version to the main trunk of
\r
220 the repository for EiC, you may also want to tag your current revision:
\r
224 This will allow you to retrieve this revision via:
\r
226 % cvs checkout -r TAGNAME EiC
\r
228 Next, you must merge all changes on the Vendor's branch into your
\r
229 local working copy of EiC (this command only affects the working
\r
232 % cvs update -d -j EiC_dist
\r
234 Any conflicts that result from the merge must now be resolved. To find
\r
235 all the files with conflicts use the command:
\r
239 The only conflict in this example is with file starteic.c (note, the
\r
240 original working copy will be saved in file `.#starteic.c.1.2') and
\r
241 within starteic.c the conflict is revealed as:
\r
244 "myEiC V3.7 - Copyright (c) 1995 to 1998,"
\r
246 "EiC V3.7.1 - Copyright (c) 1995 to 1998,"
\r
249 CVS delimits conflicting sections with <<<<<<<<, ===== and
\r
250 >>>>>>. Thus, preventing code with conflicts from being compiled. To
\r
251 resolve this conflict, change the above 5 lines into:
\r
254 "EiC V3.7.1 - Copyright (c) 1995 to 1998,"
\r
256 This will also prevent future conflicts with this section of code.
\r
258 Now, from the EiC home directory commit the whole source tree:
\r
260 % cvs commit -m"merged with EiC V3.7.1"
\r
263 The EiC repository will now look like:
\r
266 +-----+ +-----+ +-----+
\r
267 main trunk --> | 1.1 |--->| 1.2 |--->| 1.3 |
\r
268 (1) +-----+ +-----+ +-----+
\r
270 \+---------+ +---------+
\r
271 Vendor's branch --> | 1.1.1.1 | --->| 1.1.1.2 |
\r
272 (1.1.1) +---------+ +---------+
\r
276 tag V_3_7 tag V_3_7_1
\r
279 At this stage you should have the latest changes of EiC incorporated
\r
280 into your local version of EiC.
\r
284 Keep a backup of your CVS repository.
\r
285 This way, if you get confused and stuff up your
\r
286 CVS repository you can always replace it with
\r
287 the backed up version.
\r
289 Use CVS tags to keep track of various revisions
\r
290 of your local source.
\r
292 Work methodically with CVS. If need be,
\r
293 create a check list that you work through.
\r
294 Below in section `COMMITTING EiC to CVS' are the
\r
295 steps that I go through each time I make
\r
296 a new commit of EiC.
\r
298 More CVS information can be found at:
\r
300 http://www.loria.fr/~molli/cvs-index.html
\r
302 --------------------------------------------------------------------
\r
303 BUILDING THE BINARY DISTRIBUTION
\r
305 (*) Change to EiC's top directory and run
\r
307 % config/makeconfig
\r
309 This ensures that the appropriate platform
\r
310 information has been set.
\r
312 (*) Edit the main Makefile to set EiC's
\r
313 version number, EiC_NUM, to that obtained from
\r
317 If adding a new module to the binary source
\r
318 distribution update the variables MODULES
\r
319 BINTREE and possibly PUB_DIRS in the top
\r
322 (*) Edit the README.BIN file to reflect
\r
323 the appropriate version and any new
\r
326 (*) Change to the documentation directory
\r
333 (*) To construct the binary distribution:
\r
338 (*) Now test the binary distribution:
\r
340 % tar xvzf EiC_PLATFORM.#.#.tgz
\r
342 Inspect the README file
\r
346 Follow the instruction for installing EiC.
\r
347 If needed repeat previous steps until
\r
351 % make -n installBinary
\r
352 % make installBinary
\r
363 % cd ../../EiC/main
\r
371 (*) Also, up date EiC's web page to reflect the
\r
375 ------------------------------------------------------------------
\r
376 COMMITTING EIC to CVS
\r
378 (1) Change directory to EiC's home directory
\r
382 (3) make install // Fix code, so that gcc
\r
383 // does not give any warnings
\r
385 (4) cd test // run test procedures
\r
387 (5) test.sh // make sure all tests modules pass
\r
388 // if not understand why
\r
390 (6) ../runsent *.c // check manually all the *.snt files
\r
391 // and that they are correct
\r
396 (9) make clobber // check that Lib and include directories
\r
397 // are empty. If not, find out why.
\r
399 (10) cvs -n update > /tmp/list
\r
401 * from the information that goes to screen
\r
403 * now check the contents of the file /tmp/list
\r
404 and if needed, take the appropriate actions
\r
405 * repeat step 10 until no warnings exist etc
\r
407 (11) cvs commit -m"UPDATE of EiC "
\r
409 (12) If needed now add a tag:
\r