summaryrefslogtreecommitdiffstats
path: root/Makefile.pre.in
diff options
context:
space:
mode:
authordoko@ubuntu.com <doko@ubuntu.com>2016-06-14 06:55:19 (GMT)
committerdoko@ubuntu.com <doko@ubuntu.com>2016-06-14 06:55:19 (GMT)
commit5553231b91e05cf93827b33a79aebe62c4370a09 (patch)
tree954bd7ebb02bc705d1df336f616aedea979ea1b3 /Makefile.pre.in
parentc09087680eb908406d7331323e92a657182c7b89 (diff)
downloadcpython-5553231b91e05cf93827b33a79aebe62c4370a09.zip
cpython-5553231b91e05cf93827b33a79aebe62c4370a09.tar.gz
cpython-5553231b91e05cf93827b33a79aebe62c4370a09.tar.bz2
- Issue #23968: Rename the platform directory from plat-$(MACHDEP) to
plat-$(PLATFORM_TRIPLET). Rename the config directory (LIBPL) from config-$(LDVERSION) to config-$(LDVERSION)-$(PLATFORM_TRIPLET). Install the platform specifc _sysconfigdata module into the platform directory and rename it to include the ABIFLAGS.
Diffstat (limited to 'Makefile.pre.in')
-rw-r--r--Makefile.pre.in22
1 files changed, 19 insertions, 3 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 02a0b64..394a735 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -109,6 +109,7 @@ MACHDEP= @MACHDEP@
# Multiarch directory (may be empty)
MULTIARCH= @MULTIARCH@
+MULTIARCH_CPPFLAGS = @MULTIARCH_CPPFLAGS@
# Install prefix for architecture-independent files
prefix= @prefix@
@@ -784,6 +785,7 @@ Python/dynload_hpux.o: $(srcdir)/Python/dynload_hpux.c Makefile
Python/sysmodule.o: $(srcdir)/Python/sysmodule.c Makefile
$(CC) -c $(PY_CORE_CFLAGS) \
-DABIFLAGS='"$(ABIFLAGS)"' \
+ $(MULTIARCH_CPPFLAGS) \
-o $@ $(srcdir)/Python/sysmodule.c
$(IO_OBJS): $(IO_H)
@@ -1263,7 +1265,7 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
else true; \
fi; \
done
- @for i in $(srcdir)/Lib/*.py `cat pybuilddir.txt`/_sysconfigdata.py; \
+ @for i in $(srcdir)/Lib/*.py; \
do \
if test -x $$i; then \
$(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \
@@ -1298,6 +1300,10 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
esac; \
done; \
done
+ $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(ABIFLAGS).py \
+ $(DESTDIR)$(LIBDEST)/$(PLATDIR); \
+ echo $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(ABIFLAGS).py \
+ $(LIBDEST)/$(PLATDIR)
$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \
$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
@@ -1336,13 +1342,19 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
# Create the PLATDIR source directory, if one wasn't distributed..
+# For multiarch targets, use the plat-linux/regen script.
$(srcdir)/Lib/$(PLATDIR):
mkdir $(srcdir)/Lib/$(PLATDIR)
- cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen
+ if [ -n "$(MULTIARCH)" ]; then \
+ cp $(srcdir)/Lib/plat-linux/regen $(srcdir)/Lib/$(PLATDIR)/regen; \
+ else \
+ cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen; \
+ fi; \
export PATH; PATH="`pwd`:$$PATH"; \
export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
export EXE; EXE="$(BUILDEXE)"; \
+ export CC; CC="$(CC)"; \
if [ -n "$(MULTIARCH)" ]; then export MULTIARCH; MULTIARCH=$(MULTIARCH); fi; \
export PYTHON_FOR_BUILD; \
if [ "$(BUILD_GNU_TYPE)" = "$(HOST_GNU_TYPE)" ]; then \
@@ -1350,6 +1362,7 @@ $(srcdir)/Lib/$(PLATDIR):
else \
PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)"; \
fi; \
+ export H2PY; H2PY="$$PYTHON_FOR_BUILD $(abs_srcdir)/Tools/scripts/h2py.py"; \
cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen
python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh
@@ -1448,7 +1461,7 @@ sharedinstall: sharedmods
--install-scripts=$(BINDIR) \
--install-platlib=$(DESTSHARED) \
--root=$(DESTDIR)/
- -rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata.py
+ -rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata_$(ABIFLAGS).py
-rm -r $(DESTDIR)$(DESTSHARED)/__pycache__
# Here are a couple of targets for MacOSX again, to install a full
@@ -1627,6 +1640,9 @@ clobber: clean profile-removal
-rm -rf build platform
-rm -rf $(PYTHONFRAMEWORKDIR)
-rm -f python-config.py python-config
+ if [ -n "$(MULTIARCH)" ]; then \
+ rm -rf $(srcdir)/Lib/$(PLATDIR); \
+ fi
# Make things extra clean, before making a distribution:
# remove all generated files, even Makefile[.pre]