[Python-checkins] python/dist/src Makefile.pre.in,1.124,1.125 README,1.171,1.172
loewis@users.sourceforge.net
loewis@users.sourceforge.net
Sun, 11 May 2003 13:25:39 -0700
Update of /cvsroot/python/python/dist/src
In directory sc8-pr-cvs1:/tmp/cvs-serv16661
Modified Files:
Makefile.pre.in README
Log Message:
Patch #718286: Support DESTDIR.
Index: Makefile.pre.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/Makefile.pre.in,v
retrieving revision 1.124
retrieving revision 1.125
diff -C2 -d -r1.124 -r1.125
*** Makefile.pre.in 9 May 2003 15:08:38 -0000 1.124
--- Makefile.pre.in 11 May 2003 20:25:33 -0000 1.125
***************
*** 564,568 ****
if test $$i != X; then \
echo $(INSTALL_SHARED) $$i $(DESTSHARED)/`basename $$i`; \
! $(INSTALL_SHARED) $$i $(DESTSHARED)/`basename $$i`; \
fi; \
done
--- 564,568 ----
if test $$i != X; then \
echo $(INSTALL_SHARED) $$i $(DESTSHARED)/`basename $$i`; \
! $(INSTALL_SHARED) $$i $(DESTDIR)$(DESTSHARED)/`basename $$i`; \
fi; \
done
***************
*** 571,577 ****
@for i in $(DESTDIRS); \
do \
! if test ! -d $$i; then \
echo "Creating directory $$i"; \
! $(INSTALL) -d -m $(DIRMODE) $$i; \
else true; \
fi; \
--- 571,577 ----
@for i in $(DESTDIRS); \
do \
! if test ! -d $(DESTDIR)$$i; then \
echo "Creating directory $$i"; \
! $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
else true; \
fi; \
***************
*** 581,589 ****
# Install the interpreter (by creating a hard link to python$(VERSION))
bininstall: altbininstall
! -if test -f $(BINDIR)/$(PYTHON) -o -h $(BINDIR)/$(PYTHON); \
! then rm -f $(BINDIR)/$(PYTHON); \
else true; \
fi
! (cd $(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON))
# Install the interpreter with $(VERSION) affixed
--- 581,589 ----
# Install the interpreter (by creating a hard link to python$(VERSION))
bininstall: altbininstall
! -if test -f $(DESTDIR)$(BINDIR)/$(PYTHON) -o -h $(DESTDIR)$(BINDIR)/$(PYTHON); \
! then rm -f $(DESTDIR)$(BINDIR)/$(PYTHON); \
else true; \
fi
! (cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON))
# Install the interpreter with $(VERSION) affixed
***************
*** 598,613 ****
@for i in $(BINDIR) $(LIBDIR); \
do \
! if test ! -d $$i; then \
echo "Creating directory $$i"; \
! $(INSTALL) -d -m $(DIRMODE) $$i; \
else true; \
fi; \
done
! $(INSTALL_PROGRAM) $(BUILDPYTHON) $(BINDIR)/python$(VERSION)$(EXE)
if test -f libpython$(VERSION)$(SO); then \
if test "$(SO)" = .dll; then \
! $(INSTALL_SHARED) libpython$(VERSION)$(SO) $(BINDIR); \
else \
! $(INSTALL_SHARED) libpython$(VERSION)$(SO) $(LIBDIR)/$(INSTSONAME); \
fi; \
else true; \
--- 598,613 ----
@for i in $(BINDIR) $(LIBDIR); \
do \
! if test ! -d $(DESTDIR)$$i; then \
echo "Creating directory $$i"; \
! $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
else true; \
fi; \
done
! $(INSTALL_PROGRAM) $(BUILDPYTHON) $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE)
if test -f libpython$(VERSION)$(SO); then \
if test "$(SO)" = .dll; then \
! $(INSTALL_SHARED) libpython$(VERSION)$(SO) $(DESTDIR)$(BINDIR); \
else \
! $(INSTALL_SHARED) libpython$(VERSION)$(SO) $(DESTDIR)$(LIBDIR)/$(INSTSONAME); \
fi; \
else true; \
***************
*** 618,629 ****
@for i in $(MANDIR) $(MANDIR)/man1; \
do \
! if test ! -d $$i; then \
echo "Creating directory $$i"; \
! $(INSTALL) -d -m $(DIRMODE) $$i; \
else true; \
fi; \
done
$(INSTALL_DATA) $(srcdir)/Misc/python.man \
! $(MANDIR)/man1/python.1
# Install the library
--- 618,629 ----
@for i in $(MANDIR) $(MANDIR)/man1; \
do \
! if test ! -d $(DESTDIR)$$i; then \
echo "Creating directory $$i"; \
! $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
else true; \
fi; \
done
$(INSTALL_DATA) $(srcdir)/Misc/python.man \
! $(DESTDIR)$(MANDIR)/man1/python.1
# Install the library
***************
*** 650,656 ****
@for i in $(SCRIPTDIR) $(LIBDEST); \
do \
! if test ! -d $$i; then \
echo "Creating directory $$i"; \
! $(INSTALL) -d -m $(DIRMODE) $$i; \
else true; \
fi; \
--- 650,656 ----
@for i in $(SCRIPTDIR) $(LIBDEST); \
do \
! if test ! -d $(DESTDIR)$$i; then \
echo "Creating directory $$i"; \
! $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
else true; \
fi; \
***************
*** 661,667 ****
if test ! -d $$a; then continue; else true; fi; \
b=$(LIBDEST)/$$d; \
! if test ! -d $$b; then \
echo "Creating directory $$b"; \
! $(INSTALL) -d -m $(DIRMODE) $$b; \
else true; \
fi; \
--- 661,667 ----
if test ! -d $$a; then continue; else true; fi; \
b=$(LIBDEST)/$$d; \
! if test ! -d $(DESTDIR)$$b; then \
echo "Creating directory $$b"; \
! $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$b; \
else true; \
fi; \
***************
*** 670,677 ****
do \
if test -x $$i; then \
! $(INSTALL_SCRIPT) $$i $(LIBDEST); \
echo $(INSTALL_SCRIPT) $$i $(LIBDEST); \
else \
! $(INSTALL_DATA) $$i $(LIBDEST); \
echo $(INSTALL_DATA) $$i $(LIBDEST); \
fi; \
--- 670,677 ----
do \
if test -x $$i; then \
! $(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \
echo $(INSTALL_SCRIPT) $$i $(LIBDEST); \
else \
! $(INSTALL_DATA) $$i $(DESTDIR)$(LIBDEST); \
echo $(INSTALL_DATA) $$i $(LIBDEST); \
fi; \
***************
*** 693,717 ****
if test -x $$i; then \
echo $(INSTALL_SCRIPT) $$i $$b; \
! $(INSTALL_SCRIPT) $$i $$b; \
else \
echo $(INSTALL_DATA) $$i $$b; \
! $(INSTALL_DATA) $$i $$b; \
fi;; \
esac; \
done; \
done
! $(INSTALL_DATA) $(srcdir)/LICENSE $(LIBDEST)/LICENSE.txt
! PYTHONPATH=$(LIBDEST) $(RUNSHARED) \
! ./$(BUILDPYTHON) -Wi -tt $(LIBDEST)/compileall.py \
! -x 'badsyntax|site-packages' $(LIBDEST)
! PYTHONPATH=$(LIBDEST) $(RUNSHARED) \
! ./$(BUILDPYTHON) -Wi -tt -O $(LIBDEST)/compileall.py \
! -x 'badsyntax|site-packages' $(LIBDEST)
! PYTHONPATH=$(LIBDEST) $(RUNSHARED) \
! ./$(BUILDPYTHON) -Wi -t $(LIBDEST)/compileall.py \
! -x badsyntax $(LIBDEST)/site-packages
! PYTHONPATH=$(LIBDEST) $(RUNSHARED) \
! ./$(BUILDPYTHON) -Wi -t -O $(LIBDEST)/compileall.py \
! -x badsyntax $(LIBDEST)/site-packages
# Create the PLATDIR source directory, if one wasn't distributed..
--- 693,717 ----
if test -x $$i; then \
echo $(INSTALL_SCRIPT) $$i $$b; \
! $(INSTALL_SCRIPT) $$i $(DESTDIR)$$b; \
else \
echo $(INSTALL_DATA) $$i $$b; \
! $(INSTALL_DATA) $$i $(DESTDIR)$$b; \
fi;; \
esac; \
done; \
done
! $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
! PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
! ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
! -x 'badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
! PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
! ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
! -x 'badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
! PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
! ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
! -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
! PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
! ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
! -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
# Create the PLATDIR source directory, if one wasn't distributed..
***************
*** 730,736 ****
@for i in $(INCLDIRSTOMAKE); \
do \
! if test ! -d $$i; then \
echo "Creating directory $$i"; \
! $(INSTALL) -d -m $(DIRMODE) $$i; \
else true; \
fi; \
--- 730,736 ----
@for i in $(INCLDIRSTOMAKE); \
do \
! if test ! -d $(DESTDIR)$$i; then \
echo "Creating directory $$i"; \
! $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
else true; \
fi; \
***************
*** 739,745 ****
do \
echo $(INSTALL_DATA) $$i $(INCLUDEPY); \
! $(INSTALL_DATA) $$i $(INCLUDEPY); \
done
! $(INSTALL_DATA) pyconfig.h $(CONFINCLUDEPY)/pyconfig.h
# Install the library and miscellaneous stuff needed for extending/embedding
--- 739,745 ----
do \
echo $(INSTALL_DATA) $$i $(INCLUDEPY); \
! $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY); \
done
! $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h
# Install the library and miscellaneous stuff needed for extending/embedding
***************
*** 749,755 ****
@for i in $(LIBDIR) $(LIBP) $(LIBPL); \
do \
! if test ! -d $$i; then \
echo "Creating directory $$i"; \
! $(INSTALL) -d -m $(DIRMODE) $$i; \
else true; \
fi; \
--- 749,755 ----
@for i in $(LIBDIR) $(LIBP) $(LIBPL); \
do \
! if test ! -d $(DESTDIR)$$i; then \
echo "Creating directory $$i"; \
! $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
else true; \
fi; \
***************
*** 758,765 ****
if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
if test "$(SO)" = .dll; then \
! $(INSTALL_DATA) $(LDLIBRARY) $(LIBPL) ; \
else \
! $(INSTALL_DATA) $(LIBRARY) $(LIBPL)/$(LIBRARY) ; \
! $(RANLIB) $(LIBPL)/$(LIBRARY) ; \
fi; \
else \
--- 758,765 ----
if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
if test "$(SO)" = .dll; then \
! $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
else \
! $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
! $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
fi; \
else \
***************
*** 767,790 ****
fi; \
fi
! $(INSTALL_DATA) Modules/config.c $(LIBPL)/config.c
! $(INSTALL_DATA) Modules/$(MAINOBJ) $(LIBPL)/$(MAINOBJ)
! $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(LIBPL)/config.c.in
! $(INSTALL_DATA) Makefile $(LIBPL)/Makefile
! $(INSTALL_DATA) Modules/Setup $(LIBPL)/Setup
! $(INSTALL_DATA) Modules/Setup.local $(LIBPL)/Setup.local
! $(INSTALL_DATA) Modules/Setup.config $(LIBPL)/Setup.config
! $(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(LIBPL)/makesetup
! $(INSTALL_SCRIPT) $(srcdir)/install-sh $(LIBPL)/install-sh
@if [ -s Modules/python.exp -a \
"`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \
echo; echo "Installing support files for building shared extension modules on AIX:"; \
$(INSTALL_DATA) Modules/python.exp \
! $(LIBPL)/python.exp; \
echo; echo "$(LIBPL)/python.exp"; \
$(INSTALL_SCRIPT) $(srcdir)/Modules/makexp_aix \
! $(LIBPL)/makexp_aix; \
echo "$(LIBPL)/makexp_aix"; \
$(INSTALL_SCRIPT) $(srcdir)/Modules/ld_so_aix \
! $(LIBPL)/ld_so_aix; \
echo "$(LIBPL)/ld_so_aix"; \
echo; echo "See Misc/AIX-NOTES for details."; \
--- 767,790 ----
fi; \
fi
! $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
! $(INSTALL_DATA) Modules/$(MAINOBJ) $(DESTDIR)$(LIBPL)/$(MAINOBJ)
! $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
! $(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile
! $(INSTALL_DATA) Modules/Setup $(DESTDIR)$(LIBPL)/Setup
! $(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local
! $(INSTALL_DATA) Modules/Setup.config $(DESTDIR)$(LIBPL)/Setup.config
! $(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup
! $(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
@if [ -s Modules/python.exp -a \
"`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \
echo; echo "Installing support files for building shared extension modules on AIX:"; \
$(INSTALL_DATA) Modules/python.exp \
! $(DESTDIR)$(LIBPL)/python.exp; \
echo; echo "$(LIBPL)/python.exp"; \
$(INSTALL_SCRIPT) $(srcdir)/Modules/makexp_aix \
! $(DESTDIR)$(LIBPL)/makexp_aix; \
echo "$(LIBPL)/makexp_aix"; \
$(INSTALL_SCRIPT) $(srcdir)/Modules/ld_so_aix \
! $(DESTDIR)$(LIBPL)/ld_so_aix; \
echo "$(LIBPL)/ld_so_aix"; \
echo; echo "See Misc/AIX-NOTES for details."; \
***************
*** 793,801 ****
@case "$(MACHDEP)" in beos*) \
echo; echo "Installing support files for building shared extension modules on BeOS:"; \
! $(INSTALL_DATA) Misc/BeOS-NOTES $(LIBPL)/README; \
echo; echo "$(LIBPL)/README"; \
! $(INSTALL_SCRIPT) Modules/ar_beos $(LIBPL)/ar_beos; \
echo "$(LIBPL)/ar_beos"; \
! $(INSTALL_SCRIPT) Modules/ld_so_beos $(LIBPL)/ld_so_beos; \
echo "$(LIBPL)/ld_so_beos"; \
echo; echo "See Misc/BeOS-NOTES for details."; \
--- 793,801 ----
@case "$(MACHDEP)" in beos*) \
echo; echo "Installing support files for building shared extension modules on BeOS:"; \
! $(INSTALL_DATA) Misc/BeOS-NOTES $(DESTDIR)$(LIBPL)/README; \
echo; echo "$(LIBPL)/README"; \
! $(INSTALL_SCRIPT) Modules/ar_beos $(DESTDIR)$(LIBPL)/ar_beos; \
echo "$(LIBPL)/ar_beos"; \
! $(INSTALL_SCRIPT) Modules/ld_so_beos $(DESTDIR)$(LIBPL)/ld_so_beos; \
echo "$(LIBPL)/ld_so_beos"; \
echo; echo "See Misc/BeOS-NOTES for details."; \
***************
*** 809,813 ****
--prefix=$(prefix) \
--install-scripts=$(BINDIR) \
! --install-platlib=$(DESTSHARED)
# Here are a couple of targets for MacOSX again, to install a full
--- 809,814 ----
--prefix=$(prefix) \
--install-scripts=$(BINDIR) \
! --install-platlib=$(DESTSHARED) \
! --root=/$(DESTDIR)
# Here are a couple of targets for MacOSX again, to install a full
***************
*** 834,838 ****
fi
@for i in $(prefix)/Resources/English.lproj $(prefix)/lib; do\
! if test ! -d $$i; then \
echo "Creating directory $$i"; \
$(INSTALL) -d -m $(DIRMODE) $$i; \
--- 835,839 ----
fi
@for i in $(prefix)/Resources/English.lproj $(prefix)/lib; do\
! if test ! -d $(DESTDIR)$$i; then \
echo "Creating directory $$i"; \
$(INSTALL) -d -m $(DIRMODE) $$i; \
***************
*** 876,880 ****
--prefix=$(prefix) \
--install-scripts=$(BINDIR) \
! --install-platlib=$(DESTSHARED)
# This installs a few of the useful scripts in Tools/scripts
--- 877,882 ----
--prefix=$(prefix) \
--install-scripts=$(BINDIR) \
! --install-platlib=$(DESTSHARED) \
! --root=/$(DESTDIR)
# This installs a few of the useful scripts in Tools/scripts
***************
*** 883,887 ****
./$(BUILDPYTHON) $(srcdir)/Tools/scripts/setup.py install \
--prefix=$(prefix) \
! --install-scripts=$(BINDIR)
# Build the toplevel Makefile
--- 885,890 ----
./$(BUILDPYTHON) $(srcdir)/Tools/scripts/setup.py install \
--prefix=$(prefix) \
! --install-scripts=$(BINDIR) \
! --root=/$(DESTDIR)
# Build the toplevel Makefile
Index: README
===================================================================
RCS file: /cvsroot/python/python/dist/src/README,v
retrieving revision 1.171
retrieving revision 1.172
diff -C2 -d -r1.171 -r1.172
*** README 2 May 2003 15:27:59 -0000 1.171
--- README 11 May 2003 20:25:34 -0000 1.172
***************
*** 879,882 ****
--- 879,886 ----
(defaults to the --prefix directory) is given.
+ If DESTDIR is set, it will be taken as the root directory of the
+ installation, and files will be installed into $(DESTDIR)$(prefix),
+ $(DESTDIR)$(exec_prefix), etc.
+
All subdirectories created will have Python's version number in their
name, e.g. the library modules are installed in