forked from concord-consortium/lab-interactives-site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·604 lines (487 loc) · 19.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
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
# See the README for installation instructions.
# Utilities
JS_COMPILER = ./node_modules/uglify-js/bin/uglifyjs -c -m -
COFFEESCRIPT_COMPILER = ./node_modules/coffee-script/bin/coffee
MARKDOWN_COMPILER = bin/kramdown
SASS_COMPILER = ./bin/sass -I src -I public -r ./src/helpers/sass/lab_fontface.rb
GENERATE_INTERACTIVE_INDEX = ruby src/helpers/process-interactives.rb
FONT_FOLDERS := $(shell find vendor/fonts -mindepth 1 -maxdepth 1)
SHUTTERBUG_GEM := $(shell bundle show shutterbug)
# targets
INTERACTIVE_FILES := $(shell find src/models src/interactives -name '*.json' -exec echo {} \; | sed s'/src\/\(.*\)/public\/\1/' )
vpath %.json src
HAML_FILES := $(shell find src -name '*.html.haml' -exec echo {} \; | sed s'/src\/\(.*\)\.haml/public\/\1/' )
vpath %.haml src
SASS_FILES := $(shell find src -name '*.sass' -and -not -path "src/sass/*" -exec echo {} \; | sed s'/src\/\(.*\)\.sass/public\/\1.css/' )
SASS_FILES += $(shell find src -name '*.scss' -and -not -path "src/sass/*" -exec echo {} \; | sed s'/src\/\(.*\)\.scss/public\/\1.css/' )
vpath %.sass src
vpath %.scss src
COFFEESCRIPT_FILES := $(shell find src/doc -name '*.coffee' -exec echo {} \; | sed s'/src\/\(.*\)\.coffee/public\/\1.js/' )
COFFEESCRIPT_FILES += $(shell find src/examples -name '*.coffee' -exec echo {} \; | sed s'/src\/\(.*\)\.coffee/public\/\1.js/' )
COFFEESCRIPT_FILES += $(shell find src/experiments -name '*.coffee' -exec echo {} \; | sed s'/src\/\(.*\)\.coffee/public\/\1.js/' )
vpath %.coffee src
MARKDOWN_FILES := $(patsubst %.md, public/%.html, $(wildcard *.md)) public/examples.html
DEV_MARKDOWN_FILES := $(patsubst %.md, public/%.html, $(wildcard developer-doc/*.md))
# default target executed when running make. Run the $(MAKE) public task rather than simply
# declaring a dependency on 'public' because 'bundle install' and 'npm install' might update some
# sources, and we want to recompute stale dependencies after that.
.PHONY: all
all: \
vendor/d3/d3.js \
node_modules \
bin
$(MAKE) public
# install Ruby Gem development dependencies
.PHONY: bin
bin:
bundle install --binstubs --quiet
# clean, make ... and also build and deploy the Java resources
.PHONY: everything
everything:
$(MAKE) clean
$(MAKE) all
$(MAKE) jnlp-all
.PHONY: src
src: \
$(MARKDOWN_FILES) \
$(DEV_MARKDOWN_FILES) \
$(HAML_FILES) \
$(SASS_FILES) \
$(COFFEESCRIPT_FILES) \
$(INTERACTIVE_FILES) \
public/interactives.html \
public/embeddable.html \
public/embeddable-staging.html \
public/embeddable-dev.html \
public/browser-check.html \
public/interactives.json \
public/application.js
# rebuild html files that use partials based on settings in project configuration
public/interactives.html: config/config.yml interactives.haml
public/interactives-staging.html: config/config.yml interactives.haml
public/interactives-dev.html: config/config.yml interactives.haml
public/embeddable.html: config/config.yml embeddable.haml
public/embeddable-staging.html: config/config.yml embeddable.haml
public/embeddable-dev.html: config/config.yml embeddable.haml
.PHONY: clean
clean:
ruby script/check-development-dependencies.rb
# remove the .bundle dir in case we are running this after running: make clean-for-tests
# which creates a persistent bundle grouping after installing just the minimum
# necessary set of gems for running tests using the arguments: --without development app
# Would be nice if bundle install had a --withall option to cancel this persistence.
rm -rf .bundle
# install/update Ruby Gems
bundle install --binstubs
$(MAKE) clean-finish
# Like clean without installing development-related Ruby Gems,intended
# to make testing faster on a continuous integration server.
# Minimal project build and run tests: make clean-for-tests; make test-src
.PHONY: clean-for-tests
clean-for-tests:
ruby script/check-development-dependencies.rb
# install/update Ruby Gems
bundle install --binstubs --without development app
$(MAKE) clean-finish
# public dir cleanup.
.PHONY: clean-finish
clean-finish:
mkdir -p public
$(MAKE) clean-public
# Remove Node modules.
rm -rf node_modules
-$(MAKE) submodule-update || $(MAKE) submodule-update-tags
# Remove generated products in vendor libraries
rm -f vendor/jquery/dist/jquery*.js
rm -f vendor/jquery-ui/dist/jquery-ui*.js
# hack to always download a new copy of grunt-contrib-jshint
# because of packaging issues with an unresolved jshint depedency when
# an older version of jshint is installed
if [ -d vendor/jquery/node_modules/grunt-contrib-jshint ]; then rm -rf vendor/jquery/node_modules/grunt-contrib-jshint; fi
if [ -d vendor/jquery-ui/node_modules/grunt-contrib-jshint ]; then rm -rf vendor/jquery-ui/node_modules/grunt-contrib-jshint; fi
# public dir cleanup.
.PHONY: clean-public
clean-public:
bash -O extglob -c 'rm -rf public/!(.git|jnlp|version)'
# versioned archives cleanup.
.PHONY: clean-archives
clean-archives:
rm -rf version
rm -rf public/version
# separate tasks for building and cleaning Java resources since they do not get updated often
.PHONY: jnlp-all
jnlp-all: clean-jnlp \
public/jnlp \
copy-resources-to-public
script/build-and-deploy-jars.rb --maven-update
.PHONY: clean-jnlp
clean-jnlp:
rm -rf public/jnlp
%.min.js: %.js
@rm -f $@
ifndef LAB_DEVELOPMENT
$(JS_COMPILER) < $< > $@
@chmod ug+w $@
else
endif
# ------------------------------------------------
#
# Submodules
#
# ------------------------------------------------
vendor/d3:
submodule-update
.PHONY: submodule-update
submodule-update:
git submodule update --init --recursive
.PHONY: submodule-update-tags
submodule-update-tags:
git submodule sync
git submodule foreach --recursive 'git fetch --tags'
git submodule update --init --recursive
# ------------------------------------------------
#
# Node modules
#
# ------------------------------------------------
node_modules: node_modules/d3
npm install
node_modules/d3:
npm install vendor/d3
# ------------------------------------------------
#
# public/
#
# ------------------------------------------------
public: \
copy-resources-to-public \
public/vendor \
public/examples \
public/doc \
public/developer-doc \
public/experiments \
public/jnlp
$(MAKE) src
# copy everything (including symbolic links) except files that are
# used to generate resources from src/ to public/
.PHONY: copy-resources-to-public
copy-resources-to-public:
rsync -aq --exclude='helpers/' --exclude='layouts/' --exclude='modules/' --exclude='sass/' --exclude='vendor/' --exclude='lab/' --filter '+ */' --exclude='*.haml' --exclude='*.sass' --exclude='*.scss' --exclude='*.yaml' --exclude='*.coffee' --exclude='*.rb' --exclude='*.md' src/ public/
public/examples:
mkdir -p public/examples
public/doc: \
public/doc/interactives \
public/doc/models
public/doc/interactives:
mkdir -p public/doc/interactives
public/doc/models:
mkdir -p public/doc/models
public/developer-doc:
mkdir -p public/developer-doc
.PHONY: public/experiments
public/experiments:
mkdir -p public/experiments
.PHONY: public/jnlp
public/jnlp:
mkdir -p public/jnlp
# ------------------------------------------------
#
# public/vendor
#
# External frameworks are built from git submodules checked out into vendor/.
# Just the generated libraries and licenses are copied to public/vendor
#
# ------------------------------------------------
public/vendor: \
public/vendor/d3 \
public/vendor/d3-plugins \
public/vendor/jquery/jquery.min.js \
public/vendor/jquery-ui/jquery-ui.min.js \
public/vendor/jquery-ui-touch-punch/jquery.ui.touch-punch.min.js \
public/vendor/jquery-selectBoxIt/jquery.selectBoxIt.min.js \
public/vendor/tinysort/jquery.tinysort.js \
public/vendor/jquery-context-menu \
public/vendor/science.js \
public/vendor/modernizr \
public/vendor/sizzle \
public/vendor/hijs \
public/vendor/mathjax \
public/vendor/fonts \
public/vendor/codemirror \
public/vendor/dsp.js \
public/vendor/requirejs \
public/vendor/text \
public/vendor/domReady \
public/vendor/fingerprintjs \
public/vendor/shutterbug/shutterbug.js \
public/vendor/shutterbug/README.md \
public/vendor/shutterbug/LICENSE.md \
public/vendor/lab-sensor-applet-interface-dist \
public/vendor/sensor-labquest-2-interface/sensor-labquest-2-interface.js \
public/vendor/iframe-phone/iframe-phone.js \
public/vendor/chosen/chosen.jquery.min.js \
public/vendor/lab-grapher/lab-grapher.css \
public/favicon.ico
public/vendor/dsp.js:
mkdir -p public/vendor/dsp.js
cp vendor/dsp.js/dsp.js public/vendor/dsp.js
cp vendor/dsp.js/LICENSE public/vendor/dsp.js/LICENSE
cp vendor/dsp.js/README public/vendor/dsp.js/README
public/vendor/d3: vendor/d3
mkdir -p public/vendor/d3
cp vendor/d3/d3*.js public/vendor/d3
cp vendor/d3/LICENSE public/vendor/d3/LICENSE
cp vendor/d3/README.md public/vendor/d3/README.md
public/vendor/d3-plugins:
mkdir -p public/vendor/d3-plugins/cie
cp vendor/d3-plugins/LICENSE public/vendor/d3-plugins/LICENSE
cp vendor/d3-plugins/README.md public/vendor/d3-plugins/README.md
cp vendor/d3-plugins/cie/*.js public/vendor/d3-plugins/cie
cp vendor/d3-plugins/cie/README.md public/vendor/d3-plugins/cie/README.md
public/vendor/jquery-ui-touch-punch/jquery.ui.touch-punch.min.js: \
public/vendor/jquery-ui-touch-punch \
vendor/jquery-ui-touch-punch/jquery.ui.touch-punch.min.js \
vendor/jquery-ui-touch-punch/jquery.ui.touch-punch.js
cp vendor/jquery-ui-touch-punch/jquery.ui.touch-punch.min.js public/vendor/jquery-ui-touch-punch
cp vendor/jquery-ui-touch-punch/jquery.ui.touch-punch.js public/vendor/jquery-ui-touch-punch
public/vendor/jquery-ui-touch-punch:
mkdir -p public/vendor/jquery-ui-touch-punch
public/vendor/jquery-selectBoxIt/jquery.selectBoxIt.min.js: \
vendor/jquery-selectBoxIt/src/javascripts/jquery.selectBoxIt.js \
vendor/jquery-selectBoxIt/src/javascripts/jquery.selectBoxIt.min.js \
vendor/jquery-selectBoxIt/src/stylesheets/jquery.selectBoxIt.css \
public/vendor/jquery-selectBoxIt
cp vendor/jquery-selectBoxIt/src/javascripts/jquery.selectBoxIt.js public/vendor/jquery-selectBoxIt
cp vendor/jquery-selectBoxIt/src/javascripts/jquery.selectBoxIt.min.js public/vendor/jquery-selectBoxIt
cp vendor/jquery-selectBoxIt/src/stylesheets/jquery.selectBoxIt.css public/vendor/jquery-selectBoxIt
public/vendor/jquery-selectBoxIt:
mkdir -p public/vendor/jquery-selectBoxIt
public/vendor/chosen/chosen.jquery.min.js: \
public/vendor/chosen
cp vendor/chosen/chosen.jquery.min.js public/vendor/chosen
cp vendor/chosen/chosen.css public/vendor/chosen
cp vendor/chosen/*.png public/vendor/chosen
public/vendor/chosen:
mkdir -p public/vendor/chosen
public/vendor/jquery-context-menu:
mkdir -p public/vendor/jquery-context-menu
cp vendor/jquery-context-menu/src/jquery.contextMenu.js public/vendor/jquery-context-menu
cp vendor/jquery-context-menu/src/jquery.contextMenu.css public/vendor/jquery-context-menu
public/vendor/jquery/jquery.min.js: \
vendor/jquery/dist/jquery.min.js \
public/vendor/jquery
cp vendor/jquery/dist/jquery*.js public/vendor/jquery
cp vendor/jquery/dist/jquery.min.map public/vendor/jquery
cp vendor/jquery/MIT-LICENSE.txt public/vendor/jquery
cp vendor/jquery/README.md public/vendor/jquery
public/vendor/jquery:
mkdir -p public/vendor/jquery
public/vendor/jquery-ui/jquery-ui.min.js: \
vendor/jquery-ui/dist/jquery-ui.min.js \
public/vendor/jquery-ui
cp -r vendor/jquery-ui/dist/* public/vendor/jquery-ui
cp -r vendor/jquery-ui/themes/base/images public/vendor/jquery-ui
cp vendor/jquery-ui/MIT-LICENSE.txt public/vendor/jquery-ui
public/vendor/jquery-ui:
mkdir -p public/vendor/jquery-ui
public/vendor/tinysort:
mkdir -p public/vendor/tinysort
public/vendor/tinysort/jquery.tinysort.js: \
public/vendor/tinysort
cp -r vendor/tinysort/src/* public/vendor/tinysort
cp vendor/tinysort/README.md public/vendor/tinysort
public/vendor/science.js:
mkdir -p public/vendor/science.js
cp vendor/science.js/science*.js public/vendor/science.js
cp vendor/science.js/LICENSE public/vendor/science.js
cp vendor/science.js/README.md public/vendor/science.js
public/vendor/modernizr:
mkdir -p public/vendor/modernizr
cp vendor/modernizr/modernizr.js public/vendor/modernizr
cp vendor/modernizr/readme.md public/vendor/modernizr
public/vendor/sizzle:
mkdir -p public/vendor/sizzle
cp vendor/sizzle/sizzle.js public/vendor/sizzle
cp vendor/sizzle/LICENSE public/vendor/sizzle
cp vendor/sizzle/README public/vendor/sizzle
public/vendor/hijs:
mkdir -p public/vendor/hijs
cp vendor/hijs/hijs.js public/vendor/hijs
cp vendor/hijs/LICENSE public/vendor/hijs
cp vendor/hijs/README.md public/vendor/hijs
public/vendor/mathjax:
mkdir -p public/vendor/mathjax
cp vendor/mathjax/MathJax.js public/vendor/mathjax
cp vendor/mathjax/LICENSE public/vendor/mathjax
cp vendor/mathjax/README.md public/vendor/mathjax
cp -R vendor/mathjax/jax public/vendor/mathjax
cp -R vendor/mathjax/extensions public/vendor/mathjax
cp -R vendor/mathjax/images public/vendor/mathjax
cp -R vendor/mathjax/fonts public/vendor/mathjax
cp -R vendor/mathjax/config public/vendor/mathjax
public/vendor/fonts: $(FONT_FOLDERS)
mkdir -p public/vendor/fonts
cp -R vendor/fonts public/vendor/
rm -rf public/vendor/fonts/Font-Awesome/.git*
rm -f public/vendor/fonts/Font-Awesome/.gitignore
rm -rf public/vendor/fonts/Font-Awesome/less
rm -rf public/vendor/fonts/Font-Awesome/sass
public/vendor/requirejs:
mkdir -p public/vendor/requirejs
cp vendor/requirejs/require.js public/vendor/requirejs
cp vendor/requirejs/LICENSE public/vendor/requirejs
cp vendor/requirejs/README.md public/vendor/requirejs
public/vendor/text:
mkdir -p public/vendor/text
cp vendor/text/text.js public/vendor/text
cp vendor/text/LICENSE public/vendor/text
cp vendor/text/README.md public/vendor/text
public/vendor/domReady:
mkdir -p public/vendor/domReady
cp vendor/domReady/domReady.js public/vendor/domReady
cp vendor/domReady/LICENSE public/vendor/domReady
cp vendor/domReady/README.md public/vendor/domReady
public/vendor/codemirror:
mkdir -p public/vendor/codemirror
cp vendor/codemirror/LICENSE public/vendor/codemirror
cp vendor/codemirror/README.md public/vendor/codemirror
cp -R vendor/codemirror/lib public/vendor/codemirror
cp -R vendor/codemirror/addon public/vendor/codemirror
cp -R vendor/codemirror/mode public/vendor/codemirror
cp -R vendor/codemirror/theme public/vendor/codemirror
cp -R vendor/codemirror/keymap public/vendor/codemirror
# remove codemirror modules excluded by incompatible licensing
rm -rf public/vendor/codemirror/mode/go
rm -rf public/vendor/codemirror/mode/rst
rm -rf public/vendor/codemirror/mode/verilog
public/vendor/fingerprintjs:
mkdir -p public/vendor/fingerprintjs
cp vendor/fingerprintjs/fingerprint.min.js public/vendor/fingerprintjs
cp vendor/fingerprintjs/README.md public/vendor/fingerprintjs
public/vendor/shutterbug:
mkdir -p public/vendor/shutterbug
public/vendor/shutterbug/shutterbug.js: public/vendor/shutterbug \
vendor/shutterbug/shutterbug.js
sed -e s'/CONVERT_PATH/shutterbug\/make_snapshot/' vendor/shutterbug/shutterbug.js > public/vendor/shutterbug/shutterbug.js
public/vendor/shutterbug/README.md: public/vendor/shutterbug \
vendor/shutterbug/README.md
cp vendor/shutterbug/README.md public/vendor/shutterbug
public/vendor/shutterbug/LICENSE.md: public/vendor/shutterbug \
vendor/shutterbug/LICENSE.md
cp vendor/shutterbug/LICENSE.md public/vendor/shutterbug
public/vendor/lab-sensor-applet-interface-dist: vendor/lab-sensor-applet-interface-dist
mkdir -p public/vendor/lab-sensor-applet-interface-dist
cp -r vendor/lab-sensor-applet-interface-dist/* public/vendor/lab-sensor-applet-interface-dist/
public/vendor/sensor-labquest-2-interface/sensor-labquest-2-interface.js: \
public/vendor/sensor-labquest-2-interface \
vendor/sensor-labquest-2-interface/dist/sensor-labquest-2-interface.js
cp vendor/sensor-labquest-2-interface/dist/sensor-labquest-2-interface.js public/vendor/sensor-labquest-2-interface/
public/vendor/sensor-labquest-2-interface:
mkdir -p public/vendor/sensor-labquest-2-interface
public/vendor/iframe-phone/iframe-phone.js: \
public/vendor/iframe-phone \
vendor/iframe-phone/dist/iframe-phone.js
cp vendor/iframe-phone/dist/iframe-phone.js public/vendor/iframe-phone/
public/vendor/iframe-phone:
mkdir -p public/vendor/iframe-phone
public/vendor/lab-grapher/lab-grapher.css: \
public/vendor/lab-grapher \
vendor/lab-grapher/css/lab-grapher.css
cp vendor/lab-grapher/css/lab-grapher.css public/vendor/lab-grapher/
public/vendor/lab-grapher:
mkdir -p public/vendor/lab-grapher
public/favicon.ico:
cp -f src/favicon.ico public/favicon.ico
vendor/jquery/dist/jquery.min.js: vendor/jquery
cd vendor/jquery; npm install; \
npm install grunt-cli; \
./node_modules/grunt-cli/bin/grunt
vendor/jquery:
git submodule update --init --recursive
vendor/jquery-ui/dist/jquery-ui.min.js: vendor/jquery-ui
cd vendor/jquery-ui; npm install; \
npm install grunt-cli; \
./node_modules/grunt-cli/bin/grunt build
vendor/jquery-ui:
git submodule update --init --recursive
vendor/lab-sensor-applet-interface-dist:
git submodule update --init --recursive
vendor/sensor-labquest-2-interface/dist/sensor-labquest-2-interface.js:
git submodule update --init --recursive
vendor/shutterbug:
mkdir -p vendor/shutterbug
vendor/shutterbug/shutterbug.js: vendor/shutterbug \
$(SHUTTERBUG_GEM)/lib/shutterbug/handlers/shutterbug.js
cp $(SHUTTERBUG_GEM)/lib/shutterbug/handlers/shutterbug.js vendor/shutterbug
vendor/shutterbug/README.md: vendor/shutterbug \
$(SHUTTERBUG_GEM)/README.md
cp $(SHUTTERBUG_GEM)/README.md vendor/shutterbug
vendor/shutterbug/LICENSE.md: vendor/shutterbug \
$(SHUTTERBUG_GEM)/LICENSE.md
cp $(SHUTTERBUG_GEM)/LICENSE.md vendor/shutterbug
# ------------------------------------------------
#
# targets for generating html, js, and css resources
#
# ------------------------------------------------
test/%.html: test/%.html.haml
haml $< $@
public/%.html: src/%.html.haml script/setup.rb
haml -r ./script/setup.rb $< $@
public/%.html: src/%.html
cp $< $@
public/%.css: src/%.css
cp $< $@
public/%.css: %.scss
$(SASS_COMPILER) $< $@
public/%.css: %.sass
@echo $($<)
$(SASS_COMPILER) $< $@
public/%.js: %.coffee
@rm -f $@
$(COFFEESCRIPT_COMPILER) --compile --print $< > $@
# replace relative references to .md files for the static build
# look for pattern like ](*.md) replace with ](*.html)
# the ':' is hack so it doesn't match absolute http:// urls
# the second command is necessary to match anchor references in md files
%.md.static: %.md
@rm -f $@
sed -e s';\](\([^):]*\)\.md);\](\1.html);' -e s';\](\([^):]*\)\.md\(#[^)]*\));\](\1.html\2);' $< > $@
public/developer-doc/%.html: developer-doc/%.md.static
@rm -f $@
$(MARKDOWN_COMPILER) -i GFM $< --template src/layouts/developer-doc.html.erb > $@
public/examples.html: src/examples.md.static
@rm -f $@
$(MARKDOWN_COMPILER) $< --toc-levels 2..6 --template src/layouts/top-level.html.erb > $@
public/%.html: %.md.static
@rm -f $@
$(MARKDOWN_COMPILER) $< --toc-levels 2..6 --template src/layouts/top-level.html.erb > $@
public/interactives/%.json: src/interactives/%.json
@cp $< $@
public/models/%.json: src/models/%.json
@cp $< $@
.PHONY: public/interactives.json
public/interactives.json: $(INTERACTIVE_FILES)
$(GENERATE_INTERACTIVE_INDEX)
# delete the .md.static files and don't bother creating them if they don't need to be
.INTERMEDIATE: %.md.static src/examples.md.static
# ------------------------------------------------
#
# Targets to help debugging/development of Makefile
#
# ------------------------------------------------
.PHONY: h
h:
@echo $(HAML_FILES)
.PHONY: s
s:
@echo $(SASS_FILES)
.PHONY: m
m:
@echo $(MARKDOWN_FILES)
.PHONY: c
c:
@echo $(COFFEESCRIPT_FILES)
.PHONY: int
int:
@echo $(INTERACTIVE_FILES)