|
1 # |
|
2 # This Source Code Form is subject to the terms of the Mozilla Public |
|
3 # License, v. 2.0. If a copy of the MPL was not distributed with this |
|
4 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
|
5 |
|
6 USE_RCS_MK := 1 |
|
7 include $(topsrcdir)/config/makefiles/rcs.mk |
|
8 |
|
9 DEFINES += -DMOZ_APP_VERSION='"$(MOZ_APP_VERSION)"' |
|
10 |
|
11 MOZ_HISTOGRAMS_VERSION ?= $(call getSourceRepo)/rev/$(firstword $(shell hg -R $(topsrcdir) parent --template='{node|short}\n' 2>/dev/null)) |
|
12 ifdef MOZ_HISTOGRAMS_VERSION |
|
13 DEFINES += -DHISTOGRAMS_FILE_VERSION='$(MOZ_HISTOGRAMS_VERSION)' |
|
14 endif |
|
15 |
|
16 INSTALL_TARGETS += histoenums |
|
17 histoenums_FILES := TelemetryHistogramEnums.h |
|
18 histoenums_DEST = $(DIST)/include/mozilla |
|
19 histoenums_TARGET := export |
|
20 |
|
21 include $(topsrcdir)/config/rules.mk |
|
22 |
|
23 histograms_file := $(srcdir)/Histograms.json |
|
24 histogram_enum_file := TelemetryHistogramEnums.h |
|
25 histogram_data_file := TelemetryHistogramData.inc |
|
26 |
|
27 enum_python_deps := \ |
|
28 $(srcdir)/gen-histogram-enum.py \ |
|
29 $(srcdir)/histogram_tools.py \ |
|
30 $(NULL) |
|
31 |
|
32 data_python_deps := \ |
|
33 $(srcdir)/gen-histogram-data.py \ |
|
34 $(srcdir)/histogram_tools.py \ |
|
35 $(NULL) |
|
36 |
|
37 $(histogram_enum_file): $(histograms_file) $(enum_python_deps) |
|
38 $(PYTHON) $(srcdir)/gen-histogram-enum.py $< > $@ |
|
39 $(histogram_data_file): $(histograms_file) $(data_python_deps) |
|
40 $(PYTHON) $(srcdir)/gen-histogram-data.py $< > $@ |
|
41 |
|
42 GARBAGE += $(histogram_enum_file) |