-
Notifications
You must be signed in to change notification settings - Fork 267
/
distrib.makefile
59 lines (47 loc) · 1.44 KB
/
distrib.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
#
# Makefile to create distribution archives for WinSparkle.
# Needs GNU Make.
#
# The version to package. It is assumed that binaries in the tree are
# for this version.
VERSION := $(shell git describe --always --tags | sed -e 's/^v//g')
sources_base := WinSparkle-$(VERSION)-src
binary_base := WinSparkle-$(VERSION)
sources_arch := $(sources_base).zip
binary_arch := $(binary_base).zip
binary_files := \
bin/sign_update.bat \
bin/generate_keys.bat \
include/winsparkle.h \
include/winsparkle-version.h \
Release/WinSparkle.dll \
Release/WinSparkle.lib \
Release/WinSparkle.pdb \
x64/Release/WinSparkle.dll \
x64/Release/WinSparkle.lib \
x64/Release/WinSparkle.pdb \
ARM64/Release/WinSparkle.dll \
ARM64/Release/WinSparkle.lib \
ARM64/Release/WinSparkle.pdb \
AUTHORS COPYING NEWS README.md
all: binary sources
binary: $(binary_arch)
sources: $(sources_arch)
$(binary_arch): $(binary_files)
@rm -rf $(binary_base) $@
@mkdir $(binary_base)
@mkdir -p $(binary_base)/bin
@mkdir -p $(binary_base)/include
@mkdir -p $(binary_base)/Release
@mkdir -p $(binary_base)/x64/Release
@mkdir -p $(binary_base)/ARM64/Release
for i in $(binary_files); do cp -a $$i $(binary_base)/$$i ; done
cp -a 3rdparty/expat/expat/COPYING $(binary_base)/COPYING.expat
zip -9 -r $@ $(binary_base)
$(sources_arch):
@rm -rf $@
git ls-files --recurse-submodules | zip -9 -@ $@
clean:
rm -f $(binary_arch)
rm -f $(sources_arch)
.PHONY: all binary sources clean