[Zope-Checkins] CVS: Zope/inst/WinBuilders/mk - common.mk:1.1.2.1 python.mk:1.1.2.1 spread.mk:1.1.2.1 spreadwrapper.mk:1.1.2.1 zeo.mk:1.1.2.1 zope.mk:1.1.2.1

Christian Theune ct at gocept.com
Mon May 9 04:07:44 EDT 2005


Update of /cvs-repository/Zope/inst/WinBuilders/mk
In directory cvs.zope.org:/tmp/cvs-serv24822/WinBuilders/mk

Added Files:
      Tag: Zope-2_7-branch
	common.mk python.mk spread.mk spreadwrapper.mk zeo.mk zope.mk 
Log Message:
 - Added WinBuilders in 2.7 flavour


=== Added File Zope/inst/WinBuilders/mk/common.mk ===
BASE_DIR=$(shell pwd)
WIN_BASE_DIR=$(shell cygpath -w $(BASE_DIR))
BUILD_DIR=$(BASE_DIR)/build
WIN_BUILD_DIR=$(shell cygpath -w $(BUILD_DIR))
SRC_DIR=$(BASE_DIR)/src
WIN_SRC_DIR=$(shell cygpath -w $(SRC_DIR))
TMP_DIR=$(BASE_DIR)/tmp
WIN_TMP_DIR=$(shell cygpath -w $(TMP_DIR))
WIN_MAKEFILEDIR=$(shell cygpath -w $(MAKEFILEDIR))

# Root of the Windows drive you're working on.  The setting here is for
# the C: drive and using a default out-of-the-box Cygwin.
CYGROOT=/cygdrive/c

RM=rm -f
RMRF=rm -rf
CD=cd

XCOPY=xcopy /i /s /e /y

CPR=cp -r
CP=cp
MKDIR=mkdir -p
CVS="$(MAKEFILEDIR)/bin/cvs.exe"
TAR=tar
SED=sed
TOUCH=touch
NMAKE=nmake
CSCRIPT=cscript
ECHO=echo
ISS_DIR=$(CYGROOT)/Progra~1/Inno Setup 4
ISS_COMPILER=$(ISS_DIR)/Compil32.exe

$(REQUIRED_FILES):
	if [ -z "$(BASE_DIR)/$@" ]; then echo. &echo. & echo \
                   You must download $(@F) and place it in "$(BASE_DIR)/tmp" &\
                   error 1; fi

PRODUCTS_DIR=build/instance/Products

PYLIBDIR=build/instance/lib/python

ZOPE_CVS_REPOSITORY=:pserver:anonymous at cvs.zope.org:/cvs-repository

CVS=/usr/bin/cvs -z7 -q
CVS_UPDATE=${CVS} update -dP

CVSROOT=:ext:korak.zope.com:/cvs-turbointranet

# Use COPY_AND_WINDOWIZE_LINEENDS like so:
#
#     destination_path: source_path
#               $(COPY_AND_WINDOWIZE_LINEENDS)
#
# Any directories needed to hold destination_path are created.  The file
# is copied from source_path to there, and unix2dos is run on it in its
# new home.  The paths must give file names, not directories; this reflects
# that renaming of files is often needed in these makefiles.
define COPY_AND_WINDOWIZE_LINEENDS
	$(MKDIR) $(@D)
	$(CP) $< $@
	unix2dos $@
	$(TOUCH) $@
endef

=== Added File Zope/inst/WinBuilders/mk/python.mk ===
# The Python and win32all versions.  For Python, both the source tarball
# and the Windows installer must be in tmp/.  For win32all, the Windows
# installer must be in tmp/.  Nothing beyond those is required to
# build Python, and you don't even need a compiler for this part.
PYVERSION=2.3.5
W32ALLVERSION=163

# CAUTION:  Extracting files from Wise installers doesn't really do what
# you expect.  While a Wise installer is a zip file, the zip file
# structure is flat (Wise reconstructs the intended directory structure
# from metadata stored in proprietary FILEnnnn.DAT files also in the
# zip file).  Consequently, the package structure of Python packages is
# lost, and if there's more than one file with the same name, you only
# get "the last one" to be extracted (all files are extracted to the
# same directory).
#
# For Python, this doesn't matter, because we're only sucking out the
# precompiled .pyd and .exe files from the Python installer -- there
# are no name clashes in that set, and it's a pretty safe bet there never
# will be (else Python wouldn't be able to decide which to use!).  We
# use the Python source tarball to get all the non-executable parts we
# need.
#
# For win32all, I'm not sure what all the consequences are.  Zope has
# gotten away with it so far.  Favoring it, Zope makes little use of
# win32all.  Against it, there's (as of the time of this writing) little
# field experience with Windows Zope after Python 2.1.  Python and
# win32all have both gotten hairier since then, and win32all has
# significant package structure with many instances of files with the
# same name in different subtrees.  For now it's poke-and-hope.

PYDIRNAME=Python-$(PYVERSION)
W32ALLDIRNAME=win32all-$(W32ALLVERSION)

# The Python tarball is extracted to PYSRCDIR.
# The contents of the Python installer get extracted to PYEXTRACTDIR.
# The    "      "  "  win32all   "      "     "       " W32EXTRACTDIR.
PYSRCDIR=$(BASE_DIR)/src/$(PYDIRNAME)
PYEXTRACTDIR=$(BASE_DIR)/src/$(PYDIRNAME)-extract
W32EXTRACTDIR=$(BASE_DIR)/src/$(W32ALLDIRNAME)

WIN_PYSRCDIR=$(shell cygpath -w $(PYSRCDIR))
WIN_PYEXTRACTDIR=$(shell cygpath -w $(PYEXTRACTDIR))
WIN_W32EXTRACTDIR=$(shell cygpath -w $(W32EXTRACTDIR))

PYTHON_REQUIRED_FILES=tmp/$(W32ALLDIRNAME).exe \
                      tmp/$(PYDIRNAME).tgz \
                      tmp/$(PYDIRNAME).exe

# Arbitrary files from each of the installers and tarballs, to use as
# targets to force them to get unpacked.
ARB_PYSRCDIR=$(PYSRCDIR)/PCbuild/pcbuild.dsw
ARB_PYEXTRACTDIR=$(PYEXTRACTDIR)/zlib.pyd
ARB_W32EXTRACTDIR=$(W32EXTRACTDIR)/readme.txt

# Building Python just consists of extracting files.
build_python: $(ARB_PYSRCDIR) $(ARB_PYEXTRACTDIR) $(ARB_W32EXTRACTDIR)

# Installing Python consists of copying oodles of files into
# $(BUILD_DIR).
install_python: $(BUILD_DIR)/bin/python.exe

clean_python:
	$(RMRF) $(PYSRCDIR)
	$(RMRF) $(PYEXTRACTDIR)

clean_libs:
	$(RMRF) $(W32EXTRACTDIR)

$(ARB_PYSRCDIR): tmp/$(PYDIRNAME).tgz
	$(MKDIR) "$(SRC_DIR)"
	$(CD) "$(SRC_DIR)" && $(TAR) xvzf ../tmp/$(PYDIRNAME).tgz
	$(TOUCH) "$(ARB_PYSRCDIR)"

$(ARB_PYEXTRACTDIR): tmp/$(PYDIRNAME).exe
	$(MKDIR) "$(PYEXTRACTDIR)"
	"tmp/$(PYDIRNAME).exe" /S /X "$(WIN_PYEXTRACTDIR)"
	$(TOUCH) "$(ARB_PYEXTRACTDIR)"

$(ARB_W32EXTRACTDIR): tmp/$(W32ALLDIRNAME).exe
	$(MKDIR) "$(W32EXTRACTDIR)"
	"tmp/$(W32ALLDIRNAME).exe" /S /X "$(WIN_W32EXTRACTDIR)"
	$(TOUCH) "$(ARB_W32EXTRACTDIR)"

$(BUILD_DIR)/bin/python.exe:
	$(MKDIR) "$(BUILD_DIR)"

	$(MKDIR) "$(BUILD_DIR)/doc"
	$(CP) "$(MAKEFILEDIR)/doc/ZC_PY_DIST_README.txt" "$(BUILD_DIR)/doc"
	$(CP) "$(PYSRCDIR)/LICENSE" "$(BUILD_DIR)/doc/PYTHON_LICENSE.txt"
	unix2dos "$(BUILD_DIR)/doc/PYTHON_LICENSE.txt"
	$(CP) "$(SRC_DIR)/$(W32ALLDIRNAME)/License.txt" \
	      "$(BUILD_DIR)/doc/WIN32ALL_LICENSE.txt"

	$(MKDIR) "$(BUILD_DIR)/bin/DLLs"
	$(XCOPY) "$(WIN_PYEXTRACTDIR)\*.pyd" "$(WIN_BUILD_DIR)\bin\DLLs"

	$(MKDIR) "$(BUILD_DIR)/bin/Lib"
	$(XCOPY) "$(WIN_PYSRCDIR)\Lib\*.py" "$(WIN_BUILD_DIR)\bin\Lib"
	$(MKDIR) "$(BUILD_DIR)/bin/Lib/site-packages"
	$(CP) "$(PYSRCDIR)/Lib/site-packages/README" \
	      "$(BUILD_DIR)/bin/Lib/site-packages"
	$(XCOPY) "$(WIN_W32EXTRACTDIR)\*.pyd" \
	         "$(WIN_BUILD_DIR)\bin\Lib\site-packages"
	$(XCOPY) "$(WIN_W32EXTRACTDIR)\*.dll" \
		 "$(WIN_BUILD_DIR)\bin\Lib\site-packages"
	$(XCOPY) "$(WIN_W32EXTRACTDIR)\*.exe" \
		 "$(WIN_BUILD_DIR)\bin\Lib\site-packages"
	$(XCOPY) "$(WIN_W32EXTRACTDIR)\*.py" \
		 "$(WIN_BUILD_DIR)\bin\Lib\site-packages"

	$(CP) "$(MAKEFILEDIR)/etc/sitecustomize.py" \
	      "$(BUILD_DIR)/bin/Lib/site-packages"

	$(MKDIR) "$(BUILD_DIR)/bin/Include"
	$(XCOPY) "$(WIN_PYSRCDIR)\Include\*.h" "$(WIN_BUILD_DIR)\bin\Include"
	$(XCOPY) "$(WIN_PYSRCDIR)\PC\*.h" "$(WIN_BUILD_DIR)\bin\Include"

	$(MKDIR) "$(BUILD_DIR)/bin/libs"
	$(CP) "$(PYEXTRACTDIR)/python23.lib" "$(BUILD_DIR)/bin/libs"

	$(MKDIR) "$(BUILD_DIR)/bin"
	$(CP) "$(PYEXTRACTDIR)/pythonw.exe" "$(BUILD_DIR)/bin"
	$(CP) "$(PYEXTRACTDIR)/w9xpopen.exe" "$(BUILD_DIR)/bin"
	$(CP) "$(PYEXTRACTDIR)/python23.dll" "$(BUILD_DIR)/bin"
	$(CP) "$(PYEXTRACTDIR)/python.exe" "$(BUILD_DIR)/bin"
	$(TOUCH) "$(BUILD_DIR)/bin/python.exe"



=== Added File Zope/inst/WinBuilders/mk/spread.mk ===
# Justs repackages the Spread binaries.
# Puts binaries into build/bin, and some docs into build/doc.

# See README.txt for system requirements.

# Download the binary distribution of Spread, from http://www.spread.org/.
# Store it in tmp/.  NOTE:  May need to rename it to .tgz (depends on how
# it's downloaded).  The name is of the form spread-bin-n.nn.n.tgz

SPREAD_VERSION=3.17.1
SPREAD_DIR=spread-bin-$(SPREAD_VERSION)
SPREAD_ARCHIVE=$(SPREAD_DIR).tgz
SPREAD_REQUIRED_FILES=tmp/$(SPREAD_ARCHIVE)

REQUIRED_FILES=$(SPREAD_REQUIRED_FILES)

# Unpack the tarball into src/.
build_spread: $(SRC_DIR)/$(SPREAD_DIR)/win/spread.exe

$(SRC_DIR)/$(SPREAD_DIR)/win/spread.exe : tmp/$(SPREAD_ARCHIVE)
	$(MKDIR) "$(SRC_DIR)"
	$(TAR) -C "$(SRC_DIR)" -xvzf tmp/$(SPREAD_ARCHIVE)
	$(TOUCH) $@

# A dumb trick so we don't unpack the tarball multiple times.
$(SRC_DIR)/$(SPREAD_DIR)/license.txt \
$(SRC_DIR)/$(SPREAD_DIR)/Readme.txt \
$(SRC_DIR)/$(SPREAD_DIR)/sample.spread.conf \
		: $(SRC_DIR)/$(SPREAD_DIR)/win/spread.exe
	$(TOUCH) $@

# Copy the Windows stuff from src/ into build/bin/ and build/doc
install_spread: $(BUILD_DIR)/bin/spread.exe \
		$(BUILD_DIR)/bin/sprecv.exe \
		$(BUILD_DIR)/bin/spsend.exe \
		$(BUILD_DIR)/bin/sptuser.exe \
		$(BUILD_DIR)/bin/spflooder.exe \
		$(BUILD_DIR)/doc/SPREAD_LICENSE.txt \
		$(BUILD_DIR)/doc/SPREAD_README.txt \
		$(BUILD_DIR)/doc/sample.spread.conf


$(BUILD_DIR)/bin/spread.exe \
$(BUILD_DIR)/bin/sprecv.exe \
$(BUILD_DIR)/bin/spsend.exe \
$(BUILD_DIR)/bin/sptuser.exe \
$(BUILD_DIR)/bin/spflooder.exe : $(BUILD_DIR)/bin/% : \
				 $(SRC_DIR)/$(SPREAD_DIR)/win/%
	$(MKDIR) $(@D)
	$(CP) $< $@
	$(TOUCH) $@

$(BUILD_DIR)/doc/SPREAD_LICENSE.txt: $(SRC_DIR)/$(SPREAD_DIR)/license.txt
	$(COPY_AND_WINDOWIZE_LINEENDS)

$(BUILD_DIR)/doc/SPREAD_README.txt: $(SRC_DIR)/$(SPREAD_DIR)/Readme.txt
	$(COPY_AND_WINDOWIZE_LINEENDS)

$(BUILD_DIR)/doc/sample.spread.conf: $(SRC_DIR)/$(SPREAD_DIR)/sample.spread.conf
	$(COPY_AND_WINDOWIZE_LINEENDS)


=== Added File Zope/inst/WinBuilders/mk/spreadwrapper.mk ===
# Builds the Python Spread wrapper module.
# Puts:
#     spread.pyd into build/lib/python/
#     testspread.py into build/lib/python/SpreadTest/
#     various text files (Windowsized and renamed) into build/doc

# Download the wrapper module tarball, from
# http://www.python.org/other/spread/.
# Store it in tmp/.  NOTE:  May need to rename it to .tgz (depends on how
# it's downloaded).  The name is of the form SpreadModule-n.n.tgz

# XXX There's no natural way to clean up SPREADWRAPPER_TMPDIR here.

SPREADWRAPPER_VERSION=1.4
SPREADWRAPPER_DIR=SpreadModule-$(SPREADWRAPPER_VERSION)
SPREADWRAPPER_ARCHIVE=$(SPREADWRAPPER_DIR).tgz
SPREADWRAPPER_REQUIRED_FILES=tmp/$(SPREADWRAPPER_ARCHIVE)

REQUIRED_FILES=$(SPREADWRAPPER_REQUIRED_FILES)

SPREADWRAPPER_TMPDIR=src/tmp/spreadwrapper-install

# Unpack the tarball into src/.
build_spreadwrapper: $(SRC_DIR)/$(SPREADWRAPPER_DIR)/spreadmodule.c

# Copy the Windows stuff into the build tree.
install_spreadwrapper: $(BUILD_DIR)/lib/python/spread.pyd \
		       $(BUILD_DIR)/lib/python/SpreadTest/testspread.py \
		       $(BUILD_DIR)/doc/spreadwrapper_doc.txt \
		       $(BUILD_DIR)/doc/SPREADWRAPPER_LICENSE.txt \
		       $(BUILD_DIR)/doc/SPREADWRAPPER_README.txt


$(SRC_DIR)/$(SPREADWRAPPER_DIR)/spreadmodule.c: tmp/$(SPREADWRAPPER_ARCHIVE)
	$(MKDIR) "$(SRC_DIR)"
	$(TAR) -C "$(SRC_DIR)" -xvzf $<
	$(TOUCH) $@

# A dumb trick so we don't unpack the tarball multiple times.
$(SRC_DIR)/$(SPREADWRAPPER_DIR)/doc.txt \
$(SRC_DIR)/$(SPREADWRAPPER_DIR)/LICENSE \
$(SRC_DIR)/$(SPREADWRAPPER_DIR)/README \
$(SRC_DIR)/$(SPREADWRAPPER_DIR)/testspread.py \
		: $(SRC_DIR)/$(SPREADWRAPPER_DIR)/spreadmodule.c
	$(TOUCH) $@


$(SPREADWRAPPER_TMPDIR)/Lib/site-packages/spread.pyd: $(SRC_DIR)/$(SPREADWRAPPER_DIR)/spreadmodule.c
	$(CD) $(SRC_DIR)/$(SPREADWRAPPER_DIR); \
		$(BUILD_DIR)/bin/python.exe setup.py install \
			--prefix=../../$(SPREADWRAPPER_TMPDIR)

$(BUILD_DIR)/lib/python/spread.pyd: $(SPREADWRAPPER_TMPDIR)/Lib/site-packages/spread.pyd
	$(MKDIR) $(@D)
	$(CP) $< $@
	$(TOUCH) $@

$(BUILD_DIR)/doc/spreadwrapper_doc.txt: $(SRC_DIR)/$(SPREADWRAPPER_DIR)/doc.txt
	$(COPY_AND_WINDOWIZE_LINEENDS)

$(BUILD_DIR)/doc/SPREADWRAPPER_LICENSE.txt: $(SRC_DIR)/$(SPREADWRAPPER_DIR)/LICENSE
	$(COPY_AND_WINDOWIZE_LINEENDS)

$(BUILD_DIR)/doc/SPREADWRAPPER_README.txt: $(SRC_DIR)/$(SPREADWRAPPER_DIR)/README
	$(COPY_AND_WINDOWIZE_LINEENDS)

$(BUILD_DIR)/lib/python/SpreadTest/testspread.py: $(SRC_DIR)/$(SPREADWRAPPER_DIR)/testspread.py
	$(COPY_AND_WINDOWIZE_LINEENDS)


=== Added File Zope/inst/WinBuilders/mk/zeo.mk ===
ZODBVERSION=3.2
ZODBDIRNAME=ZODB3-$(ZODBVERSION)
ZEO_REQUIRED_FILES=tmp/$(ZODBDIRNAME).tar.gz

REQUIRED_FILES=$(ZEO_REQUIRED_FILES)\
               $(PYTHON_REQUIRED_FILES)

# run the Zope tests

clean_zope:
	$(RMRF) src/$(ZODBDIRNAME)

install_zeo: src/$(ZODBDIRNAME)/setup.py install_python \
             $(BUILD_DIR)/lib/python/version.txt \
             $(BUILD_DIR)/ZEO-$(ZODBDIRNAME)-win32.exe

ESCAPED=$(shell sh $(MAKEFILEDIR)/bin/escape.sh '$(WIN_MAKEFILEDIR)')
SEDSCRIPT="s@<<VERSION>>@$(ZODBVERSION)@g;s@<<MAKEFILEDIR>>@$(ESCAPED)@g"

$(BUILD_DIR)/ZEO-$(ZODBDIRNAME)-win32.exe: $(BUILD_DIR)/lib/python/version.txt
	$(SED) $(SEDSCRIPT) < "$(MAKEFILEDIR)/etc/zeo.iss.in" | unix2dos > "$(BUILD_DIR)/zeo.iss"

	# Remove CVS directories from the build tree.
	find $(BUILD_DIR) -name CVS -type d -exec $(RMRF) {} \; -prune

	# Convert text files to Windows line ends.  unix2dos has the nice
	# property that it leaves lines with \r\n alone, so it doesn't hurt
	# to do this on files already converted to Windows convention.
	find $(BUILD_DIR) -name "*.py" -o -name "*.txt" -o -name "*.bat" | \
		xargs unix2dos

	# Build the Inno installer.
	$(CD) "$(BUILD_DIR)";"$(ISS_COMPILER)" /cc "$(WIN_BUILD_DIR)\zeo.iss"

$(BUILD_DIR)/lib/python/ExtensionClass.pyd: WIN_TMPDIR=tmp\zeotmp
$(BUILD_DIR)/lib/python/ExtensionClass.pyd: install_python
	$(MKDIR) $(WIN_TMPDIR)
	$(CD) $(SRC_DIR)/$(ZODBDIRNAME); \
            $(BUILD_DIR)/bin/python.exe setup.py install \
            --prefix="$(WIN_BASE_DIR)\$(WIN_TMPDIR)" --no-compile
	$(MKDIR) $(@D)
	$(XCOPY) "$(WIN_TMPDIR)\Lib\site-packages\*.py" "$(shell cygpath -w $(@D))"
	$(XCOPY) "$(WIN_TMPDIR)\Lib\site-packages\*.pyd" "$(shell cygpath -w $(@D))"
	$(XCOPY) "$(WIN_TMPDIR)\Lib\site-packages\*.txt" "$(shell cygpath -w $(@D))"
	$(XCOPY) "$(WIN_TMPDIR)\Lib\site-packages\*.xml" "$(shell cygpath -w $(@D))"
	$(XCOPY) "$(WIN_TMPDIR)\Lib\site-packages\*.conf" "$(shell cygpath -w $(@D))"
	$(XCOPY) "$(WIN_TMPDIR)\Include\*.h" "$(WIN_BUILD_DIR)\bin\Include"
	$(XCOPY) "$(WIN_TMPDIR)\Scripts\*.py" "$(WIN_BUILD_DIR)\bin"
	$(RMRF) $(shell cygpath -u $(WIN_TMPDIR))

$(BUILD_DIR)/lib/python/nt_svcutils/__init__.py: CVS_REPOSITORY=$(ZOPE_CVS_REPOSITORY)
$(BUILD_DIR)/lib/python/nt_svcutils/__init__.py: CVS_MODULE=Zope/lib/python/nt_svcutils
$(BUILD_DIR)/lib/python/nt_svcutils/__init__.py: CVS_TAG=-r HEAD

$(BUILD_DIR)/lib/python/nt_svcutils/__init__.py:
	${CD} ${BUILD_DIR}/lib/python && \
	${CVS} -d ${CVS_REPOSITORY} export ${CVS_TAG} -d \
        $(shell basename $(@D)) ${CVS_MODULE}

$(BUILD_DIR)/skel/README.txt:
	$(MKDIR) "$(@D)"
	$(CPR) $(MAKEFILEDIR)/zeo_addons/skel/* $(@D)
	$(TOUCH) "$@"

$(BUILD_DIR)/bin/mkzeoinstance.py:
	$(MKDIR) "$(@D)"
	$(CPR) $(MAKEFILEDIR)/zeo_addons/utilities/* $(@D)
	$(TOUCH) "$(@)"

$(BUILD_DIR)/lib/python/version.txt: $(BUILD_DIR)/lib/python/ExtensionClass.pyd $(BUILD_DIR)/lib/python/nt_svcutils/__init__.py $(BUILD_DIR)/skel/README.txt $(BUILD_DIR)/bin/mkzeoinstance.py
	@echo ZEO $(ZODBVERSION) > "$(BUILD_DIR)/lib/python/version.txt"
	$(TOUCH) $@

src/$(ZODBDIRNAME)/setup.py:
	$(MKDIR) "$(SRC_DIR)"
	$(CD) "$(SRC_DIR)" && $(TAR) xvzf ../tmp/$(ZODBDIRNAME).tar.gz
	$(TOUCH) $@


=== Added File Zope/inst/WinBuilders/mk/zope.mk ===
ZOPE_REQUIRED_FILES=tmp/$(ZOPEDIRNAME).tgz

REQUIRED_FILES=$(PYTHON_REQUIRED_FILES)\
               $(ZOPE_REQUIRED_FILES)

ZOPEVERSION=2.7.6-final
ZOPEDIRNAME=Zope-$(ZOPEVERSION)

MAKEZOPE="$(MAKEFILEDIR)/bin/makezope.bat" "$(WIN_BUILD_DIR)"
# run the Zope tests
test_zope:
	$(CD) "$(BASE_DIR)/src/Zope"
	"$(PYPCBUILDDIR)/python.exe" utilities/testrunner.py -a
	$(CD) "$(BASE_DIR)"

clean_zope:
	$(RMRF) src/$(ZOPEDIRNAME)

install_zope: src/$(ZOPEDIRNAME)/inst/configure.py install_python \
              $(BUILD_DIR)/Zope-$(ZOPEVERSION)-win32.exe

ESCAPED=$(shell sh $(MAKEFILEDIR)/bin/escape.sh '$(WIN_MAKEFILEDIR)')
SEDSCRIPT="s@<<VERSION>>@$(ZOPEVERSION)@g;s@<<MAKEFILEDIR>>@$(ESCAPED)@g"

$(BUILD_DIR)/Zope-$(ZOPEVERSION)-win32.exe: $(BUILD_DIR)/lib/python/version.txt
	$(SED) $(SEDSCRIPT) < "$(MAKEFILEDIR)/etc/zope.iss.in" | unix2dos > "$(BUILD_DIR)/zope.iss"

	# Remove CVS directories from the build tree.
	find $(BUILD_DIR) -name CVS -type d -exec $(RMRF) {} \; -prune

	# Convert text files to Windows line ends.  unix2dos has the nice
	# property that it leaves lines with \r\n alone, so it doesn't hurt
	# to do this on files already converted to Windows convention.
	find $(BUILD_DIR) -name "*.py" -o -name "*.txt" -o -name "*.bat" | \
		xargs unix2dos

	# Build the Inno installer.
	$(CD) "$(BUILD_DIR)";"$(ISS_COMPILER)" /cc "$(WIN_BUILD_DIR)\zope.iss"

$(BUILD_DIR)/lib/python/Zope/Startup/run.py:
	$(CD) "$(BUILD_DIR)"; \
	bin/python.exe \
            "$(WIN_SRC_DIR)\$(ZOPEDIRNAME)\inst\configure.py" \
            --prefix="$(WIN_BUILD_DIR)" --no-compile
	$(MAKEZOPE)
	$(TOUCH) "$(BUILD_DIR)/lib/python/Zope/Startup/run.py"

$(BUILD_DIR)/lib/python/version.txt: $(BUILD_DIR)/lib/python/Zope/Startup/run.py
	@echo Zope $(ZOPEVERSION) > "$(BUILD_DIR)/lib/python/version.txt"
	$(TOUCH) "$(BUILD_DIR)/lib/python/version.txt"

src/$(ZOPEDIRNAME)/inst/configure.py:
	$(MKDIR) "$(SRC_DIR)"
	$(CD) "$(SRC_DIR)" && $(TAR) xvzf ../tmp/$(ZOPEDIRNAME).tgz \
           && $(TOUCH) $(ZOPEDIRNAME)/inst/configure.py



More information about the Zope-Checkins mailing list