-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
9 changed files
with
126 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# NOT NetBSD | ||
# | ||
# Rules used to fetch a GNU package. Expects GNUHOSTDIST to be set | ||
# and <bsd.own.mk> to be previously .include'd. | ||
# | ||
# New interface: | ||
# | ||
# * When using the `cleandir' target, defining CLEANFETCHED=yes will | ||
# additionally remove all the fetched files. | ||
# This is particularly useful when a GNU package is updated. | ||
# | ||
# The rest should be operations hidden to the normal programmers. | ||
# | ||
# How to use: (maintainers manual) | ||
# | ||
# * put a fetch.sh script one directory below the GNUHOSTDIST; | ||
# | ||
# * .include "path/to/minix/Makefile.fetchgnu", after having | ||
# defined GNUHOSTDIST and before any use of the variable below; | ||
# | ||
# * insert ${fetch_done} as source before performing any operation | ||
# on the files under GPL license which are usually found | ||
# within NetBSD src/ tree; | ||
# | ||
# * rinse and repeat for every target which assumes the presence of | ||
# these files, and for every Makefile operating upon them. | ||
# | ||
# | ||
# TODO: does not handle correctly the cases where there are more than | ||
# one package downloaded by fetch.sh (e.g.gnu/dist with texinfo+gmake): | ||
# .gitignore only "protects" the first package which triggers. | ||
|
||
.if !defined(__MINIX) || !defined(GNUHOSTDIST) | ||
.error Bad logic in Makefiles. | ||
.endif | ||
|
||
.if !defined(_MINIX_FETCHGNU_MK_) | ||
_MINIX_FETCHGNU_MK_=1 | ||
|
||
# MINIX /usr/src does not have the sources for the GNU utilities | ||
# 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} >> $@ | ||
|
||
# Do the fetching as an extra step, to force serialization | ||
.fetch_done: ${GNUHOSTDIST:H}/.gitignore | ||
@touch $@ | ||
fetch_done=.fetch_done | ||
|
||
# Special target for MINIX, reset the source tree as pristine | ||
# Note it does NOT remove the downloaded tarball | ||
.if ${CLEANFETCHED:Uno} == "yes" | ||
cleandir: clean_gnu_src | ||
clean_gnu_src: | ||
-rm -r -f ${GNUHOSTDIST} ${GNUHOSTDIST:H}/.gitignore | ||
.endif # CLEANFETCHED == yes | ||
|
||
clean: clean.fetchgnu | ||
clean.fetchgnu: | ||
-@rm -f .fetch_done | ||
|
||
.endif # exists(GNUHOSTDIST:H/fetch.sh) on MINIX | ||
|
||
.endif # !defined(_MINIX_FETCHGNU_MK_) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters