VERSION = $(shell sed -n '/"version"/s/.*\([0-9]\+\.[0-9]\+\).*/\1/p' manifest.json) SET_VERSION = $(eval CURRENT_VERSION=$(VERSION)) default: v2 link_v2: ln -s -f manifest_v2.json manifest.json link_v3: ln -s -f manifest_v3.json manifest.json v2: link_v2 $(SET_VERSION) zip -r kf-trombi-$(CURRENT_VERSION).xpi directory.css directory.js icons manifest.json v3: link_v3 $(SET_VERSION) zip -r kf-trombi-$(CURRENT_VERSION).zip directory.css directory.js icons manifest.json