star-build

Automation tool for project installation
git clone git://git.meso-star.fr/star-build.git
Log | Files | Refs | README | LICENSE

commit 8ee2828cb63bd1d4f861685e11299c7991a807f4
parent 6f8370f3a7ad8b292a15c1f66d481ad5bf826eeb
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Thu, 19 Sep 2024 11:24:06 +0200

Install sources of "git" projects

Update the template used for git projects to install their sources in
the 'src' subdirectory.

Diffstat:
Msrc/git.mk.in | 11++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/git.mk.in b/src/git.mk.in @@ -1,4 +1,4 @@ -@NAME@: build_@NAME@ prefix +@NAME@: build_@NAME@ prefix @NAME@_src @prefix=$$(cat .prefix) &&\ cd -- "$(CACHE)/@NAME@/@TAG@" &&\ $(MAKE) PREFIX="$${prefix}" @OPT@ install @@ -14,6 +14,15 @@ build_@NAME@: @DEP@ fetch_@NAME@ prefix $(CACHE)/@NAME@/@TAG@: git clone @URL@ "$@" +$(CACHE)/@NAME@/@TAG@/@NAME@.tar: fetch_@NAME@ + cd -- $(CACHE)/@NAME@/@TAG@ && \ + git archive --format=tar --prefix=@NAME@/ -o @NAME@.tar HEAD + +@NAME@_src: $(CACHE)/@NAME@/@TAG@/@NAME@.tar prefix + prefix=$$(cat .prefix) && \ + mkdir -p "$${prefix}"/src && \ + tar -C"$${prefix}"/src -xvf $(CACHE)/@NAME@/@TAG@/@NAME@.tar + fetch_@NAME@: $(CACHE)/@NAME@/@TAG@ @cd -- "$(CACHE)/@NAME@/@TAG@" &&\ git fetch origin &&\