/
Makefile
112 lines (89 loc) · 4.63 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
#
# manuals makefile
#
BAREOS_DIR=../../../bareos-master/b/systemtests/sbin/bareos-dir
BAREOS_SD=../../../bareos-master/b/systemtests/sbin/bareos-sd
BAREOS_FD=../../../bareos-master/b/systemtests/sbin/bareos-fd
BCONSOLE=../../../bareos-master/b/systemtests/bin/bconsole
BAREOS_TRAY_MONITOR=../../../bareos-master/b/core/src/qt-tray-monitor/bareos-tray-monitor
AUTOGENERATED_RESOURCE_DESCRIPTION_RST_FILES = include/autogenerated/bareos-dir-*.rst.inc \
include/autogenerated/bareos-sd-*.rst.inc \
include/autogenerated/bareos-fd-*.rst.inc \
include/autogenerated/bconsole-*.rst.inc \
include/autogenerated/bareos-tray-monitor-*.rst.inc
AUTOGENERATED_RESOURCE_DESCRIPTION_JSON_FILES = autogenerated/bareos-dir-config-schema.json \
autogenerated/bareos-sd-config-schema.json \
autogenerated/bareos-fd-config-schema.json \
autogenerated/bconsole-config-schema.json \
autogenerated/bareos-tray-monitor-config-schema.json
GENERATE_RESOURCE_DESCRIPTIONS_FROM_JSON_FILES=./scripts/generate-resoure-descriptions.py --sphinx
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = BareosMainReference
SOURCEDIR = source
BUILDDIR = BareosMainReference
all: $(AUTOGENERATED_RESOURCE_DESCRIPTION_RST_FILES)
make sphinx
make check-json-files-for-changes
all-rebuild-json:
make clean clean-json-files
make all
include/autogenerated/bareos-dir-*.rst.inc: autogenerated/bareos-dir-config-schema.json
@# generates all director-resource files
$(GENERATE_RESOURCE_DESCRIPTIONS_FROM_JSON_FILES) autogenerated/bareos-dir-config-schema.json
include/autogenerated/bareos-sd-*.rst.inc: autogenerated/bareos-sd-config-schema.json
@# generates all storage daemon resource files
$(GENERATE_RESOURCE_DESCRIPTIONS_FROM_JSON_FILES) autogenerated/bareos-sd-config-schema.json
include/autogenerated/bareos-fd-*.rst.inc: autogenerated/bareos-fd-config-schema.json
@# generates all file daemon resource files
$(GENERATE_RESOURCE_DESCRIPTIONS_FROM_JSON_FILES) autogenerated/bareos-fd-config-schema.json
include/autogenerated/bconsole-*.rst.inc: autogenerated/bconsole-config-schema.json
@# generates all bconsole resource files
$(GENERATE_RESOURCE_DESCRIPTIONS_FROM_JSON_FILES) autogenerated/bconsole-config-schema.json
include/autogenerated/bareos-tray-monitor-*.rst.inc: autogenerated/bareos-tray-monitor-config-schema.json
@# generates all tray-monitor resource files
$(GENERATE_RESOURCE_DESCRIPTIONS_FROM_JSON_FILES) autogenerated/bareos-tray-monitor-config-schema.json
autogenerated/bareos-dir-config-schema.json:
@# generate config-schema file.
@# Test if creation succeeded, if yes, redirect output to a json file.
@test -f "$(BAREOS_DIR)" || (echo "\"$(BAREOS_DIR)\" does not exist"; exit 1)
$(BAREOS_DIR) -xs >/dev/null && \
$(BAREOS_DIR) -xs > autogenerated/bareos-dir-config-schema.json;
autogenerated/bareos-sd-config-schema.json:
@# generate config-schema file.
@# Test if creation succeeded, if yes, redirect output to a json file.
@test -f "$(BAREOS_SD)" || (echo "\"$(BAREOS_SD)\" does not exist"; exit 1)
$(BAREOS_SD) -xs >/dev/null && \
$(BAREOS_SD) -xs > autogenerated/bareos-sd-config-schema.json;
autogenerated/bareos-fd-config-schema.json:
@# generate config-schema file.
@# Test if creation succeeded, if yes, redirect output to a json file.
@test -f "$(BAREOS_FD)" || (echo "\"$(BAREOS_FD)\" does not exist"; exit 1)
$(BAREOS_FD) -xs >/dev/null && \
$(BAREOS_FD) -xs > autogenerated/bareos-fd-config-schema.json;
autogenerated/bconsole-config-schema.json:
@# generate config-schema file.
@# Test if creation succeeded, if yes, redirect output to a json file.
@test -f "$(BCONSOLE)" || (echo "\"$(BCONSOLE)\" does not exist"; exit 1)
$(BCONSOLE) -xs >/dev/null && \
$(BCONSOLE) -xs > autogenerated/bconsole-config-schema.json;
autogenerated/bareos-tray-monitor-config-schema.json:
@# generate config-schema file.
@# Test if creation succeeded, if yes, redirect output to a json file.
@test -f "$(BAREOS_TRAY_MONITOR)" || (echo "\"$(BAREOS_TRAY_MONITOR)\" does not exist"; exit 1)
$(BAREOS_TRAY_MONITOR) -xs >/dev/null && \
$(BAREOS_TRAY_MONITOR) -xs > autogenerated/bareos-tray-monitor-config-schema.json;
sphinx:
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
check-json-files-for-changes:
@git diff --quiet source/include/autogenerated/ || echo "!!! *** Attention, config directive has changed *** !!!"
clean:
rm -rf BareosMainReference
rm -rf autogenerated/*.rst.inc #this does not reset the json files
clean-json-files:
rm -rf autogenerated/*.json
distclean:
make clean
rm -f source/_extensions/*.pyc
git checkout -f source/include/autogenerated #this will reset the json files