callProgram(): allow passing arguments
[UnFlowedThunderbird.git] / Makefile
blobb88272b2240118b3bdc43d6e3d6323ec310f195b
1 TARGET=unflowed
3 XPI_FILES=chrome.manifest install.rdf readme.txt \
4 $(wildcard content/* locale/*/* skin/*)
6 ID=$(shell sed -n -e 's/^.*<em:id>\(.*\)<\/em:id>.*/\1/p' -e '/em:name/q' \
7 < install.rdf)
9 uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
10 ifneq (,$(findstring MINGW,$(uname_S)))
11 APPDATA=$(USERPROFILE)/Application Data/Thunderbird/Profiles
12 PROFILE_DIRECTORY=$(shell sh -c 'echo "$(APPDATA)"/*.default')
13 else
14 ifeq (,$(shell ls -d "$(HOME)/.mozilla-thunderbird" 2>/dev/null))
15 TBDIR=$(HOME)/.thunderbird
16 else
17 TBDIR=$(HOME)/.mozilla-thunderbird
18 endif
19 PROFILE_DIRECTORY=$(wildcard $(TBDIR)/*.default)
20 endif
22 $(TARGET).xpi: $(XPI_FILES)
23 zip -9r $@ $^
25 symlink:
26 ln -s "$(shell pwd)" "$(PROFILE_DIRECTORY)/extensions/$(ID)"
28 install: symlink
30 uninstall:
31 rm -rf "$(PROFILE_DIRECTORY)/extensions/$(ID)"
33 reinstall: uninstall install