From 788e1a9b729fb3d45197d77eed025af02c35fa05 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Wed, 28 Jul 2010 14:14:53 -0700 Subject: [PATCH] documentation: Use a variable to select the prior version This way we can set which version to copy the documentation files from when setting up a new revision. Change-Id: I0c9392e97b6c3da21500f173336e891ee3a91b76 Signed-off-by: Shawn O. Pearce --- Documentation/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/Makefile b/Documentation/Makefile index 18a92b4dbf..72e3f8689c 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -32,6 +32,7 @@ LOCAL_ROOT := .published SCRIPTSDIR := $(shell pwd)/javascript COMMIT := $(shell git describe HEAD | sed s/^v//) PUB_DIR := $(PUB_ROOT)/$(VERSION) +PRIOR = PRIOR ifeq ($(VERSION),) REVISION = $(COMMIT) @@ -52,9 +53,8 @@ endif @-rm -rf $(LOCAL_ROOT) @echo "Checking out current $(VERSION)" @if ! $(SVN) checkout $(PUB_DIR) $(LOCAL_ROOT) 2>/dev/null ; then \ - p=$$(git describe HEAD^ | perl -lne 'print $$1 if /^v(\d+\.\d+(?:\.\d+)?)/') && \ - echo "Copying $$p to $(VERSION) ..." && \ - $(SVN) cp -m "Create $(VERSION) documentation" $(PUB_ROOT)/$$p $(PUB_DIR) && \ + echo "Copying $(PRIOR) to $(VERSION) ..." && \ + $(SVN) cp -m "Create $(VERSION) documentation" $(PUB_ROOT)/$(PRIOR) $(PUB_DIR) && \ $(SVN) checkout $(PUB_DIR) $(LOCAL_ROOT) ; \ fi @rm -f $(LOCAL_ROOT)/*.html