Rather than the Makefile. This will let us make the default arguments
available to Rust code.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
TARGET_DIR ?= target
-USVG_OPTIONS = "--sans-serif-family=DejaVu Sans"
-
WASM_BINDGEN = $(TARGET_DIR)/debug/wasm-bindgen
WASM_BINDGEN_OPTIONS = \
--remove-name-section --remove-producers-section \
#---------- svg processing ----------
LIBRARIES ?= $(basename $(wildcard library/*.toml))
-USVG_DEP = stamp/cargo.usvg
+USVG_DEP = stamp/cargo.usvg src/USVG_DEFAULT_ARGS.txt
include $(addsuffix /files.make, $(LIBRARIES))
--- /dev/null
+# One argument per line
+# Lines starting with #, and empty lines, are ignored
+
+--sans-serif-family
+DejaVu Sans
add_lic();
flush STDOUT or die $!;
-my $cmd = "$usvg - -c";
+my $cmd = "$usvg";
+
+open OPTS, "src/USVG_DEFAULT_ARGS.txt" or die $!;
+while (<OPTS>) {
+ s/^\s*$//; s/\s*$//;
+ next unless m/^[^#]/;
+ $cmd .= " '$_'";
+}
+
+$cmd .= " - -c";
+
my $cmd_m = "$cmd <$in >$out.tmp";
print STDERR "+ $cmd_m\n";