diff options
author | girst <girst@users.noreply.github.com> | 2019-12-27 07:21:49 +0100 |
---|---|---|
committer | girst <girst@users.noreply.github.com> | 2019-12-27 07:21:49 +0100 |
commit | d3a9a879d2b064e33d30779774896c69a4423cb6 (patch) | |
tree | 2a44388559459393a536104373d1b33351268904 /Makefile | |
parent | d1c80010b1fb1e352fb8754ace534e8dbe8cf954 (diff) | |
download | legacywolf-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-- | Makefile | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -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) |