52 |
fi |
fi |
53 |
fi |
fi |
54 |
|
|
55 |
|
export MAKE |
56 |
|
|
57 |
# 'out/' is where we are going to temporarily install our stuff |
# 'out/' is where we are going to temporarily install our stuff |
58 |
# into. |
# into. |
59 |
mkdir ${builddir}/out || {\ |
mkdir ${builddir}/out || {\ |
61 |
exit 1;\ |
exit 1;\ |
62 |
} |
} |
63 |
|
|
64 |
${topdir}/configure \ |
${topdir}/doconf \ |
65 |
--disable-doc \ |
--disable-doc \ |
66 |
--prefix=${builddir}/out \ |
--prefix=${builddir}/out || {\ |
|
--build=$(${topdir}/config.guess) \ |
|
|
--host=avr || {\ |
|
67 |
echo "configure failed"; \ |
echo "configure failed"; \ |
68 |
exit 1; \ |
exit 1; \ |
69 |
} |
} |
70 |
|
|
71 |
# Examine our version ID, and record it (for the final archive name). |
# Examine our version ID, and record it (for the final archive name). |
72 |
set -- $(grep '^#define VERSION' ${builddir}/config.h | tr -d '"') || {\ |
set -- $(grep '^AM_INIT_AUTOMAKE' ${builddir}/configure.in | tr -d ')') || {\ |
73 |
echo "Cannot find VERSION in config.h"; \ |
echo "Cannot find VERSION in configure.in"; \ |
74 |
exit 1; \ |
exit 1; \ |
75 |
} |
} |
76 |
version=$3 |
version=$2 |
77 |
|
|
78 |
# Now, build and install everything. |
# Now, build and install everything. |
79 |
${MAKE} -C ${builddir} all install || {\ |
${topdir}/domake all install || {\ |
80 |
echo "make failed"; \ |
echo "make failed"; \ |
81 |
exit 1; \ |
exit 1; \ |
82 |
} |
} |
106 |
exit 1; \ |
exit 1; \ |
107 |
} |
} |
108 |
|
|
109 |
${MAKE} clean |
${topdir}/domake clean |
110 |
|
|
111 |
echo "All done. Check out ${topdir}/avr-libc-bin-${VERSION}.zip" |
echo "All done. Check out ${topdir}/avr-libc-bin-${version}.zip" |