]> git.ipfire.org Git - artwork.git/commitdiff
Makefile: Let rsvg-convert generate the final SVGs
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 17 Mar 2026 17:11:45 +0000 (17:11 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 17 Mar 2026 17:11:45 +0000 (17:11 +0000)
These files are much more compact and not so busy with unnecessary stuff
that Inkscape generates.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile

index 4f6868e85a598588469a6551ca58285b4a9ca03f..5632d648b7f680c4b45e7b16f7ac31cdcbdedbd9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -72,22 +72,7 @@ endef
 all: $(OBJECTS)
 
 # Converts the logo to a plain SVG file without requiring the font
-standard/logo.svg: logo.svg
-       $(TO_PATHS)
-
-%/logo.svg: logo-%.svg
-       $(TO_PATHS)
-
-standard/logo-square.svg: logo-square.svg
-       $(TO_PATHS)
-
-%/logo-square.svg: logo-square-%.svg
-       $(TO_PATHS)
-
-standard/favicon.svg: favicon.svg
-       $(TO_PATHS)
-
-%/favicon.svg: favicon-%.svg
+%-standalone.svg: %.svg
        $(TO_PATHS)
 
 # Converts the logo to PDF
@@ -95,6 +80,22 @@ standard/favicon.svg: favicon.svg
        mkdir -p $(dir $@)
        rsvg-convert --format=pdf1.7 $< > $@
 
+standard/logo.svg: logo-standalone.svg
+       mkdir -p $(dir $@) && \
+       $(RSVG_CONVERT) --format=svg $< > $@
+
+%/logo.svg: logo-%-standalone.svg
+       mkdir -p $(dir $@) && \
+       $(RSVG_CONVERT) --format=svg $< > $@
+
+standard/logo-square.svg: logo-square-standalone.svg
+       mkdir -p $(dir $@) && \
+       $(RSVG_CONVERT) --format=svg $< > $@
+
+%/logo-square.svg: logo-square-%-standalone.svg
+       mkdir -p $(dir $@) && \
+       $(RSVG_CONVERT) --format=svg $< > $@
+
 # Converts the logo to PNG
 %/logo-512.png: %/logo.svg
        mkdir -p $(dir $@) && \
@@ -129,6 +130,15 @@ standard/favicon.svg: favicon.svg
        mkdir -p $(dir $@) && \
        $(RSVG_CONVERT) --format=png --width=4096 $< > $@
 
+# Converts the favicon to SVG
+standard/favicon.svg: favicon-standalone.svg
+       mkdir -p $(dir $@) && \
+       $(RSVG_CONVERT) --format=svg --background-color="#$(WHITE)" $< > $@
+
+%/favicon.svg: favicon-%-standalone.svg
+       mkdir -p $(dir $@) && \
+       $(RSVG_CONVERT) --format=svg --background-color="#$(WHITE)" $< > $@
+
 # Converts the favicon to PNG
 %/favicon-16x16.png: %/favicon.svg
        mkdir -p $(dir $@) && \