~ubuntu-branches/ubuntu/trusty/rheolef/trusty-proposed

« back to all changes in this revision

Viewing changes to doc/refman/FAQ.texi

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme
  • Date: 2010-06-12 09:08:59 UTC
  • Revision ID: james.westby@ubuntu.com-20100612090859-8gpm2gc7j3ab43et
Tags: upstream-5.89
ImportĀ upstreamĀ versionĀ 5.89

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
@c =========================
 
2
@chapter FAQ for developers
 
3
@c =========================
 
4
@cindex FAQ
 
5
 
 
6
This list of Frequently Asked Questions intended
 
7
for Rheolef developers and maintainers.
 
8
I'm looking for new questions (@emph{with} answers,
 
9
better answers, or both.
 
10
Please, send suggestions to
 
11
@email{Pierre.Saramito@@imag.fr}.
 
12
 
 
13
@c -----------------------------------------------
 
14
@section How to regenerate the @code{configure} script
 
15
@c -----------------------------------------------
 
16
 
 
17
@toindex @code{automake}
 
18
@toindex @code{aclocal}
 
19
@toindex @code{autoconf}
 
20
@fiindex configure.ac
 
21
@fiindex Makefile.am
 
22
@fiindex acinclude.m4
 
23
 
 
24
The configure script and makefiles are automatically
 
25
produced from file @file{configure.ac} and @file{Makefile.am} 
 
26
by using the autoconf and automake commands. Enter:
 
27
 
 
28
@example
 
29
        bootstrap
 
30
@end example
 
31
 
 
32
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
33
@subsection In which order does the things build ?
 
34
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
35
 
 
36
Let us look at with details the configure files flow:
 
37
 
 
38
@example
 
39
[acinclude.m4] -----> aclocal* -----------> [aclocal.m4]
 
40
 
 
41
[configure.ac] -+
 
42
----------------+---> autoconf* ----------> configure
 
43
[aclocal.m4] ---+
 
44
 
 
45
[Makefile.am] ------> automake* ----------> Makefile.in
 
46
 
 
47
[config.h.in] -+                        +-> config.h
 
48
               |                        |
 
49
Makefile.in ---+----> configure* -------+-> Makefile
 
50
               |                        |
 
51
[config.mk.in] +                        +-> config.mk
 
52
@end example
 
53
 
 
54
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
55
@subsection What means these commands ?
 
56
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
57
 
 
58
Let us review the list of commands:
 
59
 
 
60
@table @code
 
61
  @itemx aclocal
 
62
        take @file{acinclude.m4} and build @file{aclocal.m4}.
 
63
        The arguments specifies that these files are located
 
64
        in the @file{config/} directory.
 
65
 
 
66
  @itemx automake
 
67
        translate every @file{Makefile.am} and then build a @file{Makefile.in}. 
 
68
 
 
69
  @itemx autoconf
 
70
         translate @file{configure.ac} in
 
71
        @file{configure} which is an executable shell script.
 
72
        The arguments specifies that @file{aclocal.m4} is located in the
 
73
        @file{config/} dirctory.
 
74
        All this files are machine independent.
 
75
 
 
76
   @itemx configure
 
77
        the automatically generated script,
 
78
        scan the machine and translate @file{config.h.in}, @file{config.mk.in}
 
79
        and every @file{Makefile.in}
 
80
        into @file{config.h}, @file{config.mk} and every @file{Makefile}, respectively.
 
81
        At this step, all produced files are machine dependent.
 
82
 
 
83
@end table
 
84
@c ----------------------------------------
 
85
@section How to save my version ?
 
86
@c ----------------------------------------
 
87
 
 
88
First, check that our distribution is valid
 
89
@example
 
90
        make distcheck
 
91
@end example
 
92
 
 
93
First, check that your modifications are not
 
94
in conflict with others.
 
95
Go to the top source directory and enter:
 
96
 
 
97
@example
 
98
        make status
 
99
@end example
 
100
 
 
101
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
102
@subsection Easy: no conflicts with another developer
 
103
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
104
 
 
105
A listing of labeled files appears:
 
106
 
 
107
@example
 
108
        Modified                skit/lib/blas1_tst.c
 
109
        Update                  skit/lib/blas2_tst.c
 
110
@end example
 
111
 
 
112
Its mean that you have modified @file{blas1_tst.c}.
 
113
Another concurrent developer has modified @file{blas2_tst.c},
 
114
and your local file version is not up-to-date.
 
115
There is no conflict, labeled by a @code{*Merge*} label.
 
116
 
 
117
First, update your local version:
 
118
 
 
119
@example
 
120
        make update
 
121
@end example
 
122
 
 
123
Before to store your version of the Rheolef distribution,
 
124
check the consistency by running rnon-regression tests:
 
125
 
 
126
@example
 
127
        make distcheck
 
128
@end example
 
129
 
 
130
When all tests are ok:
 
131
 
 
132
@example
 
133
        make save
 
134
@end example
 
135
 
 
136
and enter a change log comment terminated by the
 
137
@code{ctrl-D} key.
 
138
 
 
139
 
 
140
Check now that your version status is the 
 
141
most up-to-date Rheolef distribution:
 
142
 
 
143
@example
 
144
        make status
 
145
@end example
 
146
 
 
147
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
148
@subsection I have conflicts with another developer
 
149
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
150
 
 
151
The listing issued by @code{make status} looks like:
 
152
 
 
153
@example
 
154
        Modified                skit/lib/blas1_tst.c
 
155
        Update                  skit/lib/blas2_tst.c
 
156
        *Merge*                 skit/lib/blas3_tst.c
 
157
@end example
 
158
 
 
159
Its mean that you and another developer have 
 
160
modified at least one common line in
 
161
@file{blas3_tst.c}.
 
162
Moreover, the developer has already saved his version
 
163
in a previous Rheolef distribution.
 
164
You have now to merge these modifications.
 
165
Thus, enter:
 
166
@example
 
167
        cd skit/lib
 
168
        mv blas3_tst.c blas3_tst.c.new
 
169
        cvs checkout blas3_tst.c
 
170
        sdiff blas3_tst.c blas3_tst.c.new | more
 
171
@end example
 
172
and then edit @file{blas3_tst.c} to integrate the
 
173
modifications of @file{blas3_tst.c.new}, generated by
 
174
another developer. When it is done, go to the top directory and enter,
 
175
@example
 
176
        make status
 
177
@end example
 
178
It prints new:
 
179
@example
 
180
        Modified                skit/lib/blas1_tst.c
 
181
        Update                  skit/lib/blas2_tst.c
 
182
        Modified                skit/lib/blas3_tst.c
 
183
@end example
 
184
The situation becomes mature:
 
185
@example
 
186
        make update
 
187
@end example
 
188
It will update the @file{blas2_tst.c}.
 
189
Finally,
 
190
@example
 
191
        make save
 
192
@end example
 
193
that will save modified @file{blas1_tst.c} and @file{blas3_tst.c}.
 
194
 
 
195
@c PRCS implementation
 
196
@c @example
 
197
@c      prcs merge
 
198
@c @end example
 
199
@c 
 
200
@c @code{prcs} will prompt you for files in evolution.
 
201
@c When there is a merge, you can print differences 
 
202
@c `@code{d}'
 
203
@c and creating an anotated file 
 
204
@c `@code{m}'.
 
205
@c Then edit these anotated files and performs merges.
 
206
@c For more informations about the @code{prcs} program,
 
207
@c see the corresponding documentation 
 
208
@c at @url{http://www.XCF.Berkeley.EDU/~jmacd/prcs.html}.
 
209
@c  
 
210
@c When you have scanned all concerned files,
 
211
@c enter @code{make status} and no more
 
212
@c @code{*Merge*} label may appear.
 
213
@c Thus, you can 
 
214
@c save our version as in the previous paragraph.
 
215
@c 
 
216
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
217
@subsection I have deleted a source file...
 
218
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
 
219
 
 
220
@toindex @code{make}
 
221
@toindex @code{cvs}
 
222
@cindex version management
 
223
 
 
224
I have entered:
 
225
 
 
226
@example
 
227
        rm Makefile.am
 
228
@end example
 
229
 
 
230
...aie !
 
231
 
 
232
How to restaure the file, now ?
 
233
 
 
234
Enter:
 
235
 
 
236
@example
 
237
        cvs checkout Makefile.am
 
238
@end example
 
239
 
 
240
You restaure the last available version of
 
241
the missing file in the most up-to-date 
 
242
Rheolef distribution.
 
243