Commit c34c9a50 authored by Guido van Rossum's avatar Guido van Rossum

provide access to $(exec_)prefix

parent 006bf915
......@@ -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
......
......@@ -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;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment