Subversion Repositories

?revision_form?Rev ?revision_input??revision_submit??revision_endform?

Rev 157 | Rev 238 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

Author: Magnus Holmgren <holmgren@debian.org>
Description: Add local site-pike directories to master.pike.in

--- a/lib/master.pike.in
+++ b/lib/master.pike.in
@@ -2271,6 +2271,10 @@ protected void create()
   add_module_path("#lib_prefix#/modules");
 #endif
 
+  // Debian paths
+  add_include_path("/usr/local/lib/pike"+__REAL_MAJOR__+"."+__REAL_MINOR__+"/include");
+  add_module_path("/usr/local/lib/pike"+__REAL_MAJOR__+"."+__REAL_MINOR__+"/modules");
+
 #if "#cflags# "[0]!='#'
   cflags = "#cflags#";
 #endif
--- a/lib/modules/Tools.pmod/Standalone.pmod/module.pike
+++ b/lib/modules/Tools.pmod/Standalone.pmod/module.pike
@@ -23,9 +23,8 @@ string bin_path=include_path;
 // this is not the ideal location for all systems, but it's a start.
 string local_module_path=combine_path(getenv("HOME")||"","lib/pike/modules");
 bool old_style_module = false;
-// we prefer the last element, because if there are more than one
-// master() puts the lib/modules path last.
-string system_module_path=master()->system_module_path[-1];
+
+string system_module_path="/usr/local/lib/pike"+__REAL_MAJOR__+"."+__REAL_MINOR__+"/modules";
 
 // where do we install the documentation?
 string system_doc_path = master()->doc_prefix;
@@ -182,7 +181,7 @@ void do_make(array(string) cmd)
     extra_args = ({
       "PIKE="+run_pike,
       "SRCDIR="+fix("$src"),
-      "MODULE_INSTALL_DIR="+combine_path(__FILE__,"../../.."),
+      "MODULE_INSTALL_DIR="+system_module_path,
       "LOCAL_MODULE_PATH=" + lmp,
     });
   }
@@ -239,6 +238,7 @@ int main(int argc, array(string) argv)
     ({"all",Getopt.NO_ARG,({"--all"}) }),
     ({"make",Getopt.NO_ARG,({"--make"}) }),
     ({"auto",Getopt.NO_ARG,({"--auto"}) }),
+    ({"debian",Getopt.NO_ARG,({"--debian"}) }),
     ({"source",Getopt.HAS_ARG,({"--source"}) }),
     ({"query",Getopt.HAS_ARG,({"--query"}) }),
     ({"config_args",Getopt.HAS_ARG,({"--configure-args"}) }),
@@ -275,6 +275,9 @@ int main(int argc, array(string) argv)
        case "auto":
          run->depend=run->autoheader=run->autoconf=run->configure=run->make=AUTO;
          break;
+
+       case "debian":
+         system_module_path=master()->system_module_path[-1];
       }
     }
 
@@ -419,7 +422,7 @@ int main(int argc, array(string) argv)
          run_or_fail( ([ "env":getenv()|
                          ([
                            "PIKE":run_pike,
-                           "MODULE_INSTALL_DIR":combine_path(__FILE__,"../../.."),
+                           "MODULE_INSTALL_DIR":system_module_path,
                            "LOCAL_MODULE_PATH":local_module_path,
                          ])
                       ]),
--- a/src/modules/dynamic_module_makefile.in
+++ b/src/modules/dynamic_module_makefile.in
@@ -86,13 +86,13 @@ $(OBJS): propagated_variables
 #
 install: $(MODULE_INSTALL)
        @if test "x$(OBJS)" != "x" ; then \
-         $(TMP_BINDIR)/install_module module.so $(SYSTEM_MODULE_PATH)/$(MODDIR)$(MODULE_WRAPPER_PREFIX)$(MODNAME).so && \
+         $(TMP_BINDIR)/install_module module.so $(DESTDIR)$(SYSTEM_MODULE_PATH)/$(MODDIR)$(MODULE_WRAPPER_PREFIX)$(MODNAME).so && \
          if [ -f $(MODNAME).pdb ]; then \
-           cp $(MODNAME).pdb $(SYSTEM_MODULE_PATH)/$(MODDIR)$(MODULE_WRAPPER_PREFIX); \
+           cp $(MODNAME).pdb $(DESTDIR)$(SYSTEM_MODULE_PATH)/$(MODDIR)$(MODULE_WRAPPER_PREFIX); \
          else :; fi; \
        fi; \
        if test "x$(MODULE_PMOD_IN)" != "x"; then \
-         $(TMP_BINDIR)/install_module module.pmod $(SYSTEM_MODULE_PATH)/$(MODDIR)$(MODNAME).pmod ;\
+         $(TMP_BINDIR)/install_module module.pmod $(DESTDIR)$(SYSTEM_MODULE_PATH)/$(MODDIR)$(MODNAME).pmod ;\
        fi;
 
 #