2011-05-12 11:22:35 -07:00
|
|
|
#
|
2012-05-21 04:12:37 -07: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 11:22:35 -07:00
|
|
|
|
2013-02-22 10:49:05 -08:00
|
|
|
USE_RCS_MK := 1
|
|
|
|
include $(topsrcdir)/config/makefiles/rcs.mk
|
2011-05-12 11:22:35 -07:00
|
|
|
|
2013-01-08 06:04:37 -08:00
|
|
|
LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/build
|
2013-04-19 04:54:18 -07:00
|
|
|
LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/threads
|
2013-01-08 06:04:37 -08:00
|
|
|
|
2013-12-02 13:34:21 -08:00
|
|
|
MOZ_HISTOGRAMS_VERSION ?= $(call getSourceRepo)/rev/$(firstword $(shell hg -R $(topsrcdir) parent --template='{node|short}\n' 2>/dev/null))
|
2013-02-20 10:46:47 -08:00
|
|
|
ifdef MOZ_HISTOGRAMS_VERSION
|
2013-12-02 13:34:21 -08:00
|
|
|
DEFINES += -DHISTOGRAMS_FILE_VERSION='$(MOZ_HISTOGRAMS_VERSION)'
|
2013-02-20 10:46:47 -08:00
|
|
|
endif
|
|
|
|
|
2013-09-03 20:28:05 -07:00
|
|
|
INSTALL_TARGETS += histoenums
|
|
|
|
histoenums_FILES := TelemetryHistogramEnums.h
|
|
|
|
histoenums_DEST = $(DIST)/include/mozilla
|
|
|
|
histoenums_TARGET := export
|
|
|
|
|
2011-05-12 11:22:35 -07:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
2012-08-24 12:54:55 -07:00
|
|
|
|
|
|
|
histograms_file := $(srcdir)/Histograms.json
|
|
|
|
histogram_enum_file := TelemetryHistogramEnums.h
|
|
|
|
histogram_data_file := TelemetryHistogramData.inc
|
|
|
|
|
2012-08-27 13:47:32 -07: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 12:54:55 -07:00
|
|
|
$(PYTHON) $(srcdir)/gen-histogram-enum.py $< > $@
|
2012-08-27 13:47:32 -07:00
|
|
|
$(histogram_data_file): $(histograms_file) $(data_python_deps)
|
2012-08-24 12:54:55 -07:00
|
|
|
$(PYTHON) $(srcdir)/gen-histogram-data.py $< > $@
|
|
|
|
|
2013-11-21 15:16:18 -08:00
|
|
|
GARBAGE += $(histogram_enum_file)
|