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