Rebuild version.o when version.c or LAST_VERSION change
$(TOPDIR)/LAST_VERSION is a cached copy of common.mk's I3_VERSION var, updated only if the two differ.
This commit is contained in:
6
Makefile
6
Makefile
@ -22,6 +22,12 @@ include i3-dump-log/i3-dump-log.mk
|
||||
include docs/docs.mk
|
||||
include man/man.mk
|
||||
|
||||
# Update $(TOPDIR)/LAST_VERSION if it differs from $I3_VERSION
|
||||
CACHED_VERSION := '$(shell [ -f $(TOPDIR)/LAST_VERSION ] && cat $(TOPDIR)/LAST_VERSION)'
|
||||
ifneq ($(CACHED_VERSION),$(I3_VERSION))
|
||||
$(shell echo -n ${I3_VERSION} > $(TOPDIR)/LAST_VERSION)
|
||||
endif
|
||||
|
||||
real-all: $(ALL_TARGETS)
|
||||
|
||||
install: $(INSTALL_TARGETS)
|
||||
|
Reference in New Issue
Block a user