2023-07-09 00:16:15 +02:00
|
|
|
#!/bin/make
|
|
|
|
CORE=$(shell pwd)
|
2023-08-25 14:34:57 +02:00
|
|
|
ASSETS=$(CORE)/assets
|
2023-07-09 07:18:58 +02:00
|
|
|
DOCSCONF=$(CORE)/mkdocs.yml
|
|
|
|
DOCSOUT=$(CORE)/docs_out
|
2023-08-25 14:34:57 +02:00
|
|
|
TESTPROJECT=$(CORE)/devprj
|
2023-07-09 00:16:15 +02:00
|
|
|
|
|
|
|
dist: help
|
|
|
|
help:
|
2023-07-09 07:17:33 +02:00
|
|
|
@echo "Available tasks: docs-deps (installs the docs dependencies via pip)"
|
|
|
|
@echo " docs-deps-paru (install the docs dependencies via paru)"
|
2023-07-09 00:16:15 +02:00
|
|
|
@echo " docs-serve (starts development server)"
|
|
|
|
@echo " docs-build (export prod ready documentation as html)"
|
|
|
|
@echo " docs-clean (removes the built documentation)"
|
|
|
|
@echo " mkdevprj (creates a dev project for development)"
|
|
|
|
@echo " rmdevprj (removes the dev project)"
|
|
|
|
docs-deps:
|
|
|
|
@echo ":: Installing documentation dependencies"
|
|
|
|
@echo " This may take a few minutes"
|
|
|
|
@pip install -r requirements.txt
|
2023-07-09 07:17:33 +02:00
|
|
|
docs-deps-paru:
|
|
|
|
@echo ":: Installing documentation dependencies"
|
|
|
|
@echo " This may take a few minutes"
|
|
|
|
@paru -Sy --needed python-pyyaml-env-tag python-mergedeep python-six python-smmap python-gitdb python-urllib3 python-idna python-dateutil python-pytz python-babel python-requests python-regex python-pygments python-colorama python-watchdog python-packaging python-ghp-import python-click python-jinja python-yaml python-gitpython python-markupsafe pymdown-extensions mkdocs-material-pymdownx-extras mkdocs-git-revision-date-localized-plugin mkdocs-material mkdocs
|
2023-07-09 00:16:15 +02:00
|
|
|
docs-serve:
|
|
|
|
@echo ":: Serving documentation, press CTRL+C to exit"
|
|
|
|
@bash -c "mkdocs serve --dirtyreload --config-file "$(DOCSCONF)";exit 0"
|
|
|
|
docs-build:
|
|
|
|
@make docs-clean
|
|
|
|
@echo ":: Building documentation"
|
|
|
|
@mkdocs build --site-dir "$(DOCSOUT)" --config-file "$(DOCSCONF)"
|
|
|
|
docs-clean:
|
|
|
|
@echo ":: Removing built documentation"
|
|
|
|
@rm -rf "$(DOCSOUT)"
|
|
|
|
mkdevprj:
|
|
|
|
@echo ":: Creating development project"
|
2023-08-25 14:34:57 +02:00
|
|
|
@cp -r $(ASSETS)/testproject $(TESTPROJECT)
|
2023-07-09 00:16:15 +02:00
|
|
|
@ln -s $(CORE) $(TESTPROJECT)/CORE
|
2023-08-25 14:34:57 +02:00
|
|
|
@mv $(TESTPROJECT)/config.gd $(TESTPROJECT)/CORE/config.gd
|
2023-07-09 00:16:15 +02:00
|
|
|
@echo ":: Development project created."
|
|
|
|
@echo " You can now launch Godot and open '$(TESTPROJECT)'."
|
2023-08-25 14:34:57 +02:00
|
|
|
@echo " If you want to submit your changes, remember to execute 'make rmdevprj' first!"
|
2023-07-09 00:16:15 +02:00
|
|
|
rmdevprj:
|
|
|
|
@echo ":: Removing development project"
|
2023-08-07 14:49:12 +02:00
|
|
|
@echo ":: !!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
|
|
|
@echo ":: ! IMPORTANT WARNING !"
|
|
|
|
@echo ":: !!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
|
|
|
@echo ":: ! Please remove the CORE !"
|
|
|
|
@echo ":: ! development project from !"
|
|
|
|
@echo ":: ! your project list or you !"
|
|
|
|
@echo ":: ! will experience bugs if !"
|
|
|
|
@echo ":: ! you edit the dev project !"
|
|
|
|
@echo ":: ! again in the future! !"
|
|
|
|
@echo ":: !!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
|
|
|
@echo ":: If you have done that, press [ENTER]."
|
|
|
|
@read -rs
|
2023-07-09 00:16:15 +02:00
|
|
|
@echo ":: Removing directory"
|
|
|
|
@rm -rf $(TESTPROJECT)
|
|
|
|
@rm -rf config.gd
|
|
|
|
@echo ":: Removing 'uid://' strings"
|
2023-08-07 14:49:12 +02:00
|
|
|
@#bash -c "for file in *.tscn; do cat \"\$$file\"|sed -E 's/\ uid=\"[^\"]*\"//g'|tee \$$file;done &> /dev/null"
|
|
|
|
@echo ":: Please open all .tscn files and remove all 'uid=uid://' strings"
|
|
|
|
@echo ":: If you have done that, press [ENTER]."
|
|
|
|
@read -rs
|