summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.common30
1 files changed, 10 insertions, 20 deletions
diff --git a/Makefile.common b/Makefile.common
index 8755357..0d6afc0 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -291,30 +291,14 @@ SPECFILE=$(firstword $(wildcard *.spec))
ifneq "${SPECFILE}" ""
# the name of the package
-ifndef NAME
-NAME := $(shell rpm ${RPMFLAGS} ${DISTRPMFLAGS} -q --qf "%{NAME}\n" \
+NAME ?= $(shell rpm ${RPMFLAGS} ${DISTRPMFLAGS} -q --qf "%{NAME}\n" \
--specfile ${SPECFILE} | head -1)
-endif
# the version of the package
-ifndef VERSION
-VERSION := $(shell rpm ${RPMFLAGS} ${DISTRPMFLAGS} -q --qf "%{VERSION}\n" \
+VERSION ?= $(shell rpm ${RPMFLAGS} ${DISTRPMFLAGS} -q --qf "%{VERSION}\n" \
--specfile ${SPECFILE} | head -1)
-endif
# the release of the package
-ifndef RELEASE
-RELEASE := $(shell rpm ${RPMFLAGS} ${DISTRPMFLAGS} -q --qf "%{RELEASE}\n" \
+RELEASE ?= $(shell rpm ${RPMFLAGS} ${DISTRPMFLAGS} -q --qf "%{RELEASE}\n" \
--specfile ${SPECFILE} | head -1)
-endif
-# the last revision date of the package, according to rpm-info
-ifndef REVDATE
-REVDATE := $(shell date doc)
-endif
-
-showvars::
- @echo "VERSION=$(VERSION)"
- @echo "RELEASE=$(RELEASE)"
- @echo "PWD=$(PWD)"
- @echo "REVDATE=${REVDATE}"
# CVS-safe version/release -- a package name like 4Suite screws things
# up, so we have to remove the leaving digits from the name
@@ -337,9 +321,12 @@ endif # ifneq "${SPECFILE}" ""
# will prevent repetitive tagging without the user making use of
# TAG_OPTS. I'd say that encourages people to Do The Right Thing by
# changing version numbers where necessary. (PWF)
+VERSION ?= $(shell version doc)
TAG_NAME ?= $(shell echo ${DOCBASE} | sed -e s/\\\./_/g -e s/^[0-9]\\\+//g)
TAG_VERSION ?= $(shell version doc | sed s/\\\./_/g)
-TAG?=${TAG_NAME}-${TAG_VERSION}
+TAG ?= ${TAG_NAME}-${TAG_VERSION}
+# the last revision date of the package, according to rpm-info
+REVDATE ?= $(shell date doc)
tag::
cvs tag ${TAG_OPTS} -c ${TAG}
@@ -347,13 +334,16 @@ tag::
@echo
showvars::
+ @echo "VERSION=${VERSION}"
@echo "TAG_NAME=${TAG_NAME}"
@echo "TAG_VERSION=${TAG_VERSION}"
ifdef TAG_RELEASE # Only used if we have a specfile!
+ @echo "RELEASE=$(RELEASE)"
@echo "TAG_RELEASE=${TAG_RELEASE}"
endif
@echo "TAG=${TAG}"
@echo "### (Tag vars do not necessarily reflect CVS status)"
+ @echo "REVDATE=${REVDATE}"
help::
@printf ${TFMT} 'tag' 'Tag this directory with the packaging NVR'