Improve the process for GNU tools

Do not run configure on each run when MKUPDATE=yes
The .WAIT serialization instruction between fetching and other
configure sources was raising a new run of configure at each
compilation. Avoid it by using two rules.

Change-Id: Ie24950ccbb5c5067f3c1ea57b7bd8294e4c9445e
This commit is contained in:
Antoine Leca 2016-08-29 13:48:31 +02:00 committed by Lionel Sambuc
parent 6ddb33542a
commit adb8d69984
2 changed files with 11 additions and 7 deletions

View File

@ -28,17 +28,21 @@ GNUHOSTDIST?= ${.CURDIR}/../../gnu/dist/${MODULE}
.if defined(__MINIX)
# AL - MINIX /usr/src does not have the sources for the GNU utilities
# in-tree (they are much bigger than Minix itself!) So to successfully
# use them while cross-compiling, we have to fetch them. The success of
# that operation is indicated by the presence of a .gitignore file in
# the corresponding ${.CURDIR}, which also conveniently hides from git.
# in-tree, for licensing reasons. So to successfully use them while
# cross-compiling, we have to fetch them. The success of that operation
# is indicated by the presence of a .gitignore file in the corresponding
# source parent directory, which also conveniently hides from git.
.if exists(${GNUHOSTDIST:H}/fetch.sh)
${GNUHOSTDIST:H}/.gitignore: ${GNUHOSTDIST:H}/fetch.sh
SED=${TOOL_SED} ${HOST_SH} ${GNUHOSTDIST:H}/fetch.sh
@test -e ${GNUHOSTDIST}/configure
@echo "${MODULE:U${.CURDIR:T}:C,gcc[0-9]*,gcc,:C,gmake*,make,}-*.tar.*z*" >> $@
@echo ${GNUHOSTDIST:T} >> $@
_gnu_get_src=${GNUHOSTDIST:H}/.gitignore
# Do the fecthing as an extra step, to force serialization
.fetch_done: ${GNUHOSTDIST:H}/.gitignore
@touch $@
fetch_done=.fetch_done
.endif # exists(GNUHOSTDIST:H/fetch.sh) on MINIX
# AL - Special target for MINIX, reset the source tree as pristine
@ -134,7 +138,7 @@ configure_cleanup=configure_cleanup
.endif
# AL For MINIX, fetch the source if not there
.configure_done: ${_gnu_get_src} .WAIT ${_GNU_CFGSRC} ${.CURDIR}/Makefile ${configure_cleanup}
.configure_done: ${fetch_done} ${_GNU_CFGSRC} ${.CURDIR}/Makefile ${configure_cleanup}
@mkdir build 2>/dev/null || true
@(cd build && ${CONFIGURE_ENV} ${HOST_SH} ${GNUHOSTDIST}/configure ${CONFIGURE_ARGS})
@echo ${BUILD_PLATFORM} > $@

View File

@ -16,7 +16,7 @@ CONFIGURE_ARGS= --target=${MACHINE_GNU_PLATFORM} --disable-nls \
--disable-werror \
${BRANDING}
.if !defined(__MINIX)
.if !defined(__MINIX) || ${MKUPDATE:Uno} == "yes"
build/gas/m68k-parse.c: ${GNUHOSTDIST}/gas/m68k-parse.c
.else
# MINIX: LSC: Make sure we trigger the fetch rule