forked from telefonicaid/OpenWebDevice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (48 loc) · 1.08 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
GIT ?= git
OWD_APPS ?= $(abspath apps)
GAIA_PATH ?= $(abspath gaia)
GAIA_APPS ?= $(GAIA_PATH)/apps
OUT_DIR ?= $(abspath out)
OUT_DIR_APPS ?= $(OUT_DIR)/apps
all: install-owd
.PHONY: submodule-sync
submodule-sync:
$(GIT) submodule sync
$(GIT) submodule update --init
.PHONY: pull-develop
pull-develop:
$(GIT) checkout develop
$(GIT) pull origin develop
.PHONY: pull-master
pull-master:
$(GIT) checkout master
$(GIT) pull origin master
sync-develop: pull-develop submodule-sync
sync-master: pull-master submodule-sync
.PHONY: out
out:
@echo "Creating output dir..."; \
rm -rf $(GAIA_PATH)/profile; \
if [ ! -d $(OUT_DIR) ]; \
then \
mkdir $(OUT_DIR); \
fi; \
cp -r gaia/* $(OUT_DIR)/;
.PHONY: owd-apps
owd-apps: out
@echo "Moving OWD apps to Gaia..."
@cd $(OWD_APPS); \
for d in `find * -maxdepth 0 -type d` ;\
do \
if [ -f $$d/manifest.webapp ]; \
then \
echo $$d; \
if [ -d $(GAIA_APPS)/$$d ]; \
then \
rm -rf $(OUT_DIR_APPS)/$$d; \
fi; \
cp -r $(OWD_APPS)/$$d $(OUT_DIR_APPS); \
fi \
done
install-owd: owd-apps
$(MAKE) -C $(OUT_DIR) install-gaia