-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathMakefile
71 lines (59 loc) · 1.4 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
66
67
68
69
70
71
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)/; \
cp -r gaia/.git/ $(OUT_DIR)/.git/;
.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
.PHONY: install-owd
install-owd: owd-apps
$(MAKE) -C $(OUT_DIR) stamp-commit-hash
$(MAKE) -C $(OUT_DIR) install-gaia
.PHONY: install-gaia
install-gaia:
$(MAKE) -C $(OUT_DIR) stamp-commit-hash
$(MAKE) -C $(OUT_DIR) install-gaia
.PHONY: reset-owd
reset-owd: owd-apps
$(MAKE) -C $(OUT_DIR) stamp-commit-hash
$(MAKE) -C $(OUT_DIR) reset-gaia