docs-common Makefile.common,1.168,1.169

Paul W. Frields (pfrields) fedora-docs-commits at redhat.com
Thu Sep 6 01:22:42 UTC 2007


Author: pfrields

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

Modified Files:
	Makefile.common 
Log Message:
These variables need to be set simply (i.e. one-time substitution) to
prevent running 'rpm' repeatedly whenever used.



Index: Makefile.common
===================================================================
RCS file: /cvs/docs/docs-common/Makefile.common,v
retrieving revision 1.168
retrieving revision 1.169
diff -u -r1.168 -r1.169
--- Makefile.common	22 Aug 2007 02:14:34 -0000	1.168
+++ Makefile.common	6 Sep 2007 01:22:39 -0000	1.169
@@ -291,14 +291,20 @@
 
 ifneq "${SPECFILE}" ""
 # the name of the package
-NAME ?= $(shell rpm ${RPMFLAGS} ${DISTRPMFLAGS} -q --qf "%{NAME}\n"	\
+ifeq "${NAME}" ""
+NAME := $(shell rpm ${RPMFLAGS} ${DISTRPMFLAGS} -q --qf "%{NAME}\n"	\
 	--specfile ${SPECFILE} | head -1)
+endif
 # the version of the package
-VERSION ?= $(shell rpm ${RPMFLAGS} ${DISTRPMFLAGS} -q --qf "%{VERSION}\n" \
+ifeq "${VERSION}" ""
+VERSION := $(shell rpm ${RPMFLAGS} ${DISTRPMFLAGS} -q --qf "%{VERSION}\n" \
 	--specfile ${SPECFILE} | head -1)
+endif
 # the release of the package
-RELEASE ?= $(shell rpm ${RPMFLAGS} ${DISTRPMFLAGS} -q --qf "%{RELEASE}\n" \
+ifeq "${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
@@ -314,7 +320,7 @@
 tag:: ${SPECFILE}
 	@:
 
-endif		# ifneq "${SPECFILE}" ""
+else		# 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
@@ -325,6 +331,8 @@
 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}
+endif
+
 # the last revision date of the package, according to rpm-info
 REVDATE     ?= $(shell date doc)
 




More information about the Fedora-docs-commits mailing list