gunnar: server/make-helper kolab.mk,1.2,1.3

cvs at kolab.org cvs at kolab.org
Mon Jan 11 16:50:43 CET 2010


Author: gunnar

Update of /kolabrepository/server/make-helper
In directory doto:/tmp/cvs-serv16958

Modified Files:
	kolab.mk 
Log Message:
Simplify setting undefined variables in make.

Index: kolab.mk
===================================================================
RCS file: /kolabrepository/server/make-helper/kolab.mk,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- kolab.mk	23 Dec 2009 20:25:40 -0000	1.2
+++ kolab.mk	11 Jan 2010 15:50:41 -0000	1.3
@@ -4,55 +4,37 @@
   $(error Did not find the "openpkg" tool. Make sure your environment settings are sane. On a standard kolab system you might need to run "eval `/kolab/etc/rc --eval all env`")
 endif
 
-# Set KOLABDIR to the base directory of the OpenPKG/Kolab installation:
-KOLABDIR = $(shell openpkg rpm -q --qf '%{INSTALLPREFIX}\n' openpkg)
+# Set KOLABDIR to the base directory of the OpenPKG/Kolab installation if it is unset
+KOLABDIR ?= $(shell openpkg rpm -q --qf '%{INSTALLPREFIX}\n' openpkg)
 
 # Error out if there is no kolab directory
 ifeq ($(KOLABDIR),)
   $(error Could not determine KOLABDIR!)
 endif
 
-# Set the location of the rpm binary
-ifeq ($(RPM),)
-  RPM = $(KOLABDIR)/bin/openpkg rpm
-endif
+# Set the location of the rpm binary if it is unset
+RPM ?= $(KOLABDIR)/bin/openpkg rpm
 
-# Set the location for rpm source package installations
-ifeq ($(KOLABRPMSRC),)
-  KOLABRPMSRC = $(KOLABDIR)/RPM/SRC
-endif
+# Set the location for rpm source package installations if it is unset
+KOLABRPMSRC ?= $(KOLABDIR)/RPM/SRC
 
-# Set the location for rpm packages
-ifeq ($(KOLABRPMPKG),)
-  KOLABRPMPKG = $(KOLABDIR)/RPM/PKG
-endif
+# Set the location for rpm packages if it is unset
+KOLABRPMPKG ?= $(KOLABDIR)/RPM/PKG
 
-# Set the location for the rpm temporary directory
-ifeq ($(KOLABRPMTMP),)
-  KOLABRPMTMP = $(KOLABDIR)/RPM/TMP
-endif
+# Set the location for the rpm temporary directory if it is unset
+KOLABRPMTMP ?= $(KOLABDIR)/RPM/TMP
 
-# Set the current working directory
-ifeq ($(CURSRCDIR),)
-  CURSRCDIR = $(CURDIR)
-endif
+# Set the current working directory if it is unset
+CURSRCDIR ?= $(CURDIR)
 
-# Set the download location for Kolab source RPMs
-ifeq ($(KOLABPKGURI),)
-  KOLABPKGURI = http://files.kolab.org/server/release/kolab-server-2.2.0/sources/
-endif
+# Set the download location for Kolab source RPMs if it is unset
+KOLABPKGURI ?= http://files.kolab.org/server/release/kolab-server-2.2.0/sources/
 
-# Set the download location for OpenPKG source RPMs
-ifeq ($(OPENPKGURI),)
-  OPENPKGURI = http://files.kolab.org/server/development-2.2/openpkg-orig-srpms/
-endif
+# Set the download location for OpenPKG source RPMs if it is unset
+OPENPKGURI ?= http://files.kolab.org/server/development-2.2/openpkg-orig-srpms/
 
-# Determine the suffix for binary packages on this system
-ifeq ($(PLATTAG),)
-  PLATTAG = $(shell $(RPM) -q --qf="%{ARCH}-%{OS}" openpkg)-$(KOLABDIR:/%=%)
-endif
+# Determine the suffix for binary packages on this system if it is unset
+PLATTAG ?= $(shell $(RPM) -q --qf="%{ARCH}-%{OS}" openpkg)-$(KOLABDIR:/%=%)
 
-# Determine the staging area for collecting new source rpms
-ifeq "x$(STAGING)" "x"
-  STAGING = ../stage
-endif
+# Determine the staging area for collecting new source rpms if it is unset
+STAGING ?= ../stage





More information about the commits mailing list