Commit 56b9486e authored by Chris McDonough's avatar Chris McDonough

Change directories for build-tmp, build-lib, and build-scripts so they don't...

Change directories for build-tmp, build-lib, and build-scripts so they don't get copied to the install directory during 'make install'.

Also, change 'make clean' to remove '.so' files and not try to remove core files.
parent cbc068da
...@@ -15,11 +15,10 @@ BASE_DIR=<<BASE_DIR>> ...@@ -15,11 +15,10 @@ BASE_DIR=<<BASE_DIR>>
BUILD_BASE=<<BUILD_BASE>> BUILD_BASE=<<BUILD_BASE>>
DISTUTILS_OPTS=<<DISTUTILS_OPTS>> DISTUTILS_OPTS=<<DISTUTILS_OPTS>>
INSTALL_FLAGS=<<INSTALL_FLAGS>> INSTALL_FLAGS=<<INSTALL_FLAGS>>
BUILD_SUBDIR=build
BUILD_FLAGS=--build-base="${BUILD_BASE}" \ BUILD_FLAGS=--build-base="${BUILD_BASE}" \
--build-lib="${BUILD_BASE}/${BUILD_SUBDIR}" \ --build-lib="${BUILD_BASE}/build-lib" \
--build-scripts="${BUILD_BASE}/${BUILD_SUBDIR}/build_scripts.tmp" \ --build-scripts="${BUILD_BASE}/build-scripts"\
--build-temp="${BUILD_BASE}/${BUILD_SUBDIR}/build_temp.tmp" --build-temp="${BUILD_BASE}/build-temp"
RM=rm -f RM=rm -f
RMRF=rm -rf RMRF=rm -rf
...@@ -78,8 +77,8 @@ test: inplace ...@@ -78,8 +77,8 @@ test: inplace
${PYTHON} "${BASE_DIR}/utilities/testrunner.py" ${TESTOPTS} ${PYTHON} "${BASE_DIR}/utilities/testrunner.py" ${TESTOPTS}
clean: clean:
${RMRF} "${BUILD_BASE}/${BUILD_SUBDIR}" ${RMRF} "${BUILD_BASE}"
${FIND} "${BASE_DIR}" -name '*.py[co]' -o -name 'core*' | ${XARGS} ${RM} ${FIND} "${BASE_DIR}" \
-name '*.py[co]' -o -name '*.so' -o -name '*.o' | ${XARGS} ${RM}
clobber: clean untestinst clobber: clean untestinst
${FIND} "${BASE_DIR}/lib/python" -name '*.so' | ${XARGS} ${RM}
...@@ -32,7 +32,7 @@ def main(): ...@@ -32,7 +32,7 @@ def main():
# below assumes this script is in the BASE_DIR/inst directory # below assumes this script is in the BASE_DIR/inst directory
global PREFIX global PREFIX
BASE_DIR=os.path.abspath(os.path.dirname(os.path.dirname(sys.argv[0]))) BASE_DIR=os.path.abspath(os.path.dirname(os.path.dirname(sys.argv[0])))
BUILD_BASE=os.getcwd() BUILD_BASE=os.path.join(os.getcwd(), 'build-base')
PYTHON=sys.executable PYTHON=sys.executable
MAKEFILE=open(os.path.join(BASE_DIR, 'inst', IN_MAKEFILE)).read() MAKEFILE=open(os.path.join(BASE_DIR, 'inst', IN_MAKEFILE)).read()
REQUIRE_LF_ENABLED = 1 REQUIRE_LF_ENABLED = 1
...@@ -83,7 +83,7 @@ def main(): ...@@ -83,7 +83,7 @@ def main():
} }
for k,v in idata.items(): for k,v in idata.items():
MAKEFILE = MAKEFILE.replace(k, v) MAKEFILE = MAKEFILE.replace(k, v)
f = open(os.path.join(BUILD_BASE, 'makefile'), 'w') f = open(os.path.join(os.getcwd(), 'makefile'), 'w')
f.write(MAKEFILE) f.write(MAKEFILE)
print " - Makefile written." print " - Makefile written."
print print
......
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