From: Michael Orlitzky Date: Sat, 16 Mar 2019 14:13:47 +0000 (-0400) Subject: makefile: add the makefile to build/install the thing. X-Git-Url: http://gitweb.michael.orlitzky.com/?p=firefox-user-prefs.git;a=commitdiff_plain;h=f9a5a00bfc0925154b650d5491d44c58a95d5773;hp=7caf7f06fbdbb78acca16bbccef911d6bbd3f044 makefile: add the makefile to build/install the thing. --- diff --git a/makefile b/makefile new file mode 100644 index 0000000..fee282e --- /dev/null +++ b/makefile @@ -0,0 +1,25 @@ +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;