Improve the process for GNU tools

Split the process to fetch GNU tools (until now embedded
within tools/Makefile.gnuhost) into a new Makefile.fetchgnu,
MINIX-specific hence relocated, which is to be also used
to fetch sources even when not building the tools.
Use it for binutils too.
Improve documentation.

Also 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 76c7f3dac9
commit a150b26ee8
9 changed files with 126 additions and 49 deletions

View File

@@ -1,9 +1,5 @@
# $NetBSD: Makefile,v 1.17 2010/12/03 21:38:47 plunky Exp $
.if defined(__MINIX)
#LSC: Trigger fetch.sh script
SUBDIR+= dist .WAIT
.endif # defined(__MINIX)
SUBDIR+= usr.bin
# Speedup stubs for some subtrees that don't need to run these rules

18
gnu/dist/Makefile vendored
View File

@@ -1,18 +0,0 @@
# LSC FIXME: Hackish way to trigger the fetch phase from here
# in the same way as from tools.
.include <bsd.own.mk>
MODULE= texinfo
.include "${.CURDIR}/../../tools/Makefile.gnuhost"
# Force the mapping to standard targets even when not building tools
# We considere work to be done as soon as the fetch step is done,
# as everything else has to be triggered from /tools or ../usr.bin
.if ${USETOOLS} != "yes"
realall realinstall: ${GNUHOSTDIST:H}/.gitignore
.endif

View File

@@ -5,6 +5,13 @@ MAKEDOC=
.include "../Makefile.inc"
.if defined(__MINIX)
#LSC: First program within texinfo: trigger fetch.sh script
MODULE= texinfo
GNUHOSTDIST= ${DIST}/${MODULE}
.include "${.CURDIR}/../../../../minix/Makefile.fetchgnu"
.endif # defined(__MINIX)
HOSTPROG= makedoc
SRCS= makedoc.c xexit.c xmalloc.c xstrdup.c
@@ -13,3 +20,8 @@ HOST_CPPFLAGS+= -I${IDIST}/info -I${IDIST}/lib -I${.CURDIR}/../common
HOST_CPPFLAGS+= -DHOSTTOOL
.include <bsd.hostprog.mk>
.if defined(__MINIX) && ${USETOOLS} != "yes"
# MINIX: make sure sources are fetched, even when tools not built earlier
${SRCS} realdepend realall realinstall: ${fetch_done}
.endif # defined(__MINIX)