summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorgirst <girst@users.noreply.github.com>2019-12-27 07:21:49 +0100
committergirst <girst@users.noreply.github.com>2019-12-27 07:21:49 +0100
commitd3a9a879d2b064e33d30779774896c69a4423cb6 (patch)
tree2a44388559459393a536104373d1b33351268904 /Makefile
parentd1c80010b1fb1e352fb8754ace534e8dbe8cf954 (diff)
downloadlegacywolf-d3a9a879d2b064e33d30779774896c69a4423cb6.tar.gz
legacywolf-d3a9a879d2b064e33d30779774896c69a4423cb6.zip
provide clean and uninstall targets, auto-find correct path
The wildcard will match both /usr/lib and /usr/lib64, so the Makefile works on 99% of Linux distros. And yes, that's not what DESTDIR is for.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 9 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 1dccb57..9c41ab3 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-.PHONY: all install
+.PHONY: all clean install uninstall
files := config.js
files += defaults/pref/config-prefs.js
@@ -7,11 +7,17 @@ files += legacy/BootstrapLoader.jsm
files += legacy/RDFDataSource.jsm
files += legacy/RDFManifestConverter.jsm
archive = legacyfox.tar.gz
-mozilladir = /usr/lib64/firefox/
+DESTDIR ?= $(wildcard /usr/lib??/firefox/)
all: $(archive)
$(archive): $(files)
tar czf $@ -- $(files)
+clean:
+ rm -f $(archive)
+
install: $(archive)
- tar xzf $(archive) -C $(mozilladir)
+ tar xzf $(archive) -C "$(DESTDIR)"
+
+uninstall:
+ cd "$(DESTDIR)" && rm -rf -- $(files)