mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-06 15:47:06 +08:00
Makefile cleanup
This commit is contained in:
parent
3a0781d71d
commit
5f19f668dc
1
.idea/dictionaries/ericf.xml
generated
1
.idea/dictionaries/ericf.xml
generated
@ -1616,6 +1616,7 @@
|
|||||||
<w>testd</w>
|
<w>testd</w>
|
||||||
<w>testfoo</w>
|
<w>testfoo</w>
|
||||||
<w>testfooooo</w>
|
<w>testfooooo</w>
|
||||||
|
<w>testfull</w>
|
||||||
<w>testhelpers</w>
|
<w>testhelpers</w>
|
||||||
<w>testimportmultiple</w>
|
<w>testimportmultiple</w>
|
||||||
<w>testm</w>
|
<w>testm</w>
|
||||||
|
|||||||
113
Makefile
113
Makefile
@ -204,15 +204,27 @@ build/prefab/windows/release/BallisticaCore.exe: .efrocachemap
|
|||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# #
|
# #
|
||||||
# Formatting / Checking #
|
# Updating #
|
||||||
# #
|
# #
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
# Note: Some of these targets have alternative flavors:
|
# Update any project files that need it (does NOT build projects).
|
||||||
# 'full' - clears caches/etc so all files are reprocessed even if not dirty.
|
update: prereqs
|
||||||
# 'fast' - takes some shortcuts for faster iteration, but may miss things
|
@tools/update_project
|
||||||
|
|
||||||
# Format code/scripts.
|
# Don't update but fail if anything needs it.
|
||||||
|
updatecheck: prereqs
|
||||||
|
@tools/update_project --check
|
||||||
|
|
||||||
|
# Tell make which of these targets don't represent files.
|
||||||
|
.PHONY: update updatecheck
|
||||||
|
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# #
|
||||||
|
# Formatting #
|
||||||
|
# #
|
||||||
|
################################################################################
|
||||||
|
|
||||||
# Run formatting on all files in the project considered 'dirty'.
|
# Run formatting on all files in the project considered 'dirty'.
|
||||||
format:
|
format:
|
||||||
@ -244,10 +256,17 @@ formatscriptsfull: prereqs
|
|||||||
formatmakefile: prereqs
|
formatmakefile: prereqs
|
||||||
@tools/snippets formatmakefile
|
@tools/snippets formatmakefile
|
||||||
|
|
||||||
# Note: the '2' varieties include extra inspections such as PyCharm.
|
.PHONY: format formatfull formatcode formatcodefull formatscripts \
|
||||||
# These are useful, but can take significantly longer and/or be a bit flaky.
|
formatscriptsfull
|
||||||
|
|
||||||
# Run all project checks.
|
|
||||||
|
################################################################################
|
||||||
|
# #
|
||||||
|
# Checking #
|
||||||
|
# #
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# Run all project checks. (static analysis)
|
||||||
check: updatecheck
|
check: updatecheck
|
||||||
@$(MAKE) -j3 cpplint pylint mypy
|
@$(MAKE) -j3 cpplint pylint mypy
|
||||||
@echo ALL CHECKS PASSED!
|
@echo ALL CHECKS PASSED!
|
||||||
@ -256,21 +275,12 @@ check2: updatecheck
|
|||||||
@$(MAKE) -j4 cpplint pylint mypy pycharm
|
@$(MAKE) -j4 cpplint pylint mypy pycharm
|
||||||
@echo ALL CHECKS PASSED!
|
@echo ALL CHECKS PASSED!
|
||||||
|
|
||||||
# Run faster checks which may occasionally miss things.
|
|
||||||
checkfast: updatecheck
|
|
||||||
@$(MAKE) -j3 cpplint pylintfast mypy
|
|
||||||
@echo ALL CHECKS PASSED!
|
|
||||||
# Same as 'checkfast' plus optional/slow extra checks.
|
|
||||||
checkfast2: updatecheck
|
|
||||||
@$(MAKE) -j4 cpplint pylintfast mypy pycharm
|
|
||||||
@echo ALL CHECKS PASSED!
|
|
||||||
|
|
||||||
# Run checks with no caching (all files are checked).
|
# Run checks with no caching (all files are checked).
|
||||||
checkfull: updatecheck
|
checkfull: updatecheck
|
||||||
@$(MAKE) -j3 cpplintfull pylintfull mypyfull
|
@$(MAKE) -j3 cpplintfull pylintfull mypyfull
|
||||||
@echo ALL CHECKS PASSED!
|
@echo ALL CHECKS PASSED!
|
||||||
# Same as 'checkfull' plus optional/slow extra checks.
|
# Same as 'checkfull' plus optional/slow extra checks.
|
||||||
checkfull2: updatecheck
|
check2full: updatecheck
|
||||||
@$(MAKE) -j4 cpplintfull pylintfull mypyfull pycharmfull
|
@$(MAKE) -j4 cpplintfull pylintfull mypyfull pycharmfull
|
||||||
@echo ALL CHECKS PASSED!
|
@echo ALL CHECKS PASSED!
|
||||||
|
|
||||||
@ -290,13 +300,6 @@ pylint: prereqs
|
|||||||
pylintfull: prereqs
|
pylintfull: prereqs
|
||||||
@tools/snippets pylint -full
|
@tools/snippets pylint -full
|
||||||
|
|
||||||
# Run 'Fast' pylint checks (may miss problems in some cases).
|
|
||||||
# This uses dependency recursion limits and so can require much less
|
|
||||||
# re-checking but may miss problems in some cases. Its not a bad idea to
|
|
||||||
# run a non-fast check every so often or before pushing.
|
|
||||||
pylintfast: prereqs
|
|
||||||
@tools/snippets pylint -fast
|
|
||||||
|
|
||||||
# Run Mypy checks on all Python code.
|
# Run Mypy checks on all Python code.
|
||||||
mypy: prereqs
|
mypy: prereqs
|
||||||
@tools/snippets mypy
|
@tools/snippets mypy
|
||||||
@ -314,8 +317,7 @@ pycharmfull: prereqs
|
|||||||
@tools/snippets pycharm -full
|
@tools/snippets pycharm -full
|
||||||
|
|
||||||
# Tell make which of these targets don't represent files.
|
# Tell make which of these targets don't represent files.
|
||||||
.PHONY: format formatfull formatcode formatcodefull formatscripts \
|
.PHONY: check check2 checkfull check2full \
|
||||||
formatscriptsfull check check2 checkfast checkfast2 checkfull checkfull2 \
|
|
||||||
cpplint cpplintfull pylint pylintfull mypy \
|
cpplint cpplintfull pylint pylintfull mypy \
|
||||||
mypyfull pycharm pycharmfull
|
mypyfull pycharm pycharmfull
|
||||||
|
|
||||||
@ -326,72 +328,53 @@ pycharmfull: prereqs
|
|||||||
# #
|
# #
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
# Run all tests.
|
# Run all tests. (live execution verification)
|
||||||
# Note: need to disable bytecode writing so we don't cause errors due to
|
# Note: need to disable bytecode writing so we don't cause errors due to
|
||||||
# unexpected __pycache__ dirs popping up.
|
# unexpected __pycache__ dirs popping up.
|
||||||
test: prereqs
|
test: prereqs
|
||||||
@tools/snippets pytest -v tests
|
@tools/snippets pytest -v tests
|
||||||
|
|
||||||
|
# Run tests with any caching disabled.
|
||||||
|
testfull: test
|
||||||
|
|
||||||
|
# Tell make which of these targets don't represent files.
|
||||||
|
.PHONY: test testfull
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# #
|
# #
|
||||||
# Updating / Preflighting #
|
# Preflighting #
|
||||||
# #
|
# #
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
# Update any project files that need it (does NOT build projects).
|
# Format, update, check, & test the project. Do this before commits.
|
||||||
update: prereqs
|
|
||||||
@tools/update_project
|
|
||||||
|
|
||||||
# Don't update but fail if anything needs it.
|
|
||||||
updatecheck: prereqs
|
|
||||||
@tools/update_project --check
|
|
||||||
|
|
||||||
# Run an update and check together; handy while iterating.
|
|
||||||
# (slightly more efficient than running update/check separately).
|
|
||||||
updatethencheck: update
|
|
||||||
@$(MAKE) -j3 cpplint pylint mypy
|
|
||||||
@echo ALL CHECKS PASSED!
|
|
||||||
# Same as 'updatethencheck' plus optional/slow extra checks.
|
|
||||||
updatethencheck2: update
|
|
||||||
@$(MAKE) -j4 cpplint pylint mypy pycharm
|
|
||||||
@echo ALL CHECKS PASSED!
|
|
||||||
|
|
||||||
# 'updatethencheck' without caching (checks all files).
|
|
||||||
updatethencheckfull: update
|
|
||||||
@$(MAKE) -j3 cpplintfull pylintfull mypyfull
|
|
||||||
@echo ALL CHECKS PASSED!
|
|
||||||
# 'updatethencheckfull' plus optional/slow extra checks.
|
|
||||||
updatethencheckfull2: update
|
|
||||||
@$(MAKE) -j4 cpplintfull pylintfull mypyfull pycharmfull
|
|
||||||
@echo ALL CHECKS PASSED!
|
|
||||||
|
|
||||||
# Format, update, and check the project; do this before git commits.
|
|
||||||
preflight:
|
preflight:
|
||||||
@$(MAKE) format
|
@$(MAKE) format
|
||||||
@$(MAKE) updatethencheck
|
@$(MAKE) update
|
||||||
|
@$(MAKE) -j4 cpplint pylint mypy test
|
||||||
@echo PREFLIGHT SUCCESSFUL!
|
@echo PREFLIGHT SUCCESSFUL!
|
||||||
# Same as 'preflight' plus optional/slow extra checks.
|
# Same as 'preflight' plus optional/slow extra checks.
|
||||||
preflight2:
|
preflight2:
|
||||||
@$(MAKE) format
|
@$(MAKE) format
|
||||||
@$(MAKE) updatethencheck2
|
@$(MAKE) update
|
||||||
|
@$(MAKE) -j5 cpplint pylint mypy pycharm test
|
||||||
@echo PREFLIGHT SUCCESSFUL!
|
@echo PREFLIGHT SUCCESSFUL!
|
||||||
|
|
||||||
# Same as 'preflight' without caching (checks all files).
|
# Same as 'preflight' without caching (checks all files).
|
||||||
preflightfull:
|
preflightfull:
|
||||||
@$(MAKE) formatfull
|
@$(MAKE) formatfull
|
||||||
@$(MAKE) updatethencheckfull
|
@$(MAKE) update
|
||||||
|
@$(MAKE) -j4 cpplintfull pylintfull mypyfull testfull
|
||||||
@echo PREFLIGHT SUCCESSFUL!
|
@echo PREFLIGHT SUCCESSFUL!
|
||||||
# Same as 'preflightfull' plus optional/slow extra checks.
|
# Same as 'preflightfull' plus optional/slow extra checks.
|
||||||
preflightfull2:
|
preflight2full:
|
||||||
@$(MAKE) formatfull
|
@$(MAKE) formatfull
|
||||||
@$(MAKE) updatethencheckfull2
|
@$(MAKE) update
|
||||||
|
@$(MAKE) -j5 cpplintfull pylintfull mypyfull pycharmfull testfull
|
||||||
@echo PREFLIGHT SUCCESSFUL!
|
@echo PREFLIGHT SUCCESSFUL!
|
||||||
|
|
||||||
# Tell make which of these targets don't represent files.
|
# Tell make which of these targets don't represent files.
|
||||||
.PHONY: update updatecheck updatethencheck updatethencheck2 \
|
.PHONY: preflight preflight2 preflightfull preflight2full
|
||||||
updatethencheckfull updatethencheckfull2 preflight preflight2 \
|
|
||||||
preflightfast preflightfast2 preflightfull preflightfull2
|
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user