-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile
59 lines (48 loc) · 1.49 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
PACKAGE = sogo-connector
GIT_REV = $(shell git rev-parse --verify HEAD | cut -c1-10)
ifeq ($(shell uname),Darwin)
VERSION = $(shell grep em:version install.rdf | sed -E 's@(em:version=|"| )@@g')
else
VERSION = $(shell grep em:version install.rdf | sed -e 's@\(em:version=\|\"\|\ \)@@g')
endif
XPI_ARCHIVE = $(PACKAGE)-$(VERSION)-$(GIT_REV).xpi
SHELL = /bin/bash
ZIP = /usr/bin/zip
FILENAMES = $(shell cat MANIFEST)
all: MANIFEST-pre MANIFEST rest
MANIFEST: MANIFEST-pre
@if ! cmp MANIFEST MANIFEST-pre >& /dev/null; then \
mv -f MANIFEST-pre MANIFEST; \
echo MANIFEST updated; \
else \
rm -f MANIFEST-pre; \
fi;
MANIFEST-pre:
@echo install.rdf >> $@
@echo COPYING >> $@
@echo ChangeLog.old >> $@
@find . -type f -name "*.manifest" >> $@
@find . -type f -name "*.xul" >> $@
@find . -type f -name "*.xml" >> $@
@find . -type f -name "*.dtd" >> $@
@find . -type f -name "*.idl" >> $@
@find . -type f -name "*.js" >> $@
@find . -type f -name "*.css" >> $@
@find . -type f -name "*.png" >> $@
@find . -type f -name "*.gif" >> $@
@find . -type f -name "*.jpg" >> $@
@find . -type f -name "*.xpt" >> $@
@find . -type f -name "*.properties" >> $@
@find . -type f -name "RELEASE-NOTES" >> $@
rest: MANIFEST
@+make $(XPI_ARCHIVE)
$(XPI_ARCHIVE): $(FILENAMES)
@echo Generating $(XPI_ARCHIVE)...
@rm -f $(XPI_ARCHIVE)
@$(ZIP) -9r $(XPI_ARCHIVE) $(FILENAMES) > /dev/null
clean:
rm -f MANIFEST-pre $(XPI_ARCHIVE)
rm -f *.xpi
find . -name "*~" -exec rm -f {} \;
distclean: clean
rm -f MANIFEST