~ubuntu-branches/debian/sid/kdevelop/sid

« back to all changes in this revision

Viewing changes to doc/kdevelop/kdevelop-install.docbook

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Lainé
  • Date: 2010-05-05 07:21:55 UTC
  • mfrom: (1.2.3 upstream) (5.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100505072155-h78lx19pu04sbhtn
Tags: 4:4.0.0-2
* Upload to unstable (Closes: #579947, #481832).
* Acknowledge obsolete NMU fixes (Closes: #562410, #546961).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<appendix id="kdevelop-install">
2
 
 
3
 
<appendixinfo>
4
 
  <authorgroup>
5
 
    <author><firstname>Bernd</firstname><surname>Pol</surname></author>
6
 
    <author><firstname>Anne-Marie</firstname><surname>Mahfouf</surname></author>
7
 
    <!-- ROLES_OF_TRANSLATORS -->
8
 
  </authorgroup>
9
 
</appendixinfo>
10
 
 
11
 
<title>Installing &kdevelop;</title>
12
 
 
13
 
<indexterm zone="kdevelop-install">
14
 
  <primary>installation</primary></indexterm>
15
 
 
16
 
<para>
17
 
In this chapter we will discuss the steps necessary to compile and install the &kdevelop; IDE:
18
 
 
19
 
<itemizedlist>
20
 
  <listitem><para>
21
 
  <link linkend="kdevelop-install-howto">How to obtain &kdevelop;</link> mainly concentrates on downloading the most recent &kdevelop; sources from svn.
22
 
  </para></listitem>
23
 
  <listitem><para>
24
 
  <link linkend="requirements">&kdevelop; requirements</link> lists the programs and libraries which you need installed to successfully compile the IDE.
25
 
  </para></listitem>
26
 
  <listitem><para>
27
 
  <link linkend="compile-and-install">&kdevelop; compilation and installation</link> leads you through all the steps of compilation and installation of the application.
28
 
  </para></listitem>
29
 
  <listitem><para>
30
 
<link linkend="make-api">How to obtain a &kdevelop; &API; documentation</link> tells what an API is and how you get such a useful tool for navigating the &kdevelop; sources.
31
 
  </para></listitem>
32
 
</itemizedlist>
33
 
</para>
34
 
 
35
 
<sect1 id="kdevelop-install-howto">
36
 
<title>How to Obtain &kdevelop;</title>
37
 
 
38
 
<indexterm zone="kdevelop-install-howto">
39
 
  <primary>obtain &kdevelop;</primary></indexterm>
40
 
<indexterm zone="kdevelop-install-howto">
41
 
  <primary>&kdevelop;</primary>
42
 
  <secondary>obtain</secondary></indexterm>
43
 
 
44
 
<para>
45
 
&kdevelop; is available in binary form from many different &Linux; distributions such as <!--&SuSE;, &RedHat;//--> SuSE, RedHat and others. These binaries are packed in some convenient format, mostly RPM, for easy installation. To install, follow the standard instructions given in your distribution.
46
 
</para>
47
 
<para>
48
 
You may as well obtain the &kdevelop; sources, compile and install them by yourself. These sources can be found via the project home page at <ulink url="http://www.kdevelop.org"> http://www.kdevelop.org</ulink> or via the <ulink url="http://download.kde.org">&kde; ftp site</ulink>.
49
 
</para>
50
 
 
51
 
<sect2 id="howto-svn">
52
 
<title>Get Daily &kdevelop; Snapshots from svn</title>
53
 
 
54
 
<indexterm zone="howto-svn">
55
 
  <primary>svn</primary></indexterm>
56
 
 
57
 
<para>If you want to be in front of current development, anonymous svn repository snapshots are available.</para>
58
 
<para>The module name is <emphasis>kdevelop</emphasis> at <filename class="directory">svn co svn://anonsvn.kde.org/home/kde/branches/KDE/3.5/kdevelop</filename>.
59
 
</para>
60
 
 
61
 
<sect3 id="howto-svn-co">
62
 
<title>Initial svn Checkout</title>
63
 
 
64
 
<indexterm zone="howto-svn-co">
65
 
  <primary>checkout</primary></indexterm>
66
 
<indexterm zone="howto-svn-co">
67
 
  <primary>&kdevelop;</primary>
68
 
  <secondary>svn</secondary>
69
 
  <tertiary>checkout</tertiary></indexterm>
70
 
 
71
 
<para>
72
 
To obtain an initial version of &kdevelop; you must download it from anonymous svn.  For this so-called <emphasis>checkout</emphasis> operation follow these steps.
73
 
</para>
74
 
 
75
 
<note><para>
76
 
We assume you want to put your &kdevelop; copy into the <filename class="directory">kde3src</filename> subdirectory of your home directory (<filename class="directory">~</filename>).
77
 
</para></note>
78
 
 
79
 
<informalexample><simplelist>
80
 
  <member>
81
 
  # Create the destination directory, if necessary:
82
 
  </member>
83
 
  <member>
84
 
    <prompt>~&gt; </prompt>
85
 
    <userinput>mkdir kde3src</userinput>
86
 
  </member>
87
 
  <member>
88
 
    <prompt>~&gt; </prompt>
89
 
    <userinput>cd kde3src</userinput>
90
 
  </member>
91
 
  <member>
92
 
    <prompt>~/kde3src&gt; </prompt>
93
 
    <userinput>svn co svn://anonsvn.kde.org/home/kde/branches/KDE/3.5/kdevelop</userinput>
94
 
  </member>
95
 
  <member>
96
 
    <prompt>~/kde3src&gt; </prompt>
97
 
    <userinput>cd kdevelop</userinput>
98
 
  </member>
99
 
</simplelist></informalexample>
100
 
 
101
 
<note><para>
102
 
  Once you have successfully checked out your &kdevelop; version, you may keep up with the changes using the update procedure shown in the next section.
103
 
</para></note>
104
 
 
105
 
<important><para>
106
 
  Keep the server load low. <emphasis>Please do not checkout every time you want to keep your &kdevelop; up to date!</emphasis> Use svn update for this purpose.
107
 
</para></important>
108
 
 
109
 
<para>
110
 
Now you may compile your &kdevelop; version as shown in the <link linkend="compile-and-install">&kdevelop; Compilation and Installation</link> section.
111
 
</para>
112
 
 
113
 
</sect3> <!-- howto-svn-co -->
114
 
 
115
 
<sect3 id="howto-svn-up">
116
 
<title>Keeping Your svn Copy up to Date</title>
117
 
 
118
 
<indexterm zone="howto-svn-up">
119
 
  <primary>update</primary></indexterm>
120
 
<indexterm zone="howto-svn-up">
121
 
  <primary>&kdevelop;</primary>
122
 
  <secondary>svn</secondary>
123
 
  <tertiary>update</tertiary></indexterm>
124
 
 
125
 
<para>
126
 
After you checked out (and successfully compiled) &kdevelop; from svn as shown above, you'll want to keep it up to date in order to get all the patches. Follow these steps. (We again assume you have put your &kdevelop; copy into the <filename class="directory">kde3src</filename> directory.)
127
 
</para>
128
 
<para>
129
 
Note the <command>up</command> (= <emphasis>update</emphasis>) command instead of the <command>co</command> (which stands for <emphasis>checkout</emphasis>).
130
 
</para>
131
 
 
132
 
<informalexample><simplelist>
133
 
  <member>
134
 
    <prompt>~&gt; </prompt>
135
 
    <userinput>cd kde3src</userinput>
136
 
  </member>
137
 
  <member>
138
 
    <prompt>~/kde3src&gt; </prompt>
139
 
    <userinput>cd kdevelop</userinput>
140
 
  </member>
141
 
  <member>
142
 
    <prompt>~/kde3src&gt; </prompt>
143
 
    <userinput>svn up</userinput>
144
 
  </member>
145
 
</simplelist></informalexample>
146
 
 
147
 
<note><para>
148
 
Keep an eye on the messages svn produces during the update sequence. The exact steps in the compilation sequence depend on this.
149
 
</para></note>
150
 
 
151
 
<para>
152
 
Now you can compile a new &kdevelop; version as shown in the <link linkend="compile-and-install-make-svn">Special svn compilation considerations</link> chapter.
153
 
</para>
154
 
</sect3> <!-- howto-svn-up -->
155
 
 
156
 
</sect2> <!-- howto-svn -->
157
 
 
158
 
</sect1> <!-- howto -->
159
 
 
160
 
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
161
 
 
162
 
<sect1 id="requirements">
163
 
<title>&kdevelop; Requirements</title>
164
 
 
165
 
<indexterm zone="requirements">
166
 
  <primary>requirements</primary></indexterm>
167
 
<indexterm zone="requirements">
168
 
  <primary>&kdevelop;</primary>
169
 
  <secondary>requirements</secondary></indexterm>
170
 
<indexterm zone="requirements">
171
 
  <primary>GNU</primary>
172
 
  <secondary>requirements</secondary></indexterm>
173
 
 
174
 
<para>
175
 
In order to successfully compile and use &kdevelop;, you need the following programs and libraries. They are available on most platforms as distribution packages and thereby can be installed easily.
176
 
</para>
177
 
 
178
 
<itemizedlist>
179
 
<title>Required:</title>
180
 
  <listitem>
181
 
  <para>
182
 
    <application>gcc/g++</application> &ge; 2.95.3 (or compatible)
183
 
    <indexterm>
184
 
      <primary>gcc</primary>
185
 
      <secondary>requirements</secondary></indexterm>
186
 
    <indexterm>
187
 
      <primary>g++</primary>
188
 
      <secondary>requirements</secondary></indexterm>
189
 
  </para>
190
 
  <para>
191
 
  Available from <ulink url="gcc.gnu.org">gcc.gnu.org</ulink>
192
 
  </para>
193
 
  </listitem>
194
 
  <listitem>
195
 
  <para>
196
 
    <application>&GNU; make</application> (or compatible)
197
 
    <indexterm>
198
 
      <primary>make</primary>
199
 
      <secondary>requirements</secondary></indexterm>
200
 
  </para>
201
 
  <para>
202
 
  Available from <ulink url="www.gnu.org/software/make">www.gnu.org/software/make</ulink>
203
 
  </para>
204
 
  </listitem>
205
 
  <listitem>
206
 
  <para>
207
 
    &perl; 5.004 (or higher)
208
 
    <indexterm>
209
 
      <primary>Perl</primary>
210
 
      <secondary>requirements</secondary></indexterm>
211
 
  </para>
212
 
  <para>
213
 
  Available from <ulink url="www.perl.com">www.perl.com</ulink>
214
 
  </para>
215
 
  </listitem>
216
 
  <listitem>
217
 
  <para>
218
 
    <application>autoconf</application> &ge; 2.52 (or higher)
219
 
    <indexterm>
220
 
      <primary>autoconf</primary>
221
 
      <secondary>requirements</secondary></indexterm>
222
 
  </para>
223
 
  <para>
224
 
  Available from <ulink url="www.gnu.org/software/autoconf">www.gnu.org/software/autoconf</ulink>
225
 
  </para>
226
 
  </listitem>
227
 
  <listitem>
228
 
  <para>
229
 
    <application>automake</application> &ge; 1.6 (or higher)
230
 
    <indexterm>
231
 
      <primary>automake</primary>
232
 
      <secondary>requirements</secondary></indexterm>
233
 
  </para>
234
 
  <para>
235
 
  Available from <ulink url="www.gnu.org/software/automake">www.gnu.org/software/automake</ulink>
236
 
  </para>
237
 
  </listitem>
238
 
  <listitem>
239
 
  <para>
240
 
    <application>flex</application> 2.5.4 (or higher)
241
 
    <indexterm>
242
 
      <primary>flex</primary>
243
 
      <secondary>requirements</secondary></indexterm>
244
 
  </para>
245
 
  <para>
246
 
  Available from <ulink url="www.gnu.org/software/flex">www.gnu.org/software/flex</ulink>
247
 
  </para>
248
 
  </listitem>
249
 
  <listitem>
250
 
  <para>
251
 
    &Qt; &ge; 3.3.0 (or higher)
252
 
    <indexterm>
253
 
      <primary>Qt</primary>
254
 
      <secondary>requirements</secondary></indexterm>
255
 
  </para>
256
 
  <para>
257
 
  Available from <ulink url="www.trolltech.com/products/qt">www.trolltech.com/products/qt</ulink>
258
 
  </para>
259
 
  </listitem>
260
 
  <listitem>
261
 
  <para>
262
 
    <application>KDE</application> &ge; 3.4.0 (or higher)
263
 
    <indexterm>
264
 
      <primary>KDE</primary>
265
 
      <secondary>requirements</secondary></indexterm>
266
 
  </para>
267
 
  <para>
268
 
  Available from <ulink url="www.kde.org">www.kde.org</ulink>
269
 
  </para>
270
 
  </listitem>
271
 
</itemizedlist>
272
 
 
273
 
<itemizedlist>
274
 
<title>Optional:</title>
275
 
  <listitem><para>
276
 
    The <emphasis><application>ctags</application></emphasis> source navigation tool, from <ulink url="http://ctags.sourceforge.net">http://ctags.sourceforge.net</ulink>, which enables you fast access to declarations and definitions by a few simple clicks on a name in the editor.
277
 
    <indexterm><primary>ctags</primary></indexterm>
278
 
  </para></listitem>
279
 
  <listitem><para>
280
 
    <emphasis><application>dot</application></emphasis>, a graphics language compiler, from <ulink url="http://www.graphviz.org">http:/www.graphviz.org</ulink>. This
281
 
  <!-- ### temporarily disabled until the graphical class browser works again
282
 
  allows you to navigate in a graphical view of your classes' dependencies. Likewise the <application>dot</application> //-->
283
 
  tool is needed in conjunction with &doxygen; below if you want to have class relationships graphically displayed (which is highly recommended).
284
 
    <indexterm><primary>dot</primary></indexterm>
285
 
  </para></listitem>
286
 
  <listitem><para>
287
 
    The <emphasis>&doxygen;</emphasis> documentation tool, from <ulink url="http://www.doxygen.org">http://www.doxygen.org</ulink> if you want to generate concise and powerful API documentation from your projects.
288
 
    <indexterm><primary>doxygen</primary></indexterm>
289
 
  </para></listitem>
290
 
  <listitem><para>
291
 
    <emphasis><application>valgrind</application></emphasis> from <ulink url="http://developer.kde.org/~sewardj/">http://developer.kde.org/~sewardj/</ulink> helps you to find memory management problems in your applications.
292
 
    <indexterm><primary>valgrind</primary></indexterm>
293
 
  </para></listitem>
294
 
  <listitem><para>
295
 
    <emphasis><application>svn</application></emphasis> from <ulink url="http://subversion.tigris.org/">http://subversion.tigris.org/</ulink> if you want to use the svn versioning system.
296
 
    <indexterm>
297
 
      <primary>svn</primary>
298
 
      <secondary>requirements</secondary></indexterm>
299
 
  </para></listitem>
300
 
  <listitem><para>
301
 
  Any other compiler and/or tool in case you want to develop for another language/platform than C++/&kde; or use some special facility.
302
 
  </para></listitem>
303
 
</itemizedlist>
304
 
 
305
 
<note>
306
 
<orderedlist>
307
 
  <listitem>
308
 
    <para>
309
 
    You can, to a certain extent, circumvent the need for &autoconf; &ge; 2.52 and &automake; &ge; 1.6. Just remove the <filename class="directory">admin</filename> directory in your &kdevelop; installation directory and type
310
 
    <indexterm>
311
 
      <primary>autoconf</primary>
312
 
      <secondary>circumvent version need</secondary></indexterm>
313
 
    <indexterm>
314
 
      <primary>automake</primary>
315
 
      <secondary>circumvent version need</secondary></indexterm>
316
 
    <indexterm>
317
 
      <primary>version need</primary>
318
 
      <secondary>circumvent for autoconf/automake</secondary></indexterm>
319
 
    </para>
320
 
    <informalexample><simplelist>
321
 
      <member><prompt>(your-kdevelop-directory)&gt; </prompt>
322
 
      <userinput>ln -s $KDEDIR/share/apps/kdelibs/admin admin</userinput></member>
323
 
    </simplelist></informalexample>
324
 
    <para>
325
 
    at the console. This causes &kdevelop; to use the standard settings in the &kde; <filename class="directory">admin</filename> directory instead.
326
 
    </para>
327
 
  </listitem>
328
 
  <listitem>
329
 
    <para>
330
 
    Be careful <emphasis>not to mix &Qt; versions</emphasis>. Always link &kdevelop; to the same &Qt; version your &kde; library was compiled. Otherwise you will most likely experience <emphasis>very strange</emphasis> behaviours.
331
 
    </para>
332
 
  </listitem>
333
 
</orderedlist>
334
 
</note>
335
 
 
336
 
</sect1> <!-- requirements -->
337
 
 
338
 
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
339
 
 
340
 
<sect1 id="compile-and-install">
341
 
<title>&kdevelop; Compilation and Installation</title>
342
 
 
343
 
<indexterm zone="compile-and-install">
344
 
  <primary>&kdevelop;</primary>
345
 
  <secondary>compilation</secondary></indexterm>
346
 
<indexterm zone="compile-and-install">
347
 
  <primary>&kdevelop;</primary>
348
 
  <secondary>installation</secondary></indexterm>
349
 
 
350
 
<para>
351
 
Once all requirements are met, you are ready to compile and install &kdevelop;. This appendix will discuss the necessary steps to do so.
352
 
</para>
353
 
<itemizedlist>
354
 
  <listitem><para>
355
 
  <link linkend="compile-and-install-preliminaries">Preliminary Steps</link> tells you about setting up a proper environment.
356
 
  </para></listitem>
357
 
  <listitem><para>
358
 
  <link linkend="compile-and-install-make">Compile &kdevelop;</link> deals with obtaining the &kdevelop; sources from svn, how to prepare them for the installation process, and finally shows the steps necessary to compile and install &kdevelop;.
359
 
  </para></listitem>
360
 
  <listitem><para>
361
 
  <link linkend="compile-and-install-options">Some Notes on configure Options</link> tells you how to run &kdevelop; if it has been installed in a location other than the &kde; directory.
362
 
  </para></listitem>
363
 
</itemizedlist>
364
 
 
365
 
<sect2 id="compile-and-install-preliminaries">
366
 
<title>Preliminary Steps</title>
367
 
 
368
 
<indexterm zone="compile-and-install-preliminaries">
369
 
  <primary>preliminaries</primary>
370
 
  <secondary>&kdevelop; installation</secondary></indexterm>
371
 
<indexterm zone="compile-and-install-preliminaries">
372
 
  <primary>KDEDIR</primary></indexterm>
373
 
<indexterm zone="compile-and-install-preliminaries">
374
 
  <primary>QTDIR</primary></indexterm>
375
 
<indexterm zone="compile-and-install-preliminaries">
376
 
  <primary>LD_LIBRARY_PATH</primary></indexterm>
377
 
<indexterm zone="compile-and-install-preliminaries">
378
 
  <primary>LIBRARY_PATH</primary></indexterm>
379
 
<indexterm zone="compile-and-install-preliminaries">
380
 
  <primary>PATH</primary></indexterm>
381
 
 
382
 
<para>
383
 
Before entering the compile sequence you must make sure all libraries and tools are available to the make system. To accomplish this some environment variables need to be properly set. The actual steps to be performed depend on the console shell you use.
384
 
</para>
385
 
 
386
 
<note><para>
387
 
To avoid typing in all the statements that set the necessary environment variables every time you want to compile, you should put them into your <filename>.bashrc</filename> or <filename>.cshrc</filename> file. This way the environment variables will be properly set every time you start the shell.
388
 
</para></note>
389
 
 
390
 
<sect3 id="compile-and-install-preliminaries-bash">
391
 
<title>Setting the Environment for the bash Shell</title>
392
 
 
393
 
<para>
394
 
If you use the bash shell add the following lines:
395
 
</para>
396
 
 
397
 
<informalexample><simplelist>
398
 
  <member><userinput>export KDEDIR=</userinput>(path to your KDE installation)</member>
399
 
  <member><userinput>export QTDIR=</userinput>(path to your Qt library)</member>
400
 
  <member><userinput>export LD_LIBRARY_PATH=$QTDIR/lib:$KDEDIR/lib:$LD_LIBRARY_PATH</userinput></member>
401
 
  <member><userinput>export LIBRARY_PATH=$QTDIR/lib:$KDEDIR/lib:$LIBRARY_PATH</userinput></member>
402
 
  <member><userinput>export PATH=$QTDIR/bin:$KDEDIR/bin:$PATH</userinput></member>
403
 
</simplelist></informalexample>
404
 
<para></para>
405
 
 
406
 
</sect3> <!-- compile-and-install-preliminaries-bash -->
407
 
 
408
 
<sect3 id="compile-and-install-preliminaries-tcsh">
409
 
<title>Setting the Environment for the tcsh Shell</title>
410
 
 
411
 
<para>
412
 
If you use the tcsh shell add the following lines:
413
 
</para>
414
 
<para>
415
 
<informalexample><simplelist>
416
 
  <member><userinput>setenv KDEDIR </userinput>(path to your KDE installation)</member>
417
 
  <member><userinput>setenv QTDIR </userinput>(path to your Qt library)</member>
418
 
  <member><userinput>setenv LD_LIBRARY_PATH=$QTDIR/lib:$KDEDIR/lib:$LD_LIBRARY_PATH</userinput></member>
419
 
  <member><userinput>setenv LIBRARY_PATH $QTDIR/lib:$KDEDIR/lib:$LIBRARY_PATH</userinput></member>
420
 
  <member><userinput>setenv PATH $QTDIR/bin:$KDEDIR/bin:$PATH</userinput></member>
421
 
</simplelist></informalexample>
422
 
</para>
423
 
 
424
 
</sect3> <!-- compile-and-install-preliminaries-tcs -->
425
 
 
426
 
</sect2> <!-- compile-and-install-preliminaries -->
427
 
 
428
 
<sect2 id="compile-and-install-make">
429
 
<title>Compile &kdevelop;</title>
430
 
 
431
 
<indexterm zone="compile-and-install-make">
432
 
  <primary>make</primary>
433
 
  <secondary>&kdevelop; installation</secondary></indexterm>
434
 
<indexterm zone="compile-and-install-make">
435
 
  <primary>compiling</primary>
436
 
  <secondary>&kdevelop;</secondary></indexterm>
437
 
 
438
 
<note><para>
439
 
In the following discussion we assume that you have put your &kdevelop; sources in the <filename class="directory">~/kde3src/kdevelop</filename> directory.
440
 
</para></note>
441
 
 
442
 
<sect3 id="compile-and-install-make-svn">
443
 
<title>Special svn Compilation Considerations</title>
444
 
 
445
 
<para>
446
 
In case you use a &kdevelop; snapshot from svn the initial compilation steps depend on whether you just did a complete checkout or only updated the source.
447
 
</para>
448
 
 
449
 
<variablelist>
450
 
<varlistentry>
451
 
<term id="compile-and-install-make-svn-co">After a svn Checkout</term>
452
 
<listitem>
453
 
<para>
454
 
You must <emphasis>initialize the make system</emphasis> after a fresh checkout. The same is true every time you need to start over from scratch. Type:
455
 
</para>
456
 
 
457
 
<informalexample><simplelist><member>
458
 
  <prompt>~/kde3src/kdevelop&gt; </prompt>
459
 
  <userinput>make -f admin/Makefile.common svn-clean</userinput>
460
 
</member></simplelist></informalexample>
461
 
<para>
462
 
and then <emphasis>all of the following steps</emphasis>.
463
 
</para>
464
 
<note><para>
465
 
You might need access to the svn repository for the clean-up if any corrupted or missing files must be reconstructed.
466
 
</para></note>
467
 
<important><para>
468
 
The <command>svn-clean</command> command will <emphasis>remove every file</emphasis> not in svn from the directory! Make sure to back up any valuable information before you issue this clean-up command.
469
 
</para></important>
470
 
</listitem>
471
 
</varlistentry>
472
 
 
473
 
<varlistentry>
474
 
<term id="compile-and-install-make-svn-up">After a svn Update</term>
475
 
<listitem>
476
 
<para>
477
 
The next step depends on the output of the svn update sequence. If you got something like (there may be a U or a P marker in the leftmost column, both denoting the file has been changed):
478
 
</para>
479
 
 
480
 
<screen>
481
 
U /some_directory_path/Makefile.am
482
 
</screen>
483
 
<para>
484
 
or if you just did a full checkout, you must enter:
485
 
</para>
486
 
<informalexample><simplelist><member>
487
 
  <prompt>~/kde3src/kdevelop&gt; </prompt>
488
 
  <userinput>make -f Makefile.svn</userinput>
489
 
</member></simplelist></informalexample>
490
 
<para>
491
 
before you proceed with <emphasis>all of the following steps</emphasis>.
492
 
</para>
493
 
</listitem>
494
 
</varlistentry>
495
 
</variablelist>
496
 
</sect3> <!-- compile-and-install-make-svn -->
497
 
 
498
 
<sect3 id="compile-and-install-make-basic">
499
 
<title>Basic <command>make</command> Command Sequence</title>
500
 
 
501
 
<para>
502
 
Once the basic make system is set up you must decide which type of the &kdevelop; system you want to use. This is done in the following configure step which builds the actual <filename>Makefile</filename>s the <command>make</command> command will use.
503
 
</para>
504
 
 
505
 
<note><para>
506
 
You may drop the <option>--prefix</option> option in the following <command>configure</command> command lines if you want &kdevelop; be installed in the default &kde; directory. See the <link linkend="compile-and-install-options">Some notes on configure options</link> chapter for this.
507
 
</para></note>
508
 
 
509
 
<variablelist>
510
 
<varlistentry>
511
 
<term>A Debug-Compiled Version</term>
512
 
<listitem>
513
 
<para>
514
 
If you want to keep track of what your &kdevelop; application does at run-time you may build a debug-compiled version. Just command <command>configure</command> to do so:
515
 
</para>
516
 
 
517
 
<informalexample><simplelist><member>
518
 
  <prompt>~/kde3src/kdevelop&gt; </prompt>
519
 
  <userinput>./configure --enable-debug=full --prefix=</userinput>(where-your-kde3-is)
520
 
</member></simplelist></informalexample>
521
 
</listitem>
522
 
</varlistentry>
523
 
 
524
 
<varlistentry>
525
 
<term>A Release-Compiled Version</term>
526
 
<listitem>
527
 
<para>If you only want to use &kdevelop; as-is a (smaller and faster
528
 
running) release version suffices. <command>configure</command> defaults to
529
 
this.</para>
530
 
 
531
 
<informalexample><simplelist><member>
532
 
  <prompt>~/kde3src/kdevelop&gt; </prompt>
533
 
  <userinput>./configure --prefix=</userinput>(where-your-kde3-is)
534
 
</member></simplelist></informalexample>
535
 
 
536
 
<note>
537
 
<para>
538
 
If you want to build your own <link linkend="make-api">API documentation</link> for &kdevelop; you must include yet another option in the <command>configure</command> command:
539
 
</para>
540
 
<informalexample><simplelist>
541
 
  <member><prompt>~/kde3src/kdevelop&gt; </prompt>
542
 
  <userinput>./configure --</userinput>(options-as-above) <userinput>\</userinput></member> <member><userinput>--with-kdelibsdoxy-dir=$KDEDIR/share/doc/HTML/en/kdelibs-apidocs</userinput></member>
543
 
</simplelist></informalexample>
544
 
</note>
545
 
</listitem>
546
 
</varlistentry>
547
 
 
548
 
<varlistentry>
549
 
<term>Make and Install &kdevelop;</term>
550
 
<listitem>
551
 
<para>
552
 
<command>configure</command> will check the system and build some <filename>Makefile</filename>s according to what it found. The <command>make</command> command will use the main <filename>Makefile</filename> by default. Thus
553
 
</para>
554
 
 
555
 
<informalexample><simplelist><member>
556
 
  <prompt>~/kde3src/kdevelop&gt; </prompt>
557
 
  <userinput>make</userinput>
558
 
</member></simplelist></informalexample>
559
 
<para>
560
 
suffices. If necessary, now gain root user rights using the command
561
 
</para>
562
 
<informalexample><simplelist><member>
563
 
  <prompt>~/kde3src/kdevelop&gt; </prompt>
564
 
  <userinput>su</userinput>
565
 
</member></simplelist></informalexample>
566
 
<para>
567
 
and entering the root password. Then install the application:
568
 
</para>
569
 
<informalexample><simplelist><member>
570
 
  <prompt>~/kde3src/kdevelop&gt; </prompt>
571
 
  <userinput>make install</userinput>
572
 
</member></simplelist></informalexample>
573
 
<para>
574
 
That's all. If you installed &kdevelop; in the default &kde; directory you may now run the IDE. Otherwise some additional steps will be necessary as shown in the <link linkend="compile-and-install-options-dir">Non-default installation directory</link> section below.
575
 
</para>
576
 
 
577
 
<note>
578
 
  <para>
579
 
  In fact there usually will have been three &kdevelop;-based applications installed:
580
 
  </para>
581
 
  <itemizedlist>
582
 
    <listitem><para>The &kdevelop; IDE &mdash; this is the place where you will usually work.</para></listitem>
583
 
    <listitem><para>The stand-alone &kdevelop; Assistant documentation browser &mdash; isolates all the powerful documentation facilities of the &kdevelop; IDE in a separate tool. This comes in handy when you want to look up some programming documentation but do not want to start the full IDE.</para></listitem>
584
 
    <listitem><para>The &kdevelop; Designer &mdash; enhances the &Qt; User Interface Designer by &kde; specific elements and integrates nicely in the &kdevelop; IDE.</para></listitem>
585
 
  </itemizedlist>
586
 
</note>
587
 
</listitem>
588
 
</varlistentry>
589
 
</variablelist>
590
 
 
591
 
 
592
 
</sect3> <!-- compile-and-install-make-basic -->
593
 
</sect2> <!-- compile-and-install-make -->
594
 
 
595
 
 
596
 
<sect2 id="compile-and-install-options">
597
 
<title>Some Notes on <command>configure</command> Options</title>
598
 
 
599
 
<sect3 id="compile-and-install-options-dir">
600
 
<title>Non-default Installation Directory</title>
601
 
 
602
 
<indexterm zone="compile-and-install-options-dir">
603
 
  <primary>&kdevelop;</primary>
604
 
  <secondary>installation</secondary>
605
 
  <tertiary>non-default directory</tertiary></indexterm>
606
 
<indexterm zone="compile-and-install-options-dir">
607
 
  <primary>non-default directory</primary></indexterm>
608
 
<indexterm zone="compile-and-install-options-dir">
609
 
  <primary>KDEDIRS</primary></indexterm>
610
 
<indexterm zone="compile-and-install-options-dir">
611
 
  <primary>kbuildsycoca</primary></indexterm>
612
 
 
613
 
<para>
614
 
By default <command>configure</command> prepares the IDE to be installed in the default &kde; directory. This is necessary because &kdevelop; assumes direct access to some tools and parts which reside there. If want to use your own installation directory, you must tell <command>configure</command> this by the <option>--prefix</option> option:
615
 
</para>
616
 
<informalexample><simplelist><member>
617
 
  <prompt>~/kde3src/kdevelop&gt; </prompt>
618
 
  <userinput>./configure --prefix=</userinput>(where-your-kde3-is)
619
 
</member></simplelist></informalexample>
620
 
<para>
621
 
There is a caveat if you do so. You must provide a means for &kdevelop; to access the needed tools and parts in the &kde; directory when running. (You can still use the IDE without doing so, but with very restrained capabilities.)
622
 
</para>
623
 
<para>
624
 
Call up a shell and have the following commands executed before you start &kdevelop; at the shell prompt.
625
 
</para>
626
 
 
627
 
<note><para>
628
 
  <emphasis>Take care to use the plural:</emphasis> It is <quote><envar>KDEDIRS</envar></quote>, not just <quote><envar>KDEDIR</envar></quote>)
629
 
</para></note>
630
 
 
631
 
<informalexample><simplelist>
632
 
  <member>
633
 
    <prompt>~&gt; </prompt>
634
 
    <userinput>export KDEDIRS=/usr/local/kde:/opt/kde3</userinput>
635
 
  </member>
636
 
  <member>
637
 
    <prompt>~&gt; </prompt>
638
 
    <userinput>kbuildsycoca</userinput>
639
 
  </member>
640
 
  <member>
641
 
  (Now start &kdevelop;:)
642
 
  </member>
643
 
  <member>
644
 
    <prompt>~&gt; </prompt>
645
 
    <userinput>kdevelop</userinput>
646
 
  </member>
647
 
</simplelist></informalexample>
648
 
 
649
 
<note><simplelist>
650
 
  <member>The <envar>KDEDIRS</envar> environment variable must be set to the <emphasis>list of active &kde; directories</emphasis> in your system. We use</member>
651
 
  <member><filename class="directory">/usr/local/kde</filename>:<filename class="directory">/opt/kde3</filename></member>
652
 
  <member>as an example only.</member>
653
 
  <member>The <filename class="directory">/usr/local/kde</filename> directory may for instance contain an incomplete &kde; version you compiled for debug purposes, and the <filename class="directory">/opt/kde3</filename> directory may in addition contain the standard &kde; version from your distribution that is used for everyday work.</member>
654
 
</simplelist></note>
655
 
 
656
 
<para>
657
 
In a tcsh shell you must set the environment variables using:
658
 
</para>
659
 
<informalexample><simplelist><member>
660
 
    <prompt>~&gt; </prompt>
661
 
    <userinput>setenv KDEDIRS /usr/local/kde:/opt/kde3</userinput>
662
 
</member></simplelist></informalexample>
663
 
<para>
664
 
The <command>kbuildsycoca</command> command (<quote>build system control cache</quote>) looks around for libraries and caches their location and version, so that &kdevelop; can find them. The caveat is that it takes noticeable time&mdash;and it has to be run any time you call up the shell to start &kdevelop; from a non-default directory. You may want to put the above commands into a shell script to reduce the typing effort.
665
 
</para>
666
 
<para>
667
 
(You could as well put the lines in your <filename>.bashrc</filename> or <filename>.cshrc</filename> file, but this is not advisable as <command>kbuildsycoca</command> will then be run any time you call up the shell.)
668
 
</para>
669
 
 
670
 
<note><para>
671
 
The <command>kbuildsycoca</command> command does not run from within the root. You must call it from a non-root user. (But is <emphasis>not a very good idea</emphasis> after all to do software development from within the root!)
672
 
</para></note>
673
 
</sect3> <!-- compile-and-install-options-dir -->
674
 
 
675
 
<!-- ### put a sect3 with other configuration options here -->
676
 
 
677
 
</sect2> <!-- compile-and-install-options -->
678
 
 
679
 
</sect1> <!-- compile-and-install -->
680
 
 
681
 
<sect1 id="make-api">
682
 
<title>How to Obtain a &kdevelop; API Documentation</title>
683
 
 
684
 
<indexterm zone="make-api">
685
 
  <primary>API</primary>
686
 
  <secondary>&kdevelop;</secondary></indexterm>
687
 
<indexterm zone="make-api">
688
 
  <primary>&kdevelop;</primary>
689
 
  <secondary>API</secondary></indexterm>
690
 
<indexterm zone="make-api">
691
 
  <primary>compiling</primary>
692
 
  <secondary>&kdevelop;</secondary>
693
 
  <tertiary>API</tertiary></indexterm>
694
 
<indexterm zone="make-api">
695
 
  <primary>configure</primary>
696
 
  <secondary>&kdevelop; API</secondary></indexterm>
697
 
 
698
 
<para>
699
 
API is the short form of <quote>Application Program Interface</quote>. Actually such an API cotains a series of descriptions (&ie; calling conventions) by which an application program can access the operating system and other services. In our context, however, a broader definition was adopted. The API of a &kde; or &Qt; application is an abstract of the classes and methods interfaces, a synopsis to be used like a dictionary to navigate the sources.
700
 
</para>
701
 
<para>
702
 
There is a version of the most current API available at the <ulink url="http://www.kdevelop.org/HEAD/doc/api/html/index.html">KDevelop-Home website</ulink>. It will be automatically updated every 24 hours so you can keep up.
703
 
</para>
704
 
<para>
705
 
Alas, this version is best used read-only over the internet. If you do not always have internet access you may as well build your own API documentation from the &kdevelop; sources. To do so, you must tell the automake system where to find the KDELIBS API in your system. This is accomplished by the special option <option>--with-kdelibsdoxy-dir</option> in the <command>configure</command> command when you prepare to compile the &kdevelop; sources:
706
 
</para>
707
 
 
708
 
<informalexample><simplelist>
709
 
  <member>
710
 
    <prompt>~/kde3src/kdevelop&gt; </prompt>
711
 
    <userinput>./configure --</userinput>(options-as-usual)<userinput> \</userinput>
712
 
  </member>
713
 
  <member>
714
 
    <userinput>--with-kdelibsdoxy-dir=$KDEDIR/share/doc/HTML/en/kdelibs-apidocs</userinput>
715
 
  </member>
716
 
</simplelist></informalexample>
717
 
 
718
 
<para>
719
 
(<command>make</command> will replace the global <varname>$KDEDIR</varname> variable with the actual &kde; directory setting recorded therein.) Then issue a <command>make</command> command <link linkend="compile-and-install-make-basic">as usual</link>. After the &kdevelop; IDE has been built you have the option to build the API as well. For this you must issue
720
 
</para>
721
 
<informalexample><simplelist><member>
722
 
  <prompt>~/kde3src/kdevelop&gt; </prompt>
723
 
  <userinput>make apidocs</userinput>
724
 
</member></simplelist></informalexample>
725
 
 
726
 
<para>
727
 
This will build a <filename>Doxyfile</filename> in your &kdevelop; base directory which in turn will be processed by the <application>Doxygen</application> application to build quite a lot of <filename>.html</filename> API files. When this rather lengthy API building process (may last more than an hour on a slow system) finally comes to an end, you must install the API just like you have to install the &kdevelop; IDE itself. If necessary obtain superuser rights by
728
 
</para>
729
 
 
730
 
<informalexample><simplelist><member>
731
 
  <prompt>~/kde3src/kdevelop&gt; </prompt>
732
 
  <userinput>su</userinput>
733
 
</member></simplelist></informalexample>
734
 
 
735
 
<para>
736
 
and entering the root password. Then install the API files:
737
 
</para>
738
 
 
739
 
<informalexample><simplelist><member>
740
 
  <prompt>~/kde3src/kdevelop&gt; </prompt>
741
 
  <userinput>make install-apidox</userinput>
742
 
</member></simplelist></informalexample>
743
 
 
744
 
<para>
745
 
Once this is done, <command>make</command> will inform you about the directory where you can finally look at the API documentation's contents. Note this address, you can use it from  &konqueror; as well as from inside &kdevelop;, in case you have set up the &kdevelop; sources themselves as a project to work on.
746
 
</para>
747
 
 
748
 
<note><para>
749
 
You will most probably see a lot of warning and/or error messages during the API build run by <application>Doxygen</application>. It is best to ignore them, they are of interest to the &kdevelop; developers only. If the API generation ever comes to a successful end, the <filename>.html</filename> API files will be usable.
750
 
</para></note>
751
 
 
752
 
</sect1> <!-- make-api -->
753
 
 
754
 
</appendix> <!-- kdevelop-install -->