]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/PREFIX_not_honoured_for_underlaydir.mdwn
web commit by EdAvis
[ikiwiki.git] / doc / bugs / PREFIX_not_honoured_for_underlaydir.mdwn
1 I built ikiwiki using
2
3 % perl Makefile.PL PREFIX=/home/ed
4 % make
5 % make install
6
7 This installs the files under /home/ed, for example one of the lines it prints is
8
9 cp -a basewiki/* /home/ed/share/ikiwiki/basewiki
10
11 However when I try to run ikiwiki I get an error as follows:
12
13 % ikiwiki --verbose ~/wikiwc/ ~/public_html/wiki/ --url=http://membled.com/wiki/ 
14 Can't stat /usr/share/ikiwiki/basewiki: No such file or directory 
15  at /home/ed/lib/perl5/site_perl/5.8.7/IkiWiki/Render.pm line 349 
16
17 The PREFIX specified at build time should also affect the share directory -
18 it shouldn't try to use /usr/share here.
19
20         Actually, the PREFIX, no matter where you specify it, is only
21         intended to control where files are _installed_, not where they're
22         looked for at runtime.
23
24         There's a good reason not to make PREFIX be used to actually
25         change the program's behavior: Most packaging systems use PREFIX
26         when building the package, to make it install into a temporary
27         directory which gets packaged up.
28
29 This is not the case.  That is the difference between PREFIX and DESTDIR.
30
31 DESTDIR does what you describe; it causes the files to be installed into some
32 directory you specify, which may not be the same place you'd eventually
33 run it from.
34
35 PREFIX means build the software to run under the location given.  Normally it
36 will also affect the location files are copied to, so that 'make install'
37 installs a working system.
38
39 At least, that's the way I've always understood it; the MakeMaker documentation
40 isn't entirely clear (perhaps because ordinary Perl modules do not need to be
41 configured at build time depending on the installation directory).  It does mention
42 that DESTDIR is the thing used by packaging tools.
43
44         It would probably be nice if ikiwiki offered a separate build-time
45         setting to control where it looked for its data files, though it already
46         offers a way to do it at runtime (--underlaydir and --templatedir).
47
48         --[[Joey]]