[Python-checkins] CVS: python/dist/src/Mac/OSX Makefile,1.4,1.4.12.1

Jack Jansen jackjansen@users.sourceforge.net
Sun, 24 Feb 2002 15:03:49 -0800


Update of /cvsroot/python/python/dist/src/Mac/OSX
In directory usw-pr-cvs1:/tmp/cvs-serv21981

Modified Files:
      Tag: release22-maint
	Makefile 
Log Message:
Backport of 1.5 thru 1.8:
- Use full paths for Rez and DeRez, which may not be on $PATH. Fixes bug
#509074.
- Also install the Tools directory on "make installmacsubtree".
- Added a note that you have to add Mac/Lib to sys.path after doing
a "make installmacsubtree".
- Include errors.rsrc in the Python.app resource file, so the error strings
are available in MacOS API exceptions.



Index: Makefile
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/OSX/Makefile,v
retrieving revision 1.4
retrieving revision 1.4.12.1
diff -C2 -d -r1.4 -r1.4.12.1
*** Makefile	11 Sep 2001 13:00:16 -0000	1.4
--- Makefile	24 Feb 2002 23:03:47 -0000	1.4.12.1
***************
*** 19,22 ****
--- 19,24 ----
  CC=cc
  LD=cc
+ REZ=/Developer/Tools/Rez
+ DEREZ=/Developer/Tools/DeRez
  
  OBJECTS=$(PYTHONBUILDDIR)/Mac/Python/macmain.o \
***************
*** 29,33 ****
  APPTEMPLATE=$(PYTHONBUILDDIR)/Mac/OSXResources/app
  APPSUBDIRS=MacOS Resources Resources/English.lproj
! RESOURCEFILE_ASINGLE=$(PYTHONBUILDDIR)/Mac/Resources/dialogs.rsrc
  RESOURCEFILE=python.rsrc
  RFCONVERTER=$(PYTHONBUILDDIR)/Mac/Lib/applesingle.py
--- 31,35 ----
  APPTEMPLATE=$(PYTHONBUILDDIR)/Mac/OSXResources/app
  APPSUBDIRS=MacOS Resources Resources/English.lproj
! RESOURCEDIR=$(PYTHONBUILDDIR)/Mac/Resources
  RESOURCEFILE=python.rsrc
  RFCONVERTER=$(PYTHONBUILDDIR)/Mac/Lib/applesingle.py
***************
*** 72,76 ****
  	$(INSTALL_PROGRAM) pythonforbundle $(APPINSTALLDIR)/Contents/MacOS/python
  	# Create a temporary version of the resources here
! 	$(PYTHON) $(RFCONVERTER) -r $(RESOURCEFILE_ASINGLE) $(RESOURCEFILE)
  	$(INSTALL_DATA) $(RESOURCEFILE) $(APPINSTALLDIR)/Contents/Resources/$(RESOURCEFILE)
  		
--- 74,82 ----
  	$(INSTALL_PROGRAM) pythonforbundle $(APPINSTALLDIR)/Contents/MacOS/python
  	# Create a temporary version of the resources here
! 	$(PYTHON) $(RFCONVERTER) -r $(RESOURCEDIR)/dialogs.rsrc dialogs.rsrc
! 	$(PYTHON) $(RFCONVERTER) -r $(RESOURCEDIR)/errors.rsrc errors.rsrc
! 	$(DEREZ) -useDF -skip ckid dialogs.rsrc > dialogs.r
! 	$(DEREZ) -useDF -skip ckid errors.rsrc > errors.r
! 	$(REZ) -useDF -o $(RESOURCEFILE) dialogs.r errors.r 
  	$(INSTALL_DATA) $(RESOURCEFILE) $(APPINSTALLDIR)/Contents/Resources/$(RESOURCEFILE)
  		
***************
*** 80,85 ****
  	lib-scriptpackages/Finder lib-scriptpackages/Netscape lib-scriptpackages/StdSuites \
  	mkcwproject mkcwproject/template mkcwproject/template-carbon mkcwproject/template-ppc
  installmacsubtree:
! 	@for i in $(LIBDEST); \
  	do \
  		if test ! -d $$i; then \
--- 86,94 ----
  	lib-scriptpackages/Finder lib-scriptpackages/Netscape lib-scriptpackages/StdSuites \
  	mkcwproject mkcwproject/template mkcwproject/template-carbon mkcwproject/template-ppc
+ TOOLSDEST=$(INSTALLDIR)/Mac/Tools
+ TOOLSSRC=$(PYTHONBUILDDIR)/Mac/Tools
+ TOOLSSUBDIRS=IDE
  installmacsubtree:
! 	@for i in $(LIBDEST) $(TOOLSDEST); \
  	do \
  		if test ! -d $$i; then \
***************
*** 134,135 ****
--- 143,183 ----
  		done; \
  	done
+ 	@for d in $(TOOLSSUBDIRS); \
+ 	do \
+ 		a=$(TOOLSSRC)/$$d; \
+ 		if test ! -d $$a; then continue; else true; fi; \
+ 		b=$(TOOLSDEST)/$$d; \
+ 		if test ! -d $$b; then \
+ 			echo "Creating directory $$b"; \
+ 			$(INSTALL) -d -m $(DIRMODE) $$b; \
+ 		else	true; \
+ 		fi; \
+ 	done
+ 	@for d in $(TOOLSSUBDIRS); \
+ 	do \
+ 		a=$(TOOLSSRC)/$$d; \
+ 		if test ! -d $$a; then continue; else true; fi; \
+ 		b=$(TOOLSDEST)/$$d; \
+ 		for i in $$a/*; \
+ 		do \
+ 			case $$i in \
+ 			*CVS) ;; \
+ 			*.py[co]) ;; \
+ 			*.orig) ;; \
+ 			*~) ;; \
+ 			*) \
+ 				if test -d $$i; then continue; fi; \
+ 				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
+ 
+ 	@echo '** Copy the contents of sample_sitecustomize.py (or similar code) into'
+ 	@echo '**' $(INSTALLDIR)/lib/python2.2/sitecustomize.py
+