From daa2d4c86807a412580924303aeb49ec27a40ea0 Mon Sep 17 00:00:00 2001 From: Kevin Shanahan Date: Wed, 10 Apr 2013 16:02:25 +0930 Subject: [PATCH 1/3] post-release version update Signed-off-by: Kevin Shanahan --- Makefile | 2 +- changelog.txt | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8324ea85..0fe2a8be 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ TARGET_UNIX ?= $(if $(filter UNIX,$(TARGET_OS)),$(HOST_UNIX),) # ============================================================================ -TYR_RELEASE := v0.7 +TYR_RELEASE := v0.8-pre TYR_GIT := $(shell git describe --dirty 2> /dev/null) TYR_VERSION := $(if $(TYR_GIT),$(TYR_GIT),$(TYR_RELEASE)) TYR_VERSION_NUM ?= $(patsubst v%,%,$(TYR_VERSION)) diff --git a/changelog.txt b/changelog.txt index 595fba55..7269ce07 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,7 @@ +Unreleased + +* + 2013-04-10 TyrUtils v0.7 * Unix man page documentation for the main tools (qbsp, light, vis) From 02e1f44f51459818a6aa410f20ad45aab7cc2a8f Mon Sep 17 00:00:00 2001 From: Kevin Shanahan Date: Wed, 10 Apr 2013 16:02:46 +0930 Subject: [PATCH 2/3] build: clean the dist directory too Signed-off-by: Kevin Shanahan --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 0fe2a8be..8f7ba423 100644 --- a/Makefile +++ b/Makefile @@ -477,6 +477,7 @@ clean: @rm -rf $(BUILD_DIR) @rm -rf $(BIN_DIR) @rm -rf $(DOC_DIR) + @rm -rf $(DIST_DIR) @rm -f $(shell find . \( \ -name '*~' -o -name '#*#' -o -name '*.o' -o -name '*.res' \ \) -print) From 42203412521759f997905cbe41dc061fd1428f40 Mon Sep 17 00:00:00 2001 From: Kevin Shanahan Date: Wed, 10 Apr 2013 16:10:26 +0930 Subject: [PATCH 3/3] build: create build version file and dependencies Signed-off-by: Kevin Shanahan --- Makefile | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 8f7ba423..936eff45 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,20 @@ TYR_GIT := $(shell git describe --dirty 2> /dev/null) TYR_VERSION := $(if $(TYR_GIT),$(TYR_GIT),$(TYR_RELEASE)) TYR_VERSION_NUM ?= $(patsubst v%,%,$(TYR_VERSION)) +# Create/update the build version file +# Any source files which use TYR_VERSION will depend on this +BUILD_VER = $(BUILD_DIR)/.build_version +$(shell \ + if [ ! -d "$(BUILD_DIR)" ]; then mkdir -p "$(BUILD_DIR)"; fi ; \ + if [ ! -f "$(BUILD_VER)" ] || \ + [ "`cat $(BUILD_VER)`" != "$(TYR_VERSION)" ]; then \ + printf '%s' "$(TYR_VERSION)" > "$(BUILD_VER)"; \ + fi) + +# --------------------------------------- +# Attempt detection of the build host OS +# --------------------------------------- + SYSNAME := $(shell uname -s) TOPDIR := $(shell pwd) @@ -170,10 +184,13 @@ endef # prevent errors when moving files around between builds (e.g. from NQ or QW # dirs to the common dir.) cmd_fixdep = \ - cp $(@D)/.$(@F).d $(@D)/.$(@F).d.tmp ; \ + cp $(@D)/.$(@F).d $(@D)/.$(@F).d.tmp && \ sed -e 's/\#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' -e '/^$$/ d' \ - -e 's/$$/ :/' < $(@D)/.$(@F).d.tmp >> $(@D)/.$(@F).d ; \ - rm -f $(@D)/.$(@F).d.tmp + -e 's/$$/ :/' < $(@D)/.$(@F).d.tmp >> $(@D)/.$(@F).d && \ + rm -f $(@D)/.$(@F).d.tmp && \ + if grep -q TYRUTILS_VERSION $<; then \ + printf '%s: %s\n' $@ $(BUILD_VER) >> $(@D)/.$(@F).d ; \ + fi cmd_cc_dep_c = \ $(CC) -MM -MT $@ $(CPPFLAGS) -o $(@D)/.$(@F).d $< ; \ @@ -487,9 +504,9 @@ clean: # -------------------------------------------------------------------------- # Build text and/or html docs from man page source -$(DOC_DIR)/%.1: man/%.1 ; $(do_man2man) -$(DOC_DIR)/%.txt: $(DOC_DIR)/%.1 ; $(do_man2txt) -$(DOC_DIR)/%.html: $(DOC_DIR)/%.1 ; $(do_man2html) +$(DOC_DIR)/%.1: man/%.1 $(BUILD_VER) ; $(do_man2man) +$(DOC_DIR)/%.txt: $(DOC_DIR)/%.1 ; $(do_man2txt) +$(DOC_DIR)/%.html: $(DOC_DIR)/%.1 ; $(do_man2html) SRC_DOCS = qbsp.1 light.1 vis.1 MAN_DOCS = $(patsubst %.1,$(DOC_DIR)/%.1,$(SRC_DOCS)) @@ -505,7 +522,7 @@ docs: $(MAN_DOCS) $(HTML_DOCS) $(TEXT_DOCS) # DIST_FILES # $(1) = distribution directory DIST_FILES = \ - $(patsubst %,$(1)/bin/%,$(APPS)) \ + $(patsubst %,$(1)/bin/%,$(APPS)) \ $(1)/README.txt \ $(1)/COPYING \ $(1)/changelog.txt \