-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
105 lines (89 loc) · 3.54 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
IGNORE_FILES ?= true
VERSION ?= dev
prepare-%:
git fetch && git reset --hard origin/master
mkdir -p $(MANUAL_SRC_DIR)
mkdir -p $(MANUAL_FILES_DIR)
mkdir -p $(API_DIR)
commit-%:
git add $(MANUAL_SRC_DIR) \
&& ($(IGNORE_FILES) || git add $(MANUAL_FILES_DIR)) \
&& git add $(API_DIR) \
&& ( ( git commit -m `git log -n 1 --format=$*-%h` \
&& git pull \
&& git push '[email protected]:ocsigen/ocsigen.org-data' ) \
|| echo "nothing to update" )
all-aux-%:
$(MAKE) prepare-$*
$(MAKE) copy-$*
[ "$(JENKINS_COMMIT_DOC)" != "yes" ] || $(MAKE) commit-$*
all-%:
[ -d $* ] && [ -d $(REPO_PATH) ]
$(MAKE) \
API_DIR=$*/$(VERSION)/api \
MANUAL_DIR=$*/$(VERSION)/manual \
MANUAL_SRC_DIR=$*/$(VERSION)/manual/src \
MANUAL_FILES_DIR=$*/$(VERSION)/manual/files \
all-aux-$*
##############
copy-js_of_ocaml:
$(MAKE) -C $(REPO_PATH)/doc clean
$(MAKE) -C $(REPO_PATH)/doc doc
$(MAKE) -C $(REPO_PATH)/doc wikidoc
cp -Rf $(REPO_PATH)/doc/manual/* $(MANUAL_DIR)/
cp -Rf $(REPO_PATH)/doc/api/wiki/*.wiki $(API_DIR)/
copy-eliom:
$(MAKE) -C $(REPO_PATH) wikidoc
cp -Rf $(REPO_PATH)/doc/manual-wiki/*.wiki $(MANUAL_SRC_DIR)
mkdir -p $(API_DIR)/server $(API_DIR)/client $(API_DIR)/ocamlbuild $(API_DIR)/ppx
cp -Rf $(REPO_PATH)/_build/src/lib/server/api.wikidocdir/*.wiki $(API_DIR)/server/
cp -Rf $(REPO_PATH)/_build/src/lib/client/api.wikidocdir/*.wiki $(API_DIR)/client/
cp -Rf $(REPO_PATH)/_build/src/ocamlbuild/api.wikidocdir/*.wiki $(API_DIR)/ocamlbuild/
cp -Rf $(REPO_PATH)/_build/src/ppx/api.wikidocdir/*.wiki $(API_DIR)/ppx/
cp -Rf $(REPO_PATH)/doc/index.wiki $(API_DIR)/
copy-tyxml:
$(MAKE) -C $(REPO_PATH) wikidoc
cp -Rf $(REPO_PATH)/doc/manual-wiki/*.wiki $(MANUAL_SRC_DIR)
cp -Rf $(REPO_PATH)/_build/tyxml-api.wikidocdir/*.wiki $(API_DIR)
copy-lwt:
cd $(REPO_PATH) \
&& rm -rf _build/lwt-api.wikidocdir \
&& ocamlbuild lwt-api.wikidocdir/index.wiki
cp -Rf $(REPO_PATH)/manual/*.wiki $(MANUAL_SRC_DIR)
cp -Rf $(REPO_PATH)/_build/lwt-api.wikidocdir/*.wiki $(API_DIR)
copy-deriving:
cd $(REPO_PATH) \
&& rm -rf _build/deriving-api.wikidocdir \
&& ocamlbuild deriving-api.wikidocdir/index.wiki
cp -Rf $(REPO_PATH)/doc/manual-wiki/*.wiki $(MANUAL_SRC_DIR)
cp -Rf $(REPO_PATH)/_build/deriving-api.wikidocdir/*.wiki $(API_DIR)
copy-ocsigenserver:
$(MAKE) -C $(REPO_PATH)/doc clean
$(MAKE) -C $(REPO_PATH)/doc doc
$(MAKE) -C $(REPO_PATH)/doc wikidoc
cp -Rf $(REPO_PATH)/doc/api-wiki/*.wiki $(API_DIR)
cp -Rf $(REPO_PATH)/doc/manual-wiki/*.wiki $(MANUAL_SRC_DIR)/
copy-eliom-base-app:
$(MAKE) -C $(REPO_PATH) doc
mkdir -p $(API_DIR)/server $(API_DIR)/client
cp -Rf $(REPO_PATH)/doc/client/wiki/*.wiki $(API_DIR)/client
cp -Rf $(REPO_PATH)/doc/server/wiki/*.wiki $(API_DIR)/server
cp -Rf $(REPO_PATH)/doc/manual-wiki/*.wiki $(MANUAL_SRC_DIR)/
copy-eliom-widgets:
$(MAKE) -C $(REPO_PATH) doc
mkdir -p $(API_DIR)/server $(API_DIR)/client
cp -Rf $(REPO_PATH)/doc/client/wiki/*.wiki $(API_DIR)/client
cp -Rf $(REPO_PATH)/doc/server/wiki/*.wiki $(API_DIR)/server
cp -Rf $(REPO_PATH)/doc/manual-wiki/*.wiki $(MANUAL_SRC_DIR)/
copy-ocsimore:
rm -rf $(REPO_PATH)/_build/api.wikidocdir
make -C $(REPO_PATH) wiki-api
cp -Rf $(REPO_PATH)/_build/api.wikidocdir/*.wiki $(API_DIR)
cp -Rf $(REPO_PATH)/doc/manual-wiki/*.wiki $(MANUAL_SRC_DIR)/
copy-ojquery:
$(MAKE) -C $(REPO_PATH) wikidoc
cp -Rf $(REPO_PATH)/_build/ojquery-api.wikidocdir/*.wiki $(API_DIR)
copy-ojwidgets:
$(MAKE) -C $(REPO_PATH) wikidoc
cp -Rf $(REPO_PATH)/_build/ojwidgets-api.wikidocdir/*.wiki $(API_DIR)
cp -Rf $(REPO_PATH)/doc/manual-wiki/*.wiki $(MANUAL_SRC_DIR)/