Rev 130 | Rev 157 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
116 | holmgren | 1 | Author: Magnus Holmgren <holmgren@debian.org> |
2 | Description: Add local site-pike directories to master.pike.in |
||
2 | magnus | 3 | |
130 | holmgren | 4 | --- a/lib/master.pike.in |
5 | +++ b/lib/master.pike.in |
||
151 | holmgren | 6 | @@ -2137,6 +2137,10 @@ protected void create() |
62 | holmgren | 7 | add_module_path("#lib_prefix#/modules"); |
2 | magnus | 8 | #endif |
9 | magnus | 9 | |
2 | magnus | 10 | + // Debian paths |
106 | holmgren | 11 | + add_include_path("/usr/local/lib/pike"+__REAL_VERSION__+"/include"); |
84 | holmgren | 12 | + add_module_path("/usr/local/lib/pike"+__REAL_VERSION__+"/modules"); |
9 | magnus | 13 | + |
62 | holmgren | 14 | #if "#cflags# "[0]!='#' |
15 | cflags = "#cflags#"; |
||
9 | magnus | 16 | #endif |
130 | holmgren | 17 | --- a/lib/modules/Tools.pmod/Standalone.pmod/module.pike |
18 | +++ b/lib/modules/Tools.pmod/Standalone.pmod/module.pike |
||
19 | @@ -25,9 +25,8 @@ string bin_path=include_path; |
||
84 | holmgren | 20 | // this is not the ideal location for all systems, but it's a start. |
21 | string local_module_path=combine_path(getenv("HOME")||"","lib/pike/modules"); |
||
22 | bool old_style_module = false; |
||
23 | -// we prefer the last element, because if there are more than one |
||
24 | -// master() puts the lib/modules path last. |
||
25 | -string system_module_path=master()->system_module_path[-1]; |
||
26 | + |
||
27 | +string system_module_path="/usr/local/lib/pike"+__REAL_VERSION__+"/modules"; |
||
28 | |||
29 | // where do we install the documentation? |
||
30 | string system_doc_path = master()->doc_prefix; |
||
151 | holmgren | 31 | @@ -184,7 +183,7 @@ void do_make(array(string) cmd) |
84 | holmgren | 32 | extra_args = ({ |
33 | "PIKE="+run_pike, |
||
34 | "SRCDIR="+fix("$src"), |
||
35 | - "MODULE_INSTALL_DIR="+combine_path(__FILE__,"../../.."), |
||
36 | + "MODULE_INSTALL_DIR="+system_module_path, |
||
37 | "LOCAL_MODULE_PATH=" + lmp, |
||
38 | }); |
||
39 | } |
||
151 | holmgren | 40 | @@ -241,6 +240,7 @@ int main(int argc, array(string) argv) |
84 | holmgren | 41 | ({"all",Getopt.NO_ARG,({"--all"}) }), |
42 | ({"make",Getopt.NO_ARG,({"--make"}) }), |
||
43 | ({"auto",Getopt.NO_ARG,({"--auto"}) }), |
||
44 | + ({"debian",Getopt.NO_ARG,({"--debian"}) }), |
||
45 | ({"source",Getopt.HAS_ARG,({"--source"}) }), |
||
46 | ({"query",Getopt.HAS_ARG,({"--query"}) }), |
||
47 | ({"config_args",Getopt.HAS_ARG,({"--configure-args"}) }), |
||
151 | holmgren | 48 | @@ -277,6 +277,9 @@ int main(int argc, array(string) argv) |
84 | holmgren | 49 | case "auto": |
50 | run->depend=run->autoheader=run->autoconf=run->configure=run->make=AUTO; |
||
51 | break; |
||
52 | + |
||
53 | + case "debian": |
||
54 | + system_module_path=master()->system_module_path[-1]; |
||
55 | } |
||
56 | } |
||
57 | |||
151 | holmgren | 58 | @@ -421,7 +424,7 @@ int main(int argc, array(string) argv) |
84 | holmgren | 59 | run_or_fail( ([ "env":getenv()| |
60 | ([ |
||
61 | "PIKE":run_pike, |
||
62 | - "MODULE_INSTALL_DIR":combine_path(__FILE__,"../../.."), |
||
63 | + "MODULE_INSTALL_DIR":system_module_path, |
||
64 | "LOCAL_MODULE_PATH":local_module_path, |
||
65 | ]) |
||
66 | ]), |
||
130 | holmgren | 67 | --- a/src/modules/dynamic_module_makefile.in |
68 | +++ b/src/modules/dynamic_module_makefile.in |
||
69 | @@ -90,13 +90,13 @@ $(OBJS): propagated_variables |
||
84 | holmgren | 70 | # |
71 | install: $(MODULE_INSTALL) |
||
72 | @if test "x$(OBJS)" != "x" ; then \ |
||
73 | - $(TMP_BINDIR)/install_module module.so $(SYSTEM_MODULE_PATH)/$(MODDIR)$(MODULE_WRAPPER_PREFIX)$(MODNAME).so && \ |
||
74 | + $(TMP_BINDIR)/install_module module.so $(DESTDIR)$(SYSTEM_MODULE_PATH)/$(MODDIR)$(MODULE_WRAPPER_PREFIX)$(MODNAME).so && \ |
||
75 | if [ -f $(MODNAME).pdb ]; then \ |
||
76 | - cp $(MODNAME).pdb $(SYSTEM_MODULE_PATH)/$(MODDIR)$(MODULE_WRAPPER_PREFIX); \ |
||
77 | + cp $(MODNAME).pdb $(DESTDIR)$(SYSTEM_MODULE_PATH)/$(MODDIR)$(MODULE_WRAPPER_PREFIX); \ |
||
78 | else :; fi; \ |
||
79 | fi; \ |
||
80 | if test "x$(MODULE_PMOD_IN)" != "x"; then \ |
||
81 | - $(TMP_BINDIR)/install_module module.pmod $(SYSTEM_MODULE_PATH)/$(MODDIR)$(MODNAME).pmod ;\ |
||
82 | + $(TMP_BINDIR)/install_module module.pmod $(DESTDIR)$(SYSTEM_MODULE_PATH)/$(MODDIR)$(MODNAME).pmod ;\ |
||
83 | fi; |
||
84 | |||
85 | # |