build: Fix Makefile targets to match GNU coding standards

- Rename target clean-all to distclean
- Add uninstall target
- Install target has to run tests

Signed-off-by: Sven Sager <akira@narux.de>
This commit is contained in:
2023-09-16 10:36:54 +02:00
parent 0494ce53ad
commit efd27cc96c

View File

@@ -21,7 +21,7 @@ PYTHON = $(or $(wildcard $(VENV_PATH)/bin/python), $(SYSTEM_PYTHON))
APP_VERSION = $(shell $(PYTHON) src/$(PACKAGE) --version) APP_VERSION = $(shell $(PYTHON) src/$(PACKAGE) --version)
all: build_ui build_rc build all: build_ui build_rc test build
.PHONY: all .PHONY: all
@@ -59,15 +59,18 @@ update_translation:
.PHONY: build_ui build_rc update_translation .PHONY: build_ui build_rc update_translation
## Build, install ## Build steps
build: build_ui build_rc build: build_ui build_rc
$(PYTHON) -m setup sdist $(PYTHON) -m setup sdist
$(PYTHON) -m setup bdist_wheel $(PYTHON) -m setup bdist_wheel
install: build install: test build
$(PYTHON) -m pip install dist/$(PACKAGE)-*.whl $(PYTHON) -m pip install dist/$(PACKAGE)-*.whl
.PHONY: build install uninstall:
$(PYTHON) -m pip uninstall --yes $(PACKAGE)
.PHONY: test build install uninstall
## PyInstaller ## PyInstaller
installer_mac: build_ui build_rc installer_mac: build_ui build_rc
@@ -119,7 +122,7 @@ installer_linux: build_ui build_rc
clean: clean:
rm -rf build dist src/*.egg-info *.spec rm -rf build dist src/*.egg-info *.spec
clean-all: clean distclean: clean
rm -R $(VENV_PATH) rm -rf $(VENV_PATH)
.PHONY: clean clean-all .PHONY: clean distclean