|
1 | 1 | # *── Makefile ── Makefile for deimonn.dev ──* |
2 | 2 | # │ |
3 | | -# │ Copyright (c) 2025 Deimonn |
| 3 | +# │ Copyright (c) 2025-2026 Deimonn |
4 | 4 | # │ |
5 | 5 | # │ This file is licensed under the MIT License. |
6 | 6 | # │ |
|
15 | 15 | # Create build directories. |
16 | 16 | $(shell mkdir -p dist/assets obj) |
17 | 17 |
|
| 18 | +# *─────────* |
| 19 | +# │ Options |
| 20 | +# * |
| 21 | + |
| 22 | +# Node command line to use to run scripts. |
| 23 | +NODE ?= node |
| 24 | + |
| 25 | +# Path to the `void-guides` submodule. |
| 26 | +VOID_GUIDES ?= src/submodules/void-guides |
| 27 | + |
| 28 | +# *─────────* |
| 29 | +# │ Targets |
| 30 | +# * |
| 31 | + |
18 | 32 | # List of all targets. |
19 | 33 | targets = |
20 | 34 |
|
@@ -67,30 +81,30 @@ targets += dist/index.html |
67 | 81 |
|
68 | 82 | # Documentation for 'void-guides'. |
69 | 83 | void_guides_sources = \ |
70 | | - src/submodules/void-guides/index.md \ |
71 | | - $(wildcard src/submodules/void-guides/*/*.md) |
| 84 | + $(VOID_GUIDES)/index.md \ |
| 85 | + $(wildcard $(VOID_GUIDES)/*/*.md) |
72 | 86 | void_guides_outputs = \ |
73 | | - $(patsubst src/submodules/void-guides/%.md,dist/void-guides/%.html,$(void_guides_sources)) |
| 87 | + $(patsubst $(VOID_GUIDES)/%.md,dist/void-guides/%.html,$(void_guides_sources)) |
74 | 88 |
|
75 | 89 | dist/void-guides/search-db.json obj/void-guides/nav-db.json: \ |
76 | 90 | compile-db.js $(void_guides_sources) |
77 | 91 | mkdir -p dist/void-guides obj/void-guides |
78 | | - node compile-db.js \ |
79 | | - void-guides void-guides/ \ |
| 92 | + $(NODE) compile-db.js \ |
| 93 | + '$(VOID_GUIDES)' void-guides void-guides/ \ |
80 | 94 | $(sort $(void_guides_sources)) |
81 | 95 |
|
82 | 96 | dist/void-guides/%.html: \ |
83 | 97 | src/templates/docs.html src/main.html \ |
84 | | - src/submodules/void-guides/%.md src/submodules/void-guides/categories.json \ |
| 98 | + $(VOID_GUIDES)/%.md $(VOID_GUIDES)/categories.json \ |
85 | 99 | compile-markdown.js obj/oro-theme.json obj/void-guides/nav-db.json |
86 | 100 |
|
87 | 101 | # Create directories. |
88 | 102 | mkdir -p "$$(dirname $(subst dist/void-guides/,obj/void-guides/,$@))" |
89 | 103 | mkdir -p "$$(dirname $@)" |
90 | 104 |
|
91 | 105 | # Compile markdown. |
92 | | - node compile-markdown.js \ |
93 | | - void-guides void-guides/ \ |
| 106 | + $(NODE) compile-markdown.js \ |
| 107 | + '$(VOID_GUIDES)' void-guides void-guides/ \ |
94 | 108 | $(patsubst dist/void-guides/%.html,%,$@) |
95 | 109 |
|
96 | 110 | # Generate page from template. |
|
0 commit comments