docs-common Makefile.common,1.132,1.133

Paul W. Frields (pfrields) fedora-docs-commits at redhat.com
Sat Aug 5 04:39:20 UTC 2006


Author: pfrields

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

Modified Files:
	Makefile.common 
Log Message:
The whole section on tagging and assigning NVR stuff should come after
the first TARGETS assignment.  (Just like it says, right there.)



Index: Makefile.common
===================================================================
RCS file: /cvs/docs/docs-common/Makefile.common,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -r1.132 -r1.133
--- Makefile.common	5 Aug 2006 04:35:38 -0000	1.132
+++ Makefile.common	5 Aug 2006 04:39:18 -0000	1.133
@@ -173,68 +173,6 @@
 #########################################################################
 
 #########################################################################
-# Obtain the document version and release info for building RPM's
-SPECFILE=$(firstword $(wildcard *.spec))
-
-ifneq "${SPECFILE}" ""
-# the name of the package
-ifndef NAME
-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" \
-	--specfile ${SPECFILE} | head -1)
-endif
-# the release of the package
-ifndef RELEASE
-RELEASE := $(shell rpm ${RPMFLAGS} ${DISTRPMFLAGS} -q --qf "%{RELEASE}\n" \
-	--specfile ${SPECFILE} | head -1)
-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
-.PHONY: tag
-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_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::
-	cvs tag ${TAG_OPTS} -c ${TAG}
-	@echo "Tagged with: ${TAG}"
-	@echo
-
-showvars::
-	@echo "TAG_NAME=${TAG_NAME}"
-	@echo "TAG_VERSION=${TAG_VERSION}"
-	@echo "TAG_RELEASE=${TAG_RELEASE}"
-	@echo "TAG=${TAG}"
-	@echo "### (Tag vars do not necessarily reflect CVS status)"
-
-help::
-	@printf ${TFMT} 'tag' 'Tag this directory with the packaging NVR'
-
-#########################################################################
-
-#########################################################################
 # Set a provisional ${LANG} value.  We'll dynamically change this as 
 # needed.  The "${PRI_LANG}" value is used because that is the original 
 # language the doc.
@@ -316,6 +254,69 @@
 #########################################################################
 
 #########################################################################
+# Obtain the document version and release info for building RPM's
+SPECFILE=$(firstword $(wildcard *.spec))
+
+ifneq "${SPECFILE}" ""
+# the name of the package
+ifndef NAME
+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" \
+	--specfile ${SPECFILE} | head -1)
+endif
+# the release of the package
+ifndef RELEASE
+RELEASE := $(shell rpm ${RPMFLAGS} ${DISTRPMFLAGS} -q --qf "%{RELEASE}\n" \
+	--specfile ${SPECFILE} | head -1)
+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
+.PHONY: tag
+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_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::
+	cvs tag ${TAG_OPTS} -c ${TAG}
+	@echo "Tagged with: ${TAG}"
+	@echo
+
+showvars::
+	@echo "TAG_NAME=${TAG_NAME}"
+	@echo "TAG_VERSION=${TAG_VERSION}"
+	@echo "TAG_RELEASE=${TAG_RELEASE}"
+	@echo "TAG=${TAG}"
+	@echo "### (Tag vars do not necessarily reflect CVS status)"
+
+help::
+	@printf ${TFMT} 'tag' 'Tag this directory with the packaging NVR'
+
+#########################################################################
+
+#########################################################################
 # Rules to generate the "${LANG}/${DOC_ENTITIES}.ent" file, if used
 define DOC_ENTITIES_template
 




More information about the docs-commits mailing list