-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
65 lines (45 loc) · 2.63 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
60
61
62
63
64
65
.PHONY: all clean build build-debug build-dependencies
# Enable some extra debugging in own metalsmith plugins
#NODE_DEBUG := metalsmith-external-links
#NODE_DEBUG := metalsmith-autoexclude-permalinks
#NODE_DEBUG := metalsmith-auto-defaults
all: build
# In release.mk, you can define targets for pushing the built website to the server.
# For debugging purposes, you can set DEBUG_URL to point to a different url,
# in order to make inner-site links work.
-include release.mk
# We extract SchildiChat-Android screenshots from its git repo
ANDRO_SCHILDI_REPO ?= ~/AndroidStudioProjects/SchildiChat-android
ANDRO_SCHILDI_PICS_SRC_DIR := $(ANDRO_SCHILDI_REPO)/fastlane/metadata/android/en-US/images/phoneScreenshots/
ANDRO_SCHILDI_PICS_NOPATH := 2_en-US.png 3_en-US.png 4_en-US.png
ANDRO_SCHILDI_PICS_SRC := $(addprefix $(ANDRO_SCHILDI_PICS_SRC_DIR)/, $(ANDRO_SCHILDI_PICS_NOPATH))
ANDRO_SCHILDI_PICS_TARGET_DIR := src/android/img
ANDRO_SCHILDI_PICS := $(addprefix $(ANDRO_SCHILDI_PICS_TARGET_DIR)/, $(ANDRO_SCHILDI_PICS_NOPATH))
$(ANDRO_SCHILDI_PICS_TARGET_DIR)/%.png: $(ANDRO_SCHILDI_PICS_SRC_DIR)/%.png
cp $< $@
ANDRO_NEXT_SCHILDI_REPO ?= ~/AndroidStudioProjects/schildichat-android-next
ANDRO_NEXT_SCHILDI_PICS_SRC_DIR := $(ANDRO_NEXT_SCHILDI_REPO)/metadata/en-US/images/phoneScreenshots/
ANDRO_NEXT_SCHILDI_PICS_NOPATH := 1_en-US.png 2_en-US.png 3_en-US.png
ANDRO_NEXT_SCHILDI_PICS_SRC := $(addprefix $(ANDRO_NEXT_SCHILDI_PICS_SRC_DIR)/, $(ANDRO_NEXT_SCHILDI_PICS_NOPATH))
ANDRO_NEXT_SCHILDI_PICS_TARGET_DIR := src/android/next/img
ANDRO_NEXT_SCHILDI_PICS := $(addprefix $(ANDRO_NEXT_SCHILDI_PICS_TARGET_DIR)/, $(ANDRO_NEXT_SCHILDI_PICS_NOPATH))
$(ANDRO_NEXT_SCHILDI_PICS_TARGET_DIR)/%.png: $(ANDRO_NEXT_SCHILDI_PICS_SRC_DIR)/%.png
cp $< $@
# We extract SchildiChat-Web/-Desktop screenshots from its git repo
WEB_SCHILDI_REPO ?= ~/git/schildichat-desktop
WEB_SCHILDI_PICS_SRC_DIR := $(WEB_SCHILDI_REPO)/screenshots/
WEB_SCHILDI_PICS_NOPATH := 1.png
WEB_SCHILDI_PICS_SRC := $(addprefix $(WEB_SCHILDI_PICS_SRC_DIR)/, $(WEB_SCHILDI_PICS_NOPATH))
WEB_SCHILDI_PICS_TARGET_DIR := src/desktop/img
WEB_SCHILDI_PICS := $(addprefix $(WEB_SCHILDI_PICS_TARGET_DIR)/, $(WEB_SCHILDI_PICS_NOPATH))
$(WEB_SCHILDI_PICS_TARGET_DIR)/%.png: $(WEB_SCHILDI_PICS_SRC_DIR)/%.png
cp $< $@
# Add files that need rules to be run before metalsmith here.
GENERATED_SRC := $(ANDRO_SCHILDI_PICS) $(ANDRO_NEXT_SCHILDI_PICS) $(WEB_SCHILDI_PICS)
build-dependencies: $(GENERATED_SRC)
build: build-dependencies
NODE_ENV=production node index
build-debug: build-dependencies
DEBUG=$(NODE_DEBUG) NODE_ENV=development DEBUG_URL=$(DEBUG_URL) node index
clean:
rm -rf build build-layouts $(GENERATED_SRC)