diff options
Diffstat (limited to 'Makefile.common')
-rw-r--r-- | Makefile.common | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/Makefile.common b/Makefile.common index 9e60f7a..be33a4c 100644 --- a/Makefile.common +++ b/Makefile.common @@ -192,7 +192,35 @@ ifndef RELEASE RELEASE := $(shell rpm ${RPMFLAGS} ${DISTRPMFLAGS} -q --qf "%{RELEASE}\n" \ --specfile ${SPECFILE} | head -1) endif -endif + +# CVS-safe version/release -- a package name like 4Suite screws things +# up, so we have to remove the leaving digits from the name +TAG_NAME := $(shell echo ${NAME} | sed -e s/\\\./_/g -e s/^[0-9]\\\+//g) +TAG_VERSION := $(shell echo ${VERSION} | sed s/\\\./_/g) +TAG_RELEASE := $(shell echo ${RELEASE} | sed s/\\\./_/g) + +# tag to export, defaulting to current tag in the spec file +TAG?=${TAG_NAME}-${TAG_VERSION}-${TAG_RELEASE} + +# The rest of this rule is set outside the ifneq +tag:: ${SPECFILE} + +endif # ifneq "${SPECFILE}" "" + +# Only set tag here if not done already (i.e. SPECFILE doesn't exist) +# Use the FDPSH function to get a current version. Keep in mind this +# 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) +TAG?=${DOCBASE}-$(shell version doc) + +tag:: + cvs tag ${TAG_OPTS} -c ${TAG} + @echo "Tagged with: ${TAG}" + @echo + +help:: + @printf ${TFMT} 'tag' 'Tag this directory with the packaging NVR' ######################################################################### |