avoid unnecessary work in 'make build'
This commit is contained in:
parent
c29184d874
commit
16ab351bf8
7
Makefile
7
Makefile
@ -145,9 +145,10 @@ clean: clean-dist
|
|||||||
$(SUBMAKE) -C $$dir clean; \
|
$(SUBMAKE) -C $$dir clean; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# remove any files in dist/ folder without current build hash
|
||||||
.PHONY: clean-dist
|
.PHONY: clean-dist
|
||||||
clean-dist:
|
clean-dist: buildhash
|
||||||
rm -rf dist
|
find dist \! -name "*$$(cat meta/buildhash)*" -type f -delete
|
||||||
|
|
||||||
.PHONY: check
|
.PHONY: check
|
||||||
check: pyenv buildhash prepare
|
check: pyenv buildhash prepare
|
||||||
@ -181,7 +182,7 @@ add-buildhash:
|
|||||||
fi; \
|
fi; \
|
||||||
ver="$$(cat meta/version)"; \
|
ver="$$(cat meta/version)"; \
|
||||||
hash="$$(cat meta/buildhash)"; \
|
hash="$$(cat meta/buildhash)"; \
|
||||||
${RENAME_BIN} "s/-$${ver}(\.|-)/-$${ver}+$${hash}\$$1/" dist/*-"$${ver}"*
|
${RENAME_BIN} -f "s/-$${ver}(\.|-)/-$${ver}+$${hash}\$$1/" dist/*-"$${ver}"*
|
||||||
|
|
||||||
|
|
||||||
.PHONY: pull-i18n
|
.PHONY: pull-i18n
|
||||||
|
@ -99,10 +99,13 @@ CHECKDEPS := $(shell ${FIND} anki tests -name '*.py' | grep -v buildinfo.py)
|
|||||||
######################
|
######################
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: $(BUILD_STEPS) $(CHECKDEPS)
|
build: .build/build
|
||||||
|
|
||||||
|
.build/build: $(BUILD_STEPS) $(CHECKDEPS)
|
||||||
rm -rf dist build
|
rm -rf dist build
|
||||||
python setup.py -q bdist_wheel
|
python setup.py -q bdist_wheel
|
||||||
rsync -a dist/*.whl ../dist/
|
rsync -a dist/*.whl ../dist/
|
||||||
|
touch $@
|
||||||
|
|
||||||
# prepare code for running in place
|
# prepare code for running in place
|
||||||
.PHONY: develop
|
.PHONY: develop
|
||||||
|
@ -127,10 +127,13 @@ CHECKDEPS := $(shell ${FIND} aqt tests -name '*.py' | grep -v buildinfo.py)
|
|||||||
######################
|
######################
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: $(BUILD_STEPS)
|
build: .build/build
|
||||||
|
|
||||||
|
.build/build: $(BUILD_STEPS) $(CHECKDEPS)
|
||||||
rm -rf dist build
|
rm -rf dist build
|
||||||
python setup.py -q bdist_wheel
|
python setup.py -q bdist_wheel
|
||||||
rsync -a dist/*.whl ../dist/
|
rsync -a dist/*.whl ../dist/
|
||||||
|
touch $@
|
||||||
|
|
||||||
.PHONY: develop
|
.PHONY: develop
|
||||||
develop: $(BUILD_STEPS)
|
develop: $(BUILD_STEPS)
|
||||||
|
@ -60,11 +60,13 @@ DEPS := .build/tools .build/vernum ../meta/buildhash \
|
|||||||
CARGO_TARGET_DIR="$(RSPY_TARGET_DIR)" maturin develop $(DEVFLAGS)
|
CARGO_TARGET_DIR="$(RSPY_TARGET_DIR)" maturin develop $(DEVFLAGS)
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
build: $(DEPS)
|
build: .build/build
|
||||||
rm -rf "$(OUTDIR)"/ankirspy*
|
|
||||||
|
.build/build: $(DEPS)
|
||||||
touch ../proto/backend.proto
|
touch ../proto/backend.proto
|
||||||
FTL_TEMPLATE_DIRS="$(QT_FTL_TEMPLATES)" FTL_LOCALE_DIRS="$(QT_FTL_LOCALES)" \
|
FTL_TEMPLATE_DIRS="$(QT_FTL_TEMPLATES)" FTL_LOCALE_DIRS="$(QT_FTL_LOCALES)" \
|
||||||
maturin build -i "${PYTHON_FILE}" -o "$(OUTDIR)" $(BUILDFLAGS)
|
maturin build -i "${PYTHON_FILE}" -o "$(OUTDIR)" $(BUILDFLAGS)
|
||||||
|
touch $@
|
||||||
|
|
||||||
check: .build/check
|
check: .build/check
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user