

Oh right, that was not the whole Makefile, only the part that caused problems. As @fruitcantfly@programming.dev pointed out, it breaks down with more SOURCE files and populates the newly created directories with only the first SOURCE file.
After some more poking and reading I found a method that works by using define:
define rule
$(DESTINATION)/$(shell echo $(notdir $(1)) | sed -E 's/^([0-9]{4})-([0-9]{2})-([0-9]{2})-(.*)\.md$$/\1\/\2\/\3\/\4.md/'): $(1) | $(DESTINATION)/$(shell echo $(notdir $(1)) | sed -E 's/^([0-9]{4})-([0-9]{2})-([0-9]{2})-(.*)\.md$$/\1\/\2\/\3/')
/bin/bash ./myscript.sh $$< > $$@
endef
$(foreach f,$(SOURCE),$(eval $(call rule,$(f))))
I feel like this is an abuse of Make, but it works. When is it a good idea to delegate the building process to other tools?


Submerging the sphere gives you the volume. You’re thinking of the legend of Archimedes who measured volume this way and measured mass with an ordinary scale and deduced the density from those two values.