|
|
|
|
|
by pdkl95
3276 days ago
|
|
> code splitting That should only take a few lines in a Makefile. JSTARGETS = foo.js bar.js
build-js: $(JSTARGETS)
foo.js: foo_main.js lib_a.js lib_b.js
cat $< > $@
bar.js: bar_main.js lib_a.js lib_x.js lib_y.js
cat $< > $@
With make's builtin topological sort, adding dependency information to control the order or other unusual build requirements isn't hard to add.> output 6 images for all the sizes IMAGES=( baz quux )
IMGSRC=(patsubst %,src/images/%.jpg,$(IMAGES))
IMGSML=(patsubst %,build/images/%-small.jpg,$(IMAGES))
build/images/%-small.jpg: src/images/%.jpg
convert $< -resize 25% $@
build-images: $(IMGSML)
|
|