Test wether we are building on a case-insensitive filesystem (such

as OSX HFS+) and if so add an extension to the python executable, but
only in the build directory, not on the installed python.
This commit is contained in:
Jack Jansen 2001-12-06 21:47:20 +00:00
parent 3ecc1ce529
commit 1999ef4973
4 changed files with 417 additions and 395 deletions

View File

@ -100,6 +100,7 @@ DESTSHARED= $(BINLIBDEST)/lib-dynload
# Executable suffix (.exe on Windows and Mac OS X) # Executable suffix (.exe on Windows and Mac OS X)
EXE= @EXEEXT@ EXE= @EXEEXT@
BUILDEXE= @BUILDEXEEXT@
# Short name and location for Mac OS X Python framework # Short name and location for Mac OS X Python framework
PYTHONFRAMEWORK= @PYTHONFRAMEWORK@ PYTHONFRAMEWORK= @PYTHONFRAMEWORK@
@ -150,6 +151,7 @@ MACHDEP_OBJS= @MACHDEP_OBJS@
UNICODE_OBJS= @UNICODE_OBJS@ UNICODE_OBJS= @UNICODE_OBJS@
PYTHON= python$(EXE) PYTHON= python$(EXE)
BUILDPYTHON= python$(BUILDEXE)
# === Definitions added by makesetup === # === Definitions added by makesetup ===
@ -286,23 +288,23 @@ LIBRARY_OBJS= \
# Rules # Rules
# Default target # Default target
all: $(PYTHON) oldsharedmods sharedmods all: $(BUILDPYTHON) oldsharedmods sharedmods
# Build the interpreter # Build the interpreter
$(PYTHON): Modules/$(MAINOBJ) $(LDLIBRARY) $(BUILDPYTHON): Modules/$(MAINOBJ) $(LDLIBRARY)
$(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ \ $(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ \
Modules/$(MAINOBJ) \ Modules/$(MAINOBJ) \
$(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
platform: $(PYTHON) platform: $(BUILDPYTHON)
./$(PYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform ./$(BUILDPYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
# Build the shared modules # Build the shared modules
sharedmods: $(PYTHON) sharedmods: $(BUILDPYTHON)
case $$MAKEFLAGS in \ case $$MAKEFLAGS in \
*-s*) CC='$(CC)' LDSHARED='$(LDSHARED)' OPT='$(OPT)' ./$(PYTHON) -E $(srcdir)/setup.py -q build;; \ *-s*) CC='$(CC)' LDSHARED='$(LDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
*) CC='$(CC)' LDSHARED='$(LDSHARED)' OPT='$(OPT)' ./$(PYTHON) -E $(srcdir)/setup.py build;; \ *) CC='$(CC)' LDSHARED='$(LDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
esac esac
# buildno should really depend on something like LIBRARY_SRC # buildno should really depend on something like LIBRARY_SRC
@ -484,7 +486,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Modules/$(MAINOBJ): $(PYTHON_HEADERS)
# Test the interpreter (twice, once without .pyc files, once with) # Test the interpreter (twice, once without .pyc files, once with)
TESTOPTS= -l TESTOPTS= -l
TESTPROG= $(srcdir)/Lib/test/regrtest.py TESTPROG= $(srcdir)/Lib/test/regrtest.py
TESTPYTHON= ./$(PYTHON) -E -tt TESTPYTHON= ./$(BUILDPYTHON) -E -tt
test: all platform test: all platform
-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
-$(TESTPYTHON) $(TESTPROG) $(TESTOPTS) -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
@ -544,7 +546,7 @@ bininstall: altbininstall
# Install the interpreter with $(VERSION) affixed # Install the interpreter with $(VERSION) affixed
# This goes into $(exec_prefix) # This goes into $(exec_prefix)
altbininstall: $(PYTHON) altbininstall: $(BUILDPYTHON)
@for i in $(BINDIR); \ @for i in $(BINDIR); \
do \ do \
if test ! -d $$i; then \ if test ! -d $$i; then \
@ -553,7 +555,7 @@ altbininstall: $(PYTHON)
else true; \ else true; \
fi; \ fi; \
done done
$(INSTALL_PROGRAM) $(PYTHON) $(BINDIR)/python$(VERSION)$(EXE) $(INSTALL_PROGRAM) $(BUILDPYTHON) $(BINDIR)/python$(VERSION)$(EXE)
if test -f libpython$(VERSION).so; then \ if test -f libpython$(VERSION).so; then \
$(INSTALL_DATA) libpython$(VERSION).so $(LIBDIR); \ $(INSTALL_DATA) libpython$(VERSION).so $(LIBDIR); \
else true; \ else true; \
@ -583,7 +585,7 @@ XMLLIBSUBDIRS= xml xml/dom xml/parsers xml/sax
LIBSUBDIRS= lib-old lib-tk site-packages test test/output test/data \ LIBSUBDIRS= lib-old lib-tk site-packages test test/output test/data \
encodings email compiler hotshot \ encodings email compiler hotshot \
distutils distutils/command $(XMLLIBSUBDIRS) curses $(MACHDEPS) distutils distutils/command $(XMLLIBSUBDIRS) curses $(MACHDEPS)
libinstall: $(PYTHON) $(srcdir)/Lib/$(PLATDIR) libinstall: $(BUILDPYTHON) $(srcdir)/Lib/$(PLATDIR)
@for i in $(SCRIPTDIR) $(LIBDEST); \ @for i in $(SCRIPTDIR) $(LIBDEST); \
do \ do \
if test ! -d $$i; then \ if test ! -d $$i; then \
@ -639,10 +641,10 @@ libinstall: $(PYTHON) $(srcdir)/Lib/$(PLATDIR)
done done
$(INSTALL_DATA) $(srcdir)/LICENSE $(LIBDEST)/LICENSE.txt $(INSTALL_DATA) $(srcdir)/LICENSE $(LIBDEST)/LICENSE.txt
PYTHONPATH=$(LIBDEST) \ PYTHONPATH=$(LIBDEST) \
./$(PYTHON) -tt $(LIBDEST)/compileall.py -x badsyntax \ ./$(BUILDPYTHON) -tt $(LIBDEST)/compileall.py -x badsyntax \
$(LIBDEST) $(LIBDEST)
PYTHONPATH=$(LIBDEST) \ PYTHONPATH=$(LIBDEST) \
./$(PYTHON) -O $(LIBDEST)/compileall.py -x badsyntax $(LIBDEST) ./$(BUILDPYTHON) -O $(LIBDEST)/compileall.py -x badsyntax $(LIBDEST)
# Create the PLATDIR source directory, if one wasn't distributed.. # Create the PLATDIR source directory, if one wasn't distributed..
$(srcdir)/Lib/$(PLATDIR): $(srcdir)/Lib/$(PLATDIR):
@ -731,7 +733,7 @@ libainstall: all
# Install the dynamically loadable modules # Install the dynamically loadable modules
# This goes into $(exec_prefix) # This goes into $(exec_prefix)
sharedinstall: sharedinstall:
./$(PYTHON) -E $(srcdir)/setup.py install \ ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
--install-scripts=$(BINDIR) \ --install-scripts=$(BINDIR) \
--install-platlib=$(DESTSHARED) --install-platlib=$(DESTSHARED)
@ -802,7 +804,7 @@ Makefile.pre: Makefile.pre.in config.status
config.status: $(srcdir)/configure config.status: $(srcdir)/configure
$(SHELL) $(srcdir)/configure $(CONFIG_ARGS) $(SHELL) $(srcdir)/configure $(CONFIG_ARGS)
.PRECIOUS: config.status $(PYTHON) Makefile Makefile.pre .PRECIOUS: config.status $(BUILDPYTHON) Makefile Makefile.pre
# Some make's put the object file in the current directory # Some make's put the object file in the current directory
.c.o: .c.o:
@ -842,7 +844,7 @@ clean:
find $(srcdir) -name '*.py[co]' -exec rm -f {} ';' find $(srcdir) -name '*.py[co]' -exec rm -f {} ';'
clobber: clean clobber: clean
-rm -f $(PYTHON) $(PGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \ -rm -f $(BUILDPYTHON) $(PGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
tags TAGS \ tags TAGS \
config.cache config.log pyconfig.h Modules/config.c config.cache config.log pyconfig.h Modules/config.c
-rm -rf build platform -rm -rf build platform

View File

@ -62,6 +62,10 @@ Tools/Demos
Build Build
- It is no longer necessary to use --with-suffix when building on a
case-insensitive file system (such as Mac OS X HFS+). In the build
directory an extension is used, but not in the installed python.
C API C API
- PyArg_ParseTupleAndKeywords() requires that the number of entries in - PyArg_ParseTupleAndKeywords() requires that the number of entries in

763
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -198,11 +198,18 @@ AC_ARG_WITH(suffix, [ --with-suffix=.exe set executable suffix],[
*) EXEEXT=$withval;; *) EXEEXT=$withval;;
esac]) esac])
AC_MSG_RESULT($EXEEXT) AC_MSG_RESULT($EXEEXT)
# Test whether we're running on a non-case-sensitive system, in which # Test whether we're running on a non-case-sensitive system, in which
# case we give a warning if no ext is given # case we give a warning if no ext is given
if test -d "python" -a -z "$EXEEXT" AC_SUBST(BUILDEXEEXT)
AC_MSG_CHECKING(for case-insensitive build directory)
if test -d "python"
then then
AC_MSG_WARN(This filesystem is not case-sensitive so you should probably use --with-suffix) AC_MSG_RESULT(yes)
BUILDEXEEXT=.exe
else
AC_MSG_RESULT(no)
BUILDEXEEXT='$(EXEEXT)'
fi fi
case $MACHDEP in case $MACHDEP in