Commit 257ac8fa authored by Stefan H. Holek's avatar Stefan H. Holek

Make it so that version.txt is written on every make install/inplace/instance

and not just when the file is missing. This is a forward port from Zope-2_7-branch.
parent 39f2cf5b
...@@ -51,12 +51,8 @@ build: ...@@ -51,12 +51,8 @@ build:
unbuild: unbuild:
${RMRF} ${BUILD_BASE} ${RMRF} ${BUILD_BASE}
${BASE_DIR}/lib/python/version.txt:
printf "Zope ${MAJOR_VERSION}.${MINOR_VERSION}-${RELEASE_TAG}" >\
"${BASE_DIR}/lib/python/version.txt"
# install: Install a software home. # install: Install a software home.
install: build ${BASE_DIR}/lib/python/version.txt install: build version_txt
${PYTHON} "${BASE_DIR}/setup.py" ${DISTUTILS_OPTS} install \ ${PYTHON} "${BASE_DIR}/setup.py" ${DISTUTILS_OPTS} install \
--home="${PREFIX}" ${BUILD_FLAGS} ${INSTALL_FLAGS} --home="${PREFIX}" ${BUILD_FLAGS} ${INSTALL_FLAGS}
[ -f ${PREFIX}/bin/python ] || ${LN} ${PYTHON} ${PREFIX}/bin/python [ -f ${PREFIX}/bin/python ] || ${LN} ${PYTHON} ${PREFIX}/bin/python
...@@ -109,13 +105,18 @@ clean: unbuild ...@@ -109,13 +105,18 @@ clean: unbuild
${FIND} "${BASE_DIR}" \ ${FIND} "${BASE_DIR}" \
-name '*.py[co]' -o -name '*.so' -o -name '*.o' | ${XARGS} ${RM} -name '*.py[co]' -o -name '*.so' -o -name '*.o' | ${XARGS} ${RM}
# version_txt: create a version file in lib/python/version.txt
version_txt:
printf "Zope ${MAJOR_VERSION}.${MINOR_VERSION}-${RELEASE_TAG}" >\
"${BASE_DIR}/lib/python/version.txt"
# sdist: Create a source distribution file (implies clobber). # sdist: Create a source distribution file (implies clobber).
# #
sdist: clobber sdist_tgz sdist: clobber sdist_tgz
# sdist_tgz: Create a tgz archive file as a source distribution. # sdist_tgz: Create a tgz archive file as a source distribution.
# #
sdist_tgz: ${BASE_DIR}/lib/python/version.txt sdist_tgz: version_txt
${MKDIR} ${TMPDIR} ${MKDIR} ${TMPDIR}
${CD} ${TMPDIR} && ${LN} ${BASE_DIR} ${PACKAGE_NAME} && \ ${CD} ${TMPDIR} && ${LN} ${BASE_DIR} ${PACKAGE_NAME} && \
${TAR} czfh ${BASE_DIR}/${PACKAGE_NAME}.tgz \ ${TAR} czfh ${BASE_DIR}/${PACKAGE_NAME}.tgz \
...@@ -124,7 +125,7 @@ sdist_tgz: ${BASE_DIR}/lib/python/version.txt ...@@ -124,7 +125,7 @@ sdist_tgz: ${BASE_DIR}/lib/python/version.txt
--exclude=makefile \ --exclude=makefile \
--exclude=build-base \ --exclude=build-base \
--exclude=*~ \ --exclude=*~ \
--exclude=.#* ${PACKAGE_NAME} --exclude=.#* ${PACKAGE_NAME}
${RMRF} ${TMPDIR}/${PACKAGE_NAME} ${RMRF} ${TMPDIR}/${PACKAGE_NAME}
# clobber: Make the source tree 'pristine' again. # clobber: Make the source tree 'pristine' again.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment