Commit e6f4e4d0 authored by David Schulz's avatar David Schulz Committed by Daniel Molkentin

Add Test for Python in GDB makefile for MinGW

Download python if necessary.
Git ignore the python directory.

Task-number: QTCREATORBUG-7305
Change-Id: I03fa3ea404b38e5541d3d0380eb4e0987ceaa811
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
Reviewed-by: default avatarDaniel Molkentin <daniel.molkentin@nokia.com>
parent 863c6b4a
......@@ -76,6 +76,7 @@ doc/html/*
doc/html-dev/*
doc/api/html/*
doc/pluginhowto/html/*
dist/gdb/python
.rcc
.pch
dist/gdb/qtcreator-*
......
......@@ -35,6 +35,18 @@ maketargetdir:
makestagingdir:
test -e ${staging} || mkdir ${staging}
checkunzip:
unzip -v &> /dev/null || mingw-get install msys-unzip
${source}/python.zip: | makesourcedir checkwget
cd ${source} && \
wget http://download.qt.nokia.com/misc/gdb/7.4/build-prerequisits/python.zip && \
touch python.zip
${broot}/python/python.exe: ${source}/python.zip | checkunzip
cd ${broot} && \
unzip ${source}/python.zip
checkwget:
wget -V &> /dev/null || mingw-get install msys-wget-bin
......@@ -76,7 +88,7 @@ ${staging}/lib/libexpat.a: ${source}/expat-${expatversion}.tar.gz | makestagingd
./configure -prefix=${staging} --enable-static && \
${MAKE} && ${MAKE} install
${gdbtargets}: ${targetdir}/gdb-%: ${staging}/lib/libexpat.a ${staging}/lib/libiconv.a ${staging}/gdb-${version}/configure | maketargetdir
${gdbtargets}: ${targetdir}/gdb-%: ${staging}/lib/libexpat.a ${staging}/lib/libiconv.a ${staging}/gdb-${version}/configure | maketargetdir ${broot}/python/python.exe
test -e ${staging}/gdb-${version}-$* || mkdir ${staging}/gdb-${version}-$*
export PYTHONHOME=${pydir} && \
LDFLAGS="L${pydir} -lpthread -ldl -lutil -lpython27" && \
......@@ -90,12 +102,11 @@ ${gdbtargets}: ${targetdir}/gdb-%: ${staging}/lib/libexpat.a ${staging}/lib/libi
strip gdb/gdb.exe && \
cp -T gdb/gdb.exe ${targetdir}/gdb-$*.exe
package: ${gdbtargets}
package: ${gdbtargets} ${broot}/python/python.exe
cp ${staging}/bin/libiconv* ${targetdir} && \
cp ${staging}/bin/libexpat* ${targetdir} && \
cp ${pydir}/python*.dll ${targetdir} && \
cp -r ${pydir}/lib ${targetdir} && \
cp -r ${pydir}/include ${targetdir} && \
mv ${targetdir} ${targetdir}-${arch} && \
tar cvzf ${packagename} qtcreator-gdb-${version}-${arch} && \
mv ${targetdir}-${arch} ${targetdir}
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