Skip to content

Commit

Permalink
Add target and task for config
Browse files Browse the repository at this point in the history
  • Loading branch information
basejumpa committed Jul 27, 2024
1 parent d987a30 commit 4db4dfc
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@

"patternlinks.rules": [

],
]

}
29 changes: 22 additions & 7 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,29 @@
}
},
{
"label": "html-live",
"label": "config",
"type": "shell",
"command": "make -f docs/Makefile html-live",
"command": "make -f docs/Makefile config",
"options": {
"statusbar": {
"hide": false
}
},
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": false
}
},
{
"label": "html",
"type": "shell",
"command": "make -f docs/Makefile html",
"options": {
"statusbar": {
"hide": true
}
},
"problemMatcher": [
{
"owner": "sphinx",
Expand All @@ -57,16 +72,16 @@
],
"group": {
"kind": "build",
"isDefault": true
"isDefault": false
}
},
{
"label": "html",
"label": "html-live",
"type": "shell",
"command": "make -f docs/Makefile html",
"command": "make -f docs/Makefile html-live",
"options": {
"statusbar": {
"hide": true
"hide": false
}
},
"problemMatcher": [
Expand All @@ -84,7 +99,7 @@
],
"group": {
"kind": "build",
"isDefault": false
"isDefault": true
}
}
]
Expand Down
8 changes: 4 additions & 4 deletions docs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ menu "doc"

config DOC__TITLE
string "Title"
default "Alexander Mann-Wahrenberg's Homepage"
default "The Default Title"

config DOC__AUTHOR
string "Author"
default "Basejumpa"
default "The Default Author"

config DOC__YEAR
int "Year"
default 2024
default 1976

config DOC__PROJECT
string "Project"
default "Homepage"
default "The Default Project"

config DOC__LANGUAGE
string "Language"
Expand Down
38 changes: 22 additions & 16 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -113,24 +113,40 @@ deps-are-up-to-date: poetry.toml pyproject.toml
poetry update


.PHONY: deps-are-up-to-date-live
deps-are-up-to-date-live: poetry.toml pyproject.toml
.PHONY: deps-are-up-to-date-dev
deps-are-up-to-date-dev: poetry.toml pyproject.toml
poetry update --with dev


.PHONY: clean
clean:
rm -rf "$(CONFIG_BUILD__DIRS__BUILD)"


clean-install:
rm -rf .venv/
rm -rf .tools/
rm -f poetry.lock


.PHONY: clean
clean:
rm -rf "$(CONFIG_BUILD__DIRS__BUILD)"
.PHONY: config
config: .tools/.are-up-to-date deps-are-up-to-date-dev
(cd "$(CONFIG_BUILD__DIRS__CONFIG)" ; poetry run menuconfig )


.PHONY: html
html: .tools/.are-up-to-date deps-are-up-to-date
mkdir -p "$(CONFIG_BUILD__DIRS__BUILD)/$@"
@echo "Building sources at $(CONFIG_BUILD__DIRS__SOURCE)"
poetry run sphinx-build \
-W \
-c "$(CONFIG_BUILD__DIRS__CONFIG)" \
"$(CONFIG_BUILD__DIRS__SOURCE)" \
"$(CONFIG_BUILD__DIRS__BUILD)/$@"


.PHONY: html-live
html-live: .tools/.are-up-to-date deps-are-up-to-date-live
html-live: .tools/.are-up-to-date deps-are-up-to-date-dev
mkdir -p "$(CONFIG_BUILD__DIRS__BUILD)/$@"
# Start continuous build, open browser automatically which reloads on change.
@echo "Building sources at $(CONFIG_BUILD__DIRS__SOURCE)"
Expand All @@ -145,13 +161,3 @@ html-live: .tools/.are-up-to-date deps-are-up-to-date-live
--port "$(CONFIG_BUILD__LIVE__PORTS__HTML)" \
--open-browser


.PHONY: html
html: .tools/.are-up-to-date deps-are-up-to-date
mkdir -p "$(CONFIG_BUILD__DIRS__BUILD)/$@"
@echo "Building sources at $(CONFIG_BUILD__DIRS__SOURCE)"
poetry run sphinx-build \
-W \
-c "$(CONFIG_BUILD__DIRS__CONFIG)" \
"$(CONFIG_BUILD__DIRS__SOURCE)" \
"$(CONFIG_BUILD__DIRS__BUILD)/$@"
9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,22 @@ package-mode = false

[tool.poetry.dependencies]
python = "^3.10"
sphinx = "^7.4.7"
setuptools = "^71.1.0"
sphinxcontrib-bibtex = "^2.6.2"
sphinx = "^7.4.7"
sphinx-copybutton = "^0.5.2"
pydata-sphinx-theme = "^0.15.4"
sphinx-design = "^0.6.0"
sphinxcontrib-bibtex = "^2.6.2"
sphinxcontrib-drawio = "^0.0.17"
sphinxcontrib-plantuml = "^0.30"
sphinxcontrib-mermaid = "^0.9.2"
ablog = "^0.11.10"
sphinxcontrib-youtube = "^1.4.1"
pydata-sphinx-theme = "^0.15.4"
ablog = "^0.11.10"


[tool.poetry.group.dev.dependencies]
sphinx-autobuild = "^2024.4.16"
kconfiglib = "^14.1.0"

[build-system]
requires = ["poetry-core"]
Expand Down

0 comments on commit 4db4dfc

Please sign in to comment.