split up build steps in top level makefile

This commit is contained in:
Damien Elmes 2020-01-04 10:02:43 +10:00
parent 1c1fbde733
commit c6de8d3ea4
2 changed files with 27 additions and 17 deletions

View file

@ -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-*

View file

@ -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/*