docs-common Makefile.common,1.127,1.128

Paul W. Frields (pfrields) fedora-docs-commits at redhat.com
Fri Aug 4 02:44:00 UTC 2006


Author: pfrields

Update of /cvs/docs/docs-common
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4511

Modified Files:
	Makefile.common 
Log Message:
Make tagging routine dependent on whether we have a specfile or not.
If no specfile exists, we pick up a simpler tag using the existing
variables and fdpsh functions.



Index: Makefile.common
===================================================================
RCS file: /cvs/docs/docs-common/Makefile.common,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -r1.127 -r1.128
--- Makefile.common	3 Aug 2006 18:20:28 -0000	1.127
+++ Makefile.common	4 Aug 2006 02:43:57 -0000	1.128
@@ -192,7 +192,35 @@
 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'
 
 #########################################################################
 




More information about the docs-commits mailing list