diff --git a/Makefile b/Makefile index 6040a24..d3fb42c 100644 --- a/Makefile +++ b/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 $@ diff --git a/de.dot b/de.dot index 729a179..b74cdc4 100644 --- a/de.dot +++ b/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?"]; diff --git a/en.dot b/en.dot index c1c0052..42d9744 100644 --- a/en.dot +++ b/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?"];