-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.win
44 lines (32 loc) · 1.54 KB
/
Makefile.win
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
SHELL := cmd
TEST_FLAVOR ?= iso
TEST_PROCESSORS = "iso cc un iec m3aawg jcgm csa itu bipm ietf ieee" # ogc
build:
if not exist build md build
build/%: resources.win/% | build
cp $< $@
build/Gemfile: Gemfile | build
cp $< $@
build/Gemfile.lock: build/Gemfile | build
pushd build & bundle install & popd
build/metanorma: bin/metanorma | build
cp $< $@
build/cacert.pem.mozilla:
curl -L https://curl.se/ca/cacert.pem > $@
build/metanorma.exe: build/cacert.pem.mozilla build/metanorma.ico build/metanorma build/Gemfile build/Gemfile.lock
ifeq (,$(wildcard build/metanorma.exe))
gem install aibika --conservative
pushd build & aibika --console --gemfile Gemfile --gem-full --add-all-core --icon metanorma.ico \
--no-autoload \
metanorma cacert.pem.mozilla & popd
endif
build/mparallel.exe:
curl -L https://github.com/lordmulder/MParallel/releases/download/1.0.4/mparallel.2016-06-08.bin-win64.zip > $(TEMP)/mparallel.zip; \
unzip $(TEMP)/mparallel.zip MParallel.exe; \
mv MParallel.exe build/mparallel.exe
test: build/mparallel.exe
build/mparallel.exe --trace --logfile=parallel.log --pattern="make -f Makefile.win test-flavor SHELL=cmd TEST_FLAVOR={{0}} > test_{{0}}.log 2>&1" $(subst , : ,$(TEST_PROCESSORS))
test-flavor:
if not exist build\$(TEST_FLAVOR) git clone --recurse-submodules https://${GITHUB_CREDENTIALS}@github.com/metanorma/mn-samples-$(TEST_FLAVOR) build/$(TEST_FLAVOR) & %cd%\build\metanorma.exe site generate build/$(TEST_FLAVOR) -c build/$(TEST_FLAVOR)/metanorma.yml -o site/$(TEST_FLAVOR) --agree-to-terms
clean:
rmdir /q /s build