-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
46 lines (37 loc) · 1.51 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
# Makefile
.NOTPARALLEL:
help:
@echo "Syntax: make TARGETS ... [OPTIONS ...]"
@echo "Targets:"
@echo " clean cleanup old test results"
@echo " models update test models"
@echo " report update validation data report"
@echo " help display this help information"
@echo " validate perform validation tests"
@echo "Options:"
@echo " VERBOSE=yes"
@echo " DEBUG=yes"
OPTIONS=
ifeq ($(VERBOSE),yes)
OPTIONS+=--verbose
endif
ifeq ($(DEBUG),yes)
OPTIONS+=--debug
endif
models:
@git submodule sync
@git submodule update --init --recursive --force --checkout --remote
validate:
@./validate.sh $(OPTIONS)
clean:
@rm -rf test validate.txt validate.tar.gz stderr stdout
report: data report/Validation_Report.pdf
data:
python3 report/make_table.py US/CA/SLAC/loadfactor/autotest/models/gridlabd-4/*/*/loads.csv > report/loadfactor_loads.tex
python3 report/make_table.py US/CA/SLAC/ica_analysis/autotest/models/gridlabd-4/*/*/solar_capacity.csv > report/ica_analysis_solar_capacity.tex
python3 report/make_table.py US/CA/SLAC/ica_analysis/autotest/models/gridlabd-4/*/*/violation_details.csv > report/ica_analysis_violation_details.tex
python3 report/make_table.py US/CA/SLAC/electrification/autotest/models/gridlabd-4/*/*/electrification.csv > report/electrification_details.tex
touch report/Validation_report.tex
%.pdf: %.tex
(cd $(shell dirname $?); pdflatex -halt-on-error $(shell basename $?)) 1>$?.out 2>$?.err
(cd $(shell dirname $?); pdflatex -halt-on-error $(shell basename $?)) 1>>$?.out 2>>$?.err