cargo-%: stamp/cargo.%
examples: examples/test-bundle.zip
+examples: examples/big-bundle.zip
.PHONY: examples
cargo-wasm: cargo-wasm-release
cd examples/test-bundle/ && find \! \( -name '*~' -o -name '.*' \) \
)
-examples/test-bundle.zip: $(MAKEFILE_DEP) \
+examples/%.zip: $(MAKEFILE_DEP)
+ set -e; rm -f $@.tmp; cd examples/$*/; \
+ zip $(ZIPFLAGS) -DXy ../$(notdir $@).tmp $(ZIP_INPUTS)
+ mv -f $@.tmp $@
+
+examples/test-bundle.zip: ZIP_INPUTS=$(EXAMPLE_BUNDLE_INPUT_DEPS) \
$(addprefix examples/test-bundle/, $(EXAMPLE_BUNDLE_INPUT_DEPS))
- set -e; rm -f $@.tmp; cd examples/test-bundle/; \
- zip -DXy ../$(notdir $@).tmp $(EXAMPLE_BUNDLE_INPUT_DEPS)
+
+examples/big-bundle.zip: examples/big-bundle/otter.toml
+examples/big-bundle.zip: ZIPFLAGS+= -0 -r -q
+examples/big-bundle.zip: ZIP_INPUTS=.
+examples/big-bundle/otter.toml: $(LIBRARY_FILES) $(MAKEFILE_DEP)
+ rm -rf examples/big-bundle
+ mkdir examples/big-bundle
+ cp -rl library examples/big-bundle/.
+ set -ex; cd examples/big-bundle/library/; for x in '' .toml; do \
+ mv wikimedia$$x duped-example$$x; done
+ set -e; cd examples/big-bundle/library; for d in */.; do \
+ cd $$d; \
+ for f in *.coloured.svg; do \
+ if test -f $$f; then \
+ mv $$f $${f%.coloured.svg}.svg; \
+ fi; \
+ done; \
+ for f in chess-*_c*.svg; do \
+ if test -f $$f; then \
+ mv -v $$f $${f/_c/w}; \
+ fi; \
+ done; \
+ cd ..; \
+ done
+ echo 'title = "Autogenerated large test bundle"' >$@.tmp
mv -f $@.tmp $@
#---------- webdriver tests (wdt) ----------
clean-for-retest:
rm -f templates/script.js library/*/*.usvg stamp/*
rm -rf $(LIBRARY_CLEAN)
+ rm -rf examples/big-bundle examples/big-bundle.zip
rm -f examples/test-bundle.zip
find * \( -name '*~' -o -name '*.tmp' \) -print0 | xargs -0r rm --