File: INSTALL

package info (click to toggle)
lxr 0.3-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 176 kB
  • ctags: 60
  • sloc: perl: 670; makefile: 66
file content (121 lines) | stat: -rw-r--r-- 4,019 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
In order to install LXR, you will need:

 - Perl version 5 or later.
 - A webserver with cgi-script capabilities.

and optionally, to enable the freetext search queries:

 - Glimpse 


If you don't have Perl installed, get it from
<URL:http://www.perl.com/perl/info/software.html>.

If you need a webserver, take a look at Apache at
<URL:http://www.apache.org/>

If you want Glimpse and the freetext searching facilites, visit
<URL:http://glimpse.cs.arizona.edu/>.


LXR has so far been tested on the GNU/Linux operating system using the
Apache webserver.  Other unix-like operating systems and decently
featured webservers should do as well.


To install LXR itself:

 - Set the variables PERLBIN and INSTALLPREFIX in the makefile to
   reflect where the Perl 5 binary is located on your system and where
   you want the LXR files to be installed.

 - Do "make install".

 - Edit $(INSTALLPREFIX)/http/lxr.conf to fit your source code
   installations and needs.

 - Make sure the files in $(INSTALLPREFIX)/http can be reached via
   your webserver.  Make sure your webserver executes the files
   search, source, ident and diff as cgi-scripts.  With the Apache
   webserver this can be accomplished by making 
   $(INSTALLPREFIX)/http/.htaccess contain the following lines:

   <Files ~ (search|source|ident|diff)$>
   SetHandler cgi-script
   </Files>

 - Generate the identifier database.  Go to the directory you
   configured as "dbdir" and do "$(INSTALLPREFIX)/bin/genxref foo",
   where foo is the subdirectory containing the actual source code.

 - (Optional) Generate the Glimpse database.  Go to the directory you
   configured as "dbdir" and do "glimpseindex -H . foo", where foo is
   the same as above.  You might want to add other options to the
   commandline (e.g. "-n"), see the Glimpse documentation for details.


If it doesn't work:

 - Make sure all the permissions are right.  Remember that the
   webserver needs to be able to access most of them.

 - Check that all the Perl scripts find their library files, also when
   executed by the webserver.

The lxr.conf file:

 LXR does not care much about your directory structure, all relevant
 paths can be configured from the lxr.conf file. This file is located
 in the same directory as the perl script files. This makes it
 possible to have different source trees in different directories on
 the web server. 

 LXR recognizes the following options in the configuration file. 

 htmlhead
  The header of all html files. This is a template that
  contains mainly html code but it can also contain some special
  directives, these are documented below.

 htmltail
  Template for bottom of pages.

 htmldir
  Template for the directory listing.

 sourceroot 
  The root of the source that you want to index.

 sourcerootname 
  The name of the root (more....)

 incprefix 
  Where to find source specific include files.

 dbdir 
  Where to find the database files that lxr needs (fileidx xref and 
  the glimpse files).

 glimpsebin 
  Location of the glimpse binary on your system.

 variable 
  This defines a variable that can be used in templates and
  the config file. The syntax is 
    variable: <name>, <text>, <values>, <default>
  <name> is the name of the variable, <text> is a textual description, 
  <values> are the possible values of the variable.
  <default> is the default value of the variable. 

  The <values> field can either be a list starting with a "(" and
  ending with a ")", with elements separated with ",", or it can be 
  [ <filename> ]. In this case the values are read from a file with
  one value on each line.
  
 map - This makes it possible to rewrite directories using variables. 
  The linux sourcecode for instance contains several different
  architectures, the include files for each of these are found in the
  directory /include/asm-<architecture>/. To remap each of these
  according to a variable $a you can specify
    map: /include/asm[^\/]*/ /include/asm-$a/
  Find creative uses for this option :-)