1# Copyright 2016 The Fuchsia Authors 2# Copyright (c) 2008-2015 Travis Geiselbrecht 3# 4# Use of this source code is governed by a MIT-style 5# license that can be found in the LICENSE file or at 6# https://opensource.org/licenses/MIT 7 8LOCAL_DIR := $(GET_LOCAL_DIR) 9 10MODULE := $(LOCAL_DIR) 11 12MODULE_SRCS += \ 13 $(LOCAL_DIR)/version.cpp 14 15# if no one else has defined it by now, build us a default buildid 16# based on the current time. 17ifeq ($(strip $(BUILDID)),) 18BUILDID := "$(shell $(SHELLEXEC) $(LOCAL_DIR)/buildid.sh)" 19endif 20 21# Generate a buildid.h file, lazy evaulated BUILDID_DEFINE at the end 22# of the first make pass. This lets modules that haven't been 23# included yet set BUILDID. 24BUILDID_DEFINE="BUILDID=\"$(BUILDID)\"" 25BUILDID_H := $(BUILDDIR)/config-buildid.h 26$(BUILDID_H): FORCE 27 @$(call MAKECONFIGHEADER,$@,BUILDID_DEFINE) 28 29GENERATED += $(BUILDID_H) 30 31# make sure the module properly depends on and can find buildid.h 32MODULE_SRCDEPS := $(BUILDID_H) 33 34include make/module.mk 35