add option to build in light mode
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
a2fd169fea
commit
1a9e1b0a01
3 changed files with 33 additions and 10 deletions
41
Makefile
41
Makefile
|
@ -1,11 +1,23 @@
|
|||
BASE_ATTRS=\
|
||||
DARK_BASE_ATTRS=\
|
||||
color=white \
|
||||
fontcolor=white \
|
||||
fontcolor=white
|
||||
|
||||
DARK_GRAPH_ATTRS=\
|
||||
$(DARK_BASE_ATTRS) \
|
||||
bgcolor=gray8
|
||||
|
||||
DARK_NODE_ATTRS=\
|
||||
$(DARK_BASE_ATTRS)
|
||||
|
||||
DARK_EDGE_ATTRS=\
|
||||
$(DARK_BASE_ATTRS)
|
||||
|
||||
|
||||
BASE_ATTRS=\
|
||||
fontname="sans-serif"
|
||||
|
||||
GRAPH_ATTRS=\
|
||||
$(BASE_ATTRS) \
|
||||
bgcolor=gray8
|
||||
|
||||
NODE_ATTRS=\
|
||||
$(BASE_ATTRS)
|
||||
|
@ -18,18 +30,31 @@ DOT_BASE_CMD=dot \
|
|||
$(patsubst %,-N%,$(NODE_ATTRS)) \
|
||||
$(patsubst %,-E%,$(EDGE_ATTRS))
|
||||
|
||||
DARK_CMD_EXT=\
|
||||
$(patsubst %,-G%,$(DARK_GRAPH_ATTRS)) \
|
||||
$(patsubst %,-N%,$(DARK_NODE_ATTRS)) \
|
||||
$(patsubst %,-E%,$(DARK_EDGE_ATTRS))
|
||||
|
||||
DOT_CMD=$(shell if [[ -v "LIGHT_MODE" ]]; then echo "$(DOT_BASE_CMD)"; else echo "$(DOT_BASE_CMD) $(DARK_CMD_EXT)"; fi)
|
||||
|
||||
BUILD_PATH_PREFIX=$(shell if [[ -v "LIGHT_MODE" ]]; then echo "light/"; fi)
|
||||
|
||||
.PHONY: All
|
||||
All: build/de.png build/de.svg build/en.png build/en.svg
|
||||
All:\
|
||||
$(BUILD_PATH_PREFIX)build/de.png \
|
||||
$(BUILD_PATH_PREFIX)build/de.svg \
|
||||
$(BUILD_PATH_PREFIX)build/en.png \
|
||||
$(BUILD_PATH_PREFIX)build/en.svg
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf build
|
||||
|
||||
build/%.svg: %.dot
|
||||
$(BUILD_PATH_PREFIX)build/%.svg: %.dot
|
||||
@mkdir -p $(@D)
|
||||
$(DOT_BASE_CMD) -Tsvg $< -o $@
|
||||
$(DOT_CMD) -Tsvg $< -o $@
|
||||
|
||||
build/%.png: %.dot
|
||||
$(BUILD_PATH_PREFIX)build/%.png: %.dot
|
||||
@mkdir -p $(@D)
|
||||
$(DOT_BASE_CMD) -Tpng $< -o $@
|
||||
$(DOT_CMD) -Tpng $< -o $@
|
||||
|
||||
|
|
1
de.dot
1
de.dot
|
@ -19,7 +19,6 @@ digraph langchart {
|
|||
|
||||
subgraph cluster0 {
|
||||
label="Embedded Scripting";
|
||||
color=white;
|
||||
|
||||
n_4 [label="Wird die Sprache in einem sehr komplexem Programm wie einem Browser als Scriptsprache verwendet?"];
|
||||
|
||||
|
|
1
en.dot
1
en.dot
|
@ -19,7 +19,6 @@ digraph langchart {
|
|||
|
||||
subgraph cluster0 {
|
||||
label="Embedded Scripting";
|
||||
color=white;
|
||||
|
||||
n_4 [label="Is the language used for scripting in a very complex program such as a browser?"];
|
||||
|
||||
|
|
Loading…
Reference in a new issue