re2c: speed up non-cross compile, allow hooks to be run at proper stages
This commit is contained in:
parent
01fc8844e8
commit
5e748dc97d
1 changed files with 15 additions and 9 deletions
|
@ -12,17 +12,23 @@ distfiles="${SOURCEFORGE_SITE}/${pkgname}/${version}/${pkgname}-${version}.tar.g
|
||||||
checksum=a702eb63977af4715555edb41eba3b47bbfdcdb44b566d146869a7db022f1c30
|
checksum=a702eb63977af4715555edb41eba3b47bbfdcdb44b566d146869a7db022f1c30
|
||||||
|
|
||||||
pre_configure() {
|
pre_configure() {
|
||||||
# re2c uses itself to build, but that's not
|
if [ -n "$CROSS_BUILD" ]; then
|
||||||
# possible when cross-compiling. Here it's
|
# re2c uses itself to build, but that's not
|
||||||
# forced to build on the host first, so the
|
# possible when cross-compiling. Here it's
|
||||||
# dependency can be satisfied.
|
# forced to build on the host first, so the
|
||||||
env - PATH=/usr/bin:/usr/sbin ./configure
|
# dependency can be satisfied.
|
||||||
make ${makejobs}
|
env - PATH=/usr/bin:/usr/sbin ./configure
|
||||||
mv re2c host_re2c
|
make ${makejobs}
|
||||||
make clean
|
mv re2c host_re2c
|
||||||
|
make clean
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
post_build() {
|
do_build() {
|
||||||
|
make ${makejobs} ${make_build_args} ${make_build_target}
|
||||||
|
if [ ! -e host_re2c ]; then
|
||||||
|
mv re2c host_re2c
|
||||||
|
fi
|
||||||
./host_re2c -b scanner.re >scanner.cc
|
./host_re2c -b scanner.re >scanner.cc
|
||||||
rm -f re2c scanner.o
|
rm -f re2c scanner.o
|
||||||
make ${make_build_args} ${make_build_target}
|
make ${make_build_args} ${make_build_target}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue