From acdd5287a9223d2eb5f47fa519f6d21232eabcc7 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sun, 5 Aug 2012 14:38:52 +0200 Subject: [PATCH] unbreak the build --- Makefile | 3 ++- common.mk | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index f1104ead..16b444c4 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,8 @@ dist: distclean # Only copy source code from i3-input mkdir i3-${VERSION}/i3-input find i3-input -maxdepth 1 -type f \( -name "*.c" -or -name "*.mk" -or -name "*.h" -or -name "Makefile" \) -exec cp '{}' i3-${VERSION}/i3-input \; - echo -n ${I3_VERSION} > i3-${VERSION}/VERSION + echo -n ${I3_VERSION} > i3-${VERSION}/I3_VERSION + echo -n ${VERSION} > i3-${VERSION}/VERSION # Pre-generate a manpage to allow distributors to skip this step and save some dependencies $(MAKE) mans cp man/*.1 i3-${VERSION}/man/ diff --git a/common.mk b/common.mk index 21e10257..0d2ad51e 100644 --- a/common.mk +++ b/common.mk @@ -15,12 +15,12 @@ ifndef SYSCONFDIR endif endif -I3_VERSION := '$(shell [ -f $(TOPDIR)/VERSION ] && cat $(TOPDIR)/VERSION)' +# In dist tarballs, the version is stored in the I3_VERSION and VERSION files. +I3_VERSION := '$(shell [ -f $(TOPDIR)/I3_VERSION ] && cat $(TOPDIR)/I3_VERSION)' +VERSION := '$(shell [ -f $(TOPDIR)/VERSION ] && cat $(TOPDIR)/VERSION)' ifeq ('',$(I3_VERSION)) VERSION := $(shell git describe --tags --abbrev=0) I3_VERSION := '$(shell git describe --tags --always) ($(shell git log --pretty=format:%cd --date=short -n1), branch \"$(shell git describe --tags --always --all | sed s:heads/::)\")' -else -VERSION := ${I3_VERSION} endif MAJOR_VERSION := $(shell echo ${VERSION} | cut -d '.' -f 1) -- 2.39.5