From c6de8d3ea4f1861264ae06764e93a96318642c4c Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 4 Jan 2020 10:02:43 +1000 Subject: [PATCH] split up build steps in top level makefile --- Makefile | 35 +++++++++++++++++++++++++++-------- helpers/rename-with-buildhash | 9 --------- 2 files changed, 27 insertions(+), 17 deletions(-) delete mode 100755 helpers/rename-with-buildhash diff --git a/Makefile b/Makefile index 9cc9478e5..af88e36f2 100644 --- a/Makefile +++ b/Makefile @@ -37,22 +37,35 @@ run: pyenv meta/buildhash qt/runanki $(RUNFLAGS) .PHONY: build -build: pyenv meta/buildhash - @. pyenv/bin/activate && \ - for dir in $(DEVEL); do \ - $(SUBMAKE) -C $$dir build BUILDFLAGS="$(BUILDFLAGS)"; \ - done; \ - helpers/rename-with-buildhash +build: clean-dist build-rspy build-pylib build-qt add-buildhash @echo @echo "Build complete." +.PHONY: build-rspy +build-rspy: pyenv meta/buildhash + @. pyenv/bin/activate && \ + $(SUBMAKE) -C rspy build BUILDFLAGS="$(BUILDFLAGS)" + +.PHONY: build-pylib +build-pylib: + @. pyenv/bin/activate && \ + $(SUBMAKE) -C pylib build + +.PHONY: build-qt +build-qt: + @. pyenv/bin/activate && \ + $(SUBMAKE) -C qt build + .PHONY: clean -clean: - rm -rf dist +clean: clean-dist @for dir in $(DEVEL); do \ $(SUBMAKE) -C $$dir clean; \ done +.PHONY: clean-dist +clean-dist: + rm -rf dist + .PHONY: check check: pyenv meta/buildhash @. pyenv/bin/activate && \ @@ -67,3 +80,9 @@ fix: for dir in $(CHECKABLE); do \ $(SUBMAKE) -C $$dir fix; \ done; \ + +.PHONY: add-buildhash +add-buildhash: + @ver=$$(cat meta/version); \ + hash=$$(cat meta/buildhash); \ + rename "s/-$${ver}-/-$${ver}+$${hash}-/" dist/*-$$ver-* \ No newline at end of file diff --git a/helpers/rename-with-buildhash b/helpers/rename-with-buildhash deleted file mode 100755 index 20663e129..000000000 --- a/helpers/rename-with-buildhash +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -# add buildhash to output files -top=$(dirname $0)/.. -ver=$(cat $top/meta/version) -hash=$(cat $top/meta/buildhash) -rename "s/-${ver}-/-${ver}+${hash}-/" $top/dist/* - -