OUTPUT = user.js SRCS = tracking speculation cookies ui certificates referer $(OUTPUT): $(SRCS) cat $(SRCS) > $@ clean: rm -f $(OUTPUT) # Create a symlink from any profile directories under ~/.mozilla/firefox # to the output file in this directory. A "profile directory" is any # directory that has a "prefs.js" file in it. # # This will only work if you run "make install" in the same directory # as the makefile! This is fine; building the output file only works # in that one place too. .PHONY: install install: $(OUTPUT) for dir in ~/.mozilla/firefox/*.*; do \ if [ -f "$${dir}/prefs.js" ]; then \ if [ ! -e "$${dir}/$(OUTPUT)" ]; then \ ln -s "$(shell pwd)/$(OUTPUT)" "$${dir}/$(OUTPUT)"; \ fi; \ fi; \ done;