2011-05-12 22:22:35 +04:00
|
|
|
#
|
2012-05-21 15:12:37 +04:00
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
2011-05-12 22:22:35 +04:00
|
|
|
|
2013-02-22 22:49:05 +04:00
|
|
|
USE_RCS_MK := 1
|
|
|
|
include $(topsrcdir)/config/makefiles/rcs.mk
|
2011-05-12 22:22:35 +04:00
|
|
|
|
2014-01-03 21:02:48 +04:00
|
|
|
DEFINES += -DMOZ_APP_VERSION='"$(MOZ_APP_VERSION)"'
|
|
|
|
|
2013-12-03 01:34:21 +04:00
|
|
|
MOZ_HISTOGRAMS_VERSION ?= $(call getSourceRepo)/rev/$(firstword $(shell hg -R $(topsrcdir) parent --template='{node|short}\n' 2>/dev/null))
|
2013-02-20 22:46:47 +04:00
|
|
|
ifdef MOZ_HISTOGRAMS_VERSION
|
2013-12-03 01:34:21 +04:00
|
|
|
DEFINES += -DHISTOGRAMS_FILE_VERSION='$(MOZ_HISTOGRAMS_VERSION)'
|
2013-02-20 22:46:47 +04:00
|
|
|
endif
|
|
|
|
|
2013-09-04 07:28:05 +04:00
|
|
|
INSTALL_TARGETS += histoenums
|
|
|
|
histoenums_FILES := TelemetryHistogramEnums.h
|
|
|
|
histoenums_DEST = $(DIST)/include/mozilla
|
|
|
|
histoenums_TARGET := export
|
|
|
|
|
2011-05-12 22:22:35 +04:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
2012-08-24 23:54:55 +04:00
|
|
|
|
|
|
|
histograms_file := $(srcdir)/Histograms.json
|
|
|
|
histogram_enum_file := TelemetryHistogramEnums.h
|
|
|
|
histogram_data_file := TelemetryHistogramData.inc
|
|
|
|
|
2012-08-28 00:47:32 +04:00
|
|
|
enum_python_deps := \
|
|
|
|
$(srcdir)/gen-histogram-enum.py \
|
|
|
|
$(srcdir)/histogram_tools.py \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
data_python_deps := \
|
|
|
|
$(srcdir)/gen-histogram-data.py \
|
|
|
|
$(srcdir)/histogram_tools.py \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
$(histogram_enum_file): $(histograms_file) $(enum_python_deps)
|
2012-08-24 23:54:55 +04:00
|
|
|
$(PYTHON) $(srcdir)/gen-histogram-enum.py $< > $@
|
2012-08-28 00:47:32 +04:00
|
|
|
$(histogram_data_file): $(histograms_file) $(data_python_deps)
|
2012-08-24 23:54:55 +04:00
|
|
|
$(PYTHON) $(srcdir)/gen-histogram-data.py $< > $@
|
|
|
|
|
2013-11-22 03:16:18 +04:00
|
|
|
GARBAGE += $(histogram_enum_file)
|