-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
81 lines (59 loc) · 1.88 KB
/
Makefile
File metadata and controls
81 lines (59 loc) · 1.88 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
TMP ?= $(abspath tmp)
version := 0.9.1
installer_version := 1
configure_flags :=
.SECONDEXPANSION :
.PHONY : all
all : httperf-$(version).pkg
.PHONY : clean
clean :
-rm -f httperf-$(version).pkg
-rm -rf $(TMP)
##### dist ##########
dist_sources := $(shell find dist -type f \! -name .DS_Store)
$(TMP)/install/usr/local/bin/httperf : $(TMP)/build/httperf | $(TMP)/install
cd $(TMP)/build && $(MAKE) DESTDIR=$(TMP)/install install
$(TMP)/build/httperf : $(TMP)/build/config.status $(dist_sources)
cd $(TMP)/build && $(MAKE)
$(TMP)/build/config.status : dist/configure | $(TMP)/build
cd $(TMP)/build && sh $(abspath $<) $(configure_flags)
$(TMP)/build \
$(TMP)/install :
mkdir -p $@
##### pkg ##########
$(TMP)/httperf-$(version).pkg : \
$(TMP)/install/usr/local/bin/httperf \
$(TMP)/install/etc/paths.d/httperf.path
pkgbuild \
--root $(TMP)/install \
--identifier com.ablepear.httperf \
--ownership recommended \
--version $(version) \
$@
$(TMP)/install/etc/paths.d/httperf.path : httperf.path | $(TMP)/install/etc/paths.d
cp $< $@
$(TMP)/install/etc/paths.d :
mkdir -p $@
##### product ##########
httperf-$(version).pkg : \
$(TMP)/httperf-$(version).pkg \
$(TMP)/distribution.xml \
$(TMP)/resources/background.png \
$(TMP)/resources/license.html \
$(TMP)/resources/welcome.html
productbuild \
--distribution $(TMP)/distribution.xml \
--resources $(TMP)/resources \
--package-path $(TMP) \
--version $(installer_version) \
--sign 'Able Pear Software Incorporated' \
$@
$(TMP)/distribution.xml \
$(TMP)/resources/welcome.html : $(TMP)/% : % | $$(dir $$@)
sed -e s/{{version}}/$(version)/g $< > $@
$(TMP)/resources/background.png \
$(TMP)/resources/license.html : $(TMP)/% : % | $(TMP)/resources
cp $< $@
$(TMP) \
$(TMP)/resources :
mkdir -p $@