]> granicus.if.org Git - python/commitdiff
provide access to $(exec_)prefix
authorGuido van Rossum <guido@python.org>
Wed, 12 Jun 1996 04:20:27 +0000 (04:20 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 12 Jun 1996 04:20:27 +0000 (04:20 +0000)
Modules/Makefile.pre.in
Modules/getpath.c

index 69eb540f8ec97f7e660c1ce2e6cc31329ab17109..95321d072a6ab59b905d543cc350ca7fcea646ba 100644 (file)
@@ -106,6 +106,8 @@ clobber:    clean
 
 getpath.o:     getpath.c Makefile
                $(CC) -c $(CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
+                     -DPREFIX='"$(prefix)"' \
+                     -DEXEC_PREFIX='"$(exec_prefix)"' \
                      $(srcdir)/getpath.c
 
 config.c Makefile: Makefile.pre config.c.in $(MAKESETUP) Setup
index 4f49cc3a1f78c77c0d2723a9fbe877d382d5fa41..a502d37a1d140a0ea0b370face1c55cbfcf75eff 100644 (file)
@@ -32,6 +32,14 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #define PYTHONPATH ".:/usr/local/lib/python"
 #endif
 
+#ifndef PREFIX
+#define PREFIX "/usr/local"
+#endif
+
+#ifndef EXEC_PREFIX
+#define EXEC_PREFIX "/usr/local"
+#endif
+
 
 /* This is called once from pythonrun to initialize sys.path.  The
    environment variable PYTHONPATH is fetched and the default path
@@ -65,3 +73,18 @@ Py_GetPath()
        strcpy(p, defpath);
        return buf;
 }
+
+
+/* Similar for Makefile variables $prefix and $exec_prefix */
+
+char *
+Py_GetPrefix()
+{
+       return PREFIX;
+}
+
+char *
+Py_GetExecPrefix()
+{
+       return EXEC_PREFIX;
+}