diff options
author | Paul W. Frields <stickster@gmail.com> | 2007-08-22 02:14:34 +0000 |
---|---|---|
committer | Paul W. Frields <stickster@gmail.com> | 2007-08-22 02:14:34 +0000 |
commit | ff9abd04bf7cb0926a2bf4dbd24973d2314e29b8 (patch) | |
tree | cbc48d276b26901f4fe0aad0b3fe22c66314151d /Makefile.common | |
parent | 4e9027fd8153c203a93bd2f60ff046bf9481227e (diff) | |
download | fedora-doc-utils-ff9abd04bf7cb0926a2bf4dbd24973d2314e29b8.tar.gz fedora-doc-utils-ff9abd04bf7cb0926a2bf4dbd24973d2314e29b8.tar.xz fedora-doc-utils-ff9abd04bf7cb0926a2bf4dbd24973d2314e29b8.zip |
Clean up some tagging functions and make sure we rely on rpm-info whenever possible for versioning, not Makefile hackery
Diffstat (limited to 'Makefile.common')
-rw-r--r-- | Makefile.common | 30 |
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' |