Files
lk/lib/version/rules.mk
Girts 3972b18697 [make] [lib/version] remove a misplaced .PHONY (#170)
When lib/version was included, a rule depended on .PHONY.  This would
unexpectedly invoke other rules defined as dependent on .PHONY (standard
phony-ness signal).

As a side effect, this used to generate srcfiles.txt and
include_paths.txt in build dir. Since they are useful, we might always
build those anyway, and not make them phony at all.
2016-10-07 11:24:29 -07:00

34 lines
878 B
Makefile

LOCAL_DIR := $(GET_LOCAL_DIR)
MODULE := $(LOCAL_DIR)
MODULE_SRCS += \
$(LOCAL_DIR)/version.c
# if no one else has defined it by now, build us a default buildid
# based on the current time.
# suffix it with _LOCAL if OFFICIAL_BUILD is unset
ifeq ($(strip $(BUILDID)),)
ifneq ($(OFFICIAL_BUILD),)
BUILDID := "$(shell $(LOCAL_DIR)/buildid.sh)"
else
BUILDID := "$(shell $(LOCAL_DIR)/buildid.sh)_LOCAL"
endif
endif
# Generate a buildid.h file, lazy evaluate BUILDID_DEFINE at the end
# of the first make pass. This lets modules that haven't been
# included yet set BUILDID.
BUILDID_DEFINE="BUILDID=\"$(BUILDID)\""
BUILDID_H := $(BUILDDIR)/buildid.h
$(BUILDID_H):
@$(call MAKECONFIGHEADER,$@,BUILDID_DEFINE)
.PHONY: $(BUILDID_H)
GENERATED += $(BUILDID_H)
# make sure the module properly depends on and can find buildid.h
MODULE_SRCDEPS := $(BUILDID_H)
include make/module.mk