-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
162 lines (124 loc) · 4.98 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
#
# FritzingPartsApi - Makefile
#
# Variables
SCRIPTS_DIR = scripts/
build:
@make clean
@make write_parts_json
@make create_parts_dir
@make copy_fzp_files
@make convert_fzp_files_to_json
@make copy_svg_files
@make write_temp_json
@make parts_overview_html
@make parts_html
@make tags_overview_json
@make tags_overview_html
@make tags_json
@make authors_overview_json
@make authors_overview_html
clean:
@make clean_parts_json
@make clean_parts_dir
@make clean_tags
@make clean_authors
# parts.json
write_parts_json:
@echo "--------------------------------------------------------------------------------"
@echo "write the parts.json file"
@echo "--------------------------------------------------------------------------------"
@node $(SCRIPTS_DIR)write_parts_json.js
clean_parts_json:
@echo "--------------------------------------------------------------------------------"
@echo "remove parts.json"
@echo "--------------------------------------------------------------------------------"
@rm -rf parts.json
# parts directory
create_parts_dir:
@echo "--------------------------------------------------------------------------------"
@echo "create the parts directory"
@echo "--------------------------------------------------------------------------------"
@node $(SCRIPTS_DIR)create_parts_dir.js
clean_parts_dir:
@echo "--------------------------------------------------------------------------------"
@echo "clean parts directory"
@echo "--------------------------------------------------------------------------------"
@rm -rf parts
# parts files
copy_fzp_files:
@echo "--------------------------------------------------------------------------------"
@echo "copy .fzp files"
@echo "--------------------------------------------------------------------------------"
@node $(SCRIPTS_DIR)copy_fzp_files.js
convert_fzp_files_to_json:
@echo "--------------------------------------------------------------------------------"
@echo "convert .fzp files to json"
@echo "--------------------------------------------------------------------------------"
@node $(SCRIPTS_DIR)convert_fzp_files_to_json.js
copy_svg_files:
@echo "--------------------------------------------------------------------------------"
@echo "copy .svg files"
@echo "--------------------------------------------------------------------------------"
@node $(SCRIPTS_DIR)copy_svg_files.js
parts_overview_html:
@echo "--------------------------------------------------------------------------------"
@echo "write parts list html file."
@echo "--------------------------------------------------------------------------------"
@node $(SCRIPTS_DIR)write_parts_overview_html.js
parts_html:
@echo "--------------------------------------------------------------------------------"
@echo "write parts html files"
@echo "--------------------------------------------------------------------------------"
@node $(SCRIPTS_DIR)write_parts_html.js
# tags
tags_overview_json:
@echo "--------------------------------------------------------------------------------"
@echo "write the tags.json overview file"
@echo "--------------------------------------------------------------------------------"
@node $(SCRIPTS_DIR)write_tags_overview_json.js
tags_overview_html:
@echo "--------------------------------------------------------------------------------"
@echo "write the tags.html overview file."
@echo "--------------------------------------------------------------------------------"
@node $(SCRIPTS_DIR)write_tags_overview_html.js
tags_json:
@echo "--------------------------------------------------------------------------------"
@echo "generate the tags json files."
@echo "--------------------------------------------------------------------------------"
@rm -rf tags
@mkdir tags
@node $(SCRIPTS_DIR)write_tags_json.js
clean_tags:
@echo "--------------------------------------------------------------------------------"
@echo "clean tags dir and tags.json"
@echo "--------------------------------------------------------------------------------"
@rm -rf tags/
@rm -rf tags.json
@rm -rf tags.html
# authors
authors_overview_json:
@node $(SCRIPTS_DIR)write_authors_overview_json.js
authors_overview_html:
@node $(SCRIPTS_DIR)write_authors_overview_html.js
clean_authors:
@rm -rf authors.json
# temporary parts data
write_temp_json:
@echo "--------------------------------------------------------------------------------"
@echo "write the _temp_parts_data.json file"
@echo "--------------------------------------------------------------------------------"
@node $(SCRIPTS_DIR)write_temporary_json.js
clean_temp_json:
@echo "--------------------------------------------------------------------------------"
@echo "remove _temp_parts_data.json"
@echo "--------------------------------------------------------------------------------"
@rm -rf $(SCRIPTS_DIR)_temp_parts_data.json
# bootstrap
bootstrap:
git submodule init
git submodule update
npm install
# jekyll server
server:
jekyll serve --safe --baseurl '' --watch --verbose