--- common/Makefile.common 2008/03/12 04:42:51 1.11 +++ common/Makefile.common 2008/03/28 14:38:42 1.12 @@ -5,7 +5,7 @@ # Copyright (C) 2004-2005 Red Hat, Inc. # Copyright (C) 2005 Fedora Foundation # -# $Id: Makefile.common,v 1.10 2007/12/24 17:33:50 slords Exp $ +# $Id: Makefile.common,v 1.11 2008/03/12 04:42:51 slords Exp $ # Define the common dir. # This needs to happen first. @@ -25,9 +25,8 @@ TARGET := $(word 1, $(BRANCHINFO)) DIST = $(word 2, $(BRANCHINFO)) DISTVAR = $(word 3, $(BRANCHINFO)) DISTVAL = $(word 4, $(BRANCHINFO)) -DIST_DEFINES = --define "dist $(DIST)" --define "$(DISTVAR) $(DISTVAL)" - -BUILD_FLAGS ?= $(shell echo $(KOJI_FLAGS)) +SMEVAL = $(word 5, $(BRANCHINFO)) +DIST_DEFINES = --define "dist $(DIST)" --define "$(DISTVAR) $(DISTVAL)" --define "sme $(SMEVAL)" ## a base directory where we'll put as much temporary working stuff as we can ifndef WORKDIR @@ -41,12 +40,7 @@ SRCRPMDIR ?= $(WORKDIR) BUILDDIR ?= $(WORKDIR) RPMDIR ?= $(WORKDIR) MOCKDIR ?= $(WORKDIR) -ifeq ($(DISTVAR),epel) -DISTVAR := rhel -MOCKCFG ?= fedora-$(DISTVAL)-$(BUILDARCH)-epel.cfg -else -MOCKCFG ?= fedora-$(DISTVAL)-$(BUILDARCH)-core.cfg -endif +MOCKCFG ?= smeserver-$(SMEVAL)-$(BUILDARCH)-core ## SOURCEDIR is special; it has to match the CVS checkout directory, ## because the CVS checkout directory contains the patch files. So it basically ## can't be overridden without breaking things. But we leave it a variable @@ -82,12 +76,6 @@ RPM_BUILD_DIR ?= $(BUILDDIR)/$(NAME)-$(V # default target: just make sure we've got the sources all: sources -# user specific configuration -CVS_EXTRAS_RC := $(shell if test -f $(HOME)/.cvspkgsrc ; then echo $(HOME)/.cvspkgsrc ; fi) -ifdef CVS_EXTRAS_RC -include $(CVS_EXTRAS_RC) -endif - # The repository and the clients we use for the files REPOSITORY ?= http://lordsfam.net/yum/builds/source UPLOAD_REPOSITORY ?= /builds/source @@ -98,11 +86,8 @@ CURL ?= $(shell if test -f /usr/bin/curl WGET ?= $(shell if test -f /usr/bin/wget ; then echo "wget -nd -m" ; fi) CLIENT ?= $(if $(CURL),$(CURL),$(if $(WGET),$(WGET))) PLAGUE_CLIENT ?= $(shell which plague-client 2>/dev/null) -BUILD_CLIENT ?= $(shell which koji 2>/dev/null) -# RPM with all the overrides in place; you can override this in your -# .cvspkgsrc also, to use a default rpm setup -# the rpm build command line +# RPM with all the overrides in place ifndef RPM RPM := $(shell if test -f /usr/bin/rpmbuild ; then echo rpmbuild ; else echo rpm ; fi) endif @@ -133,13 +118,13 @@ $(shell cat sources 2>/dev/null | while endef # list the possible targets for valid arches -ARCHES = noarch i386 i586 i686 x86_64 ia64 s390 s390x ppc ppc64 pseries ppc64pseries iseries ppc64iseries # athlon alpha alphaev6 sparc sparc64 sparcv9 i164 mac sh mips +ARCHES = noarch i386 i586 i686 x86_64 # ia64 s390 s390x ppc ppc64 pseries ppc64pseries iseries ppc64iseries athlon alpha alphaev6 sparc sparc64 sparcv9 i164 mac sh mips # for the modules that do different "make prep" depending on what arch we build for PREP_ARCHES = $(addprefix prep-,$(ARCHES)) ## list all our bogus targets -.PHONY :: $(ARCHES) commit sources uploadsource upload export check build-check plague koji build test-srpm srpm tag force-tag verrel new clean patch prep compile install-short compile-short FORCE local +.PHONY :: $(ARCHES) commit sources uploadsource upload export check build-check plague build test-srpm srpm tag force-tag verrel new clean patch prep compile install-short compile-short FORCE local # The TARGETS define is meant for local module targets that should be # made in addition to the SOURCEFILES whenever needed @@ -334,10 +319,6 @@ plague: build-check $(COMMON_DIR)/branch @if [ ! -x "$(PLAGUE_CLIENT)" ]; then echo "Must have plague-client installed - see http://fedoraproject.org/wiki/Extras/BuildSystemClientSetup"; exit 1; fi @$(PLAGUE_CLIENT) build $(NAME) $(TAG) $(TARGET) -koji: build-check $(COMMON_DIR)/branches - @if [ ! -x "$(BUILD_CLIENT)" ]; then echo "Must have koji installed - see http://fedoraproject.org/wiki/BuildSystemClientSetup"; exit 1; fi - @$(BUILD_CLIENT) build $(BUILD_FLAGS) $(TARGET) 'cvs://smeserver.cvs.sourceforge.net/cvsroot/smeserver?$(CVS_REPOSITORY)#$(TAG)' - build: plague # "make new | less" to see what has changed since the last tag was assigned