docs-common Makefile.common,1.167,1.168

Paul W. Frields (pfrields) fedora-docs-commits at redhat.com
Wed Aug 22 02:14:37 UTC 2007


Author: pfrields

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

Modified Files:
	Makefile.common 
Log Message:
Clean up some tagging functions and make sure we rely on rpm-info whenever possible for versioning, not Makefile hackery


Index: Makefile.common
===================================================================
RCS file: /cvs/docs/docs-common/Makefile.common,v
retrieving revision 1.167
retrieving revision 1.168
diff -u -r1.167 -r1.168
--- Makefile.common	4 Jul 2007 06:23:24 -0000	1.167
+++ Makefile.common	22 Aug 2007 02:14:34 -0000	1.168
@@ -291,30 +291,14 @@
 
 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 @@
 # 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 @@
 	@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'




More information about the Fedora-docs-commits mailing list