/[smeserver]/common/Makefile.common
ViewVC logotype

Diff of /common/Makefile.common

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.11 by slords, Wed Mar 12 04:42:51 2008 UTC Revision 1.12 by slords, Fri Mar 28 14:38:42 2008 UTC
# Line 5  Line 5 
5  # Copyright (C) 2004-2005 Red Hat, Inc.  # Copyright (C) 2004-2005 Red Hat, Inc.
6  # Copyright (C) 2005 Fedora Foundation  # Copyright (C) 2005 Fedora Foundation
7  #  #
8  # $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 $
9    
10  # Define the common dir.  # Define the common dir.
11  # This needs to happen first.  # This needs to happen first.
# Line 25  TARGET := $(word 1, $(BRANCHINFO)) Line 25  TARGET := $(word 1, $(BRANCHINFO))
25  DIST = $(word 2, $(BRANCHINFO))  DIST = $(word 2, $(BRANCHINFO))
26  DISTVAR = $(word 3, $(BRANCHINFO))  DISTVAR = $(word 3, $(BRANCHINFO))
27  DISTVAL = $(word 4, $(BRANCHINFO))  DISTVAL = $(word 4, $(BRANCHINFO))
28  DIST_DEFINES = --define "dist $(DIST)" --define "$(DISTVAR) $(DISTVAL)"  SMEVAL = $(word 5, $(BRANCHINFO))
29    DIST_DEFINES = --define "dist $(DIST)" --define "$(DISTVAR) $(DISTVAL)" --define "sme $(SMEVAL)"
 BUILD_FLAGS ?=  $(shell echo $(KOJI_FLAGS))  
30    
31  ## a base directory where we'll put as much temporary working stuff as we can  ## a base directory where we'll put as much temporary working stuff as we can
32  ifndef WORKDIR  ifndef WORKDIR
# Line 41  SRCRPMDIR ?= $(WORKDIR) Line 40  SRCRPMDIR ?= $(WORKDIR)
40  BUILDDIR ?= $(WORKDIR)  BUILDDIR ?= $(WORKDIR)
41  RPMDIR ?= $(WORKDIR)  RPMDIR ?= $(WORKDIR)
42  MOCKDIR ?= $(WORKDIR)  MOCKDIR ?= $(WORKDIR)
43  ifeq ($(DISTVAR),epel)  MOCKCFG ?= smeserver-$(SMEVAL)-$(BUILDARCH)-core
 DISTVAR := rhel  
 MOCKCFG ?= fedora-$(DISTVAL)-$(BUILDARCH)-epel.cfg  
 else  
 MOCKCFG ?= fedora-$(DISTVAL)-$(BUILDARCH)-core.cfg  
 endif  
44  ## SOURCEDIR is special; it has to match the CVS checkout directory,  ## SOURCEDIR is special; it has to match the CVS checkout directory,
45  ## because the CVS checkout directory contains the patch files. So it basically  ## because the CVS checkout directory contains the patch files. So it basically
46  ## can't be overridden without breaking things. But we leave it a variable  ## can't be overridden without breaking things. But we leave it a variable
# Line 82  RPM_BUILD_DIR ?= $(BUILDDIR)/$(NAME)-$(V Line 76  RPM_BUILD_DIR ?= $(BUILDDIR)/$(NAME)-$(V
76  # default target: just make sure we've got the sources  # default target: just make sure we've got the sources
77  all: sources  all: sources
78    
 # 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  
   
79  # The repository and the clients we use for the files  # The repository and the clients we use for the files
80  REPOSITORY ?= http://lordsfam.net/yum/builds/source  REPOSITORY ?= http://lordsfam.net/yum/builds/source
81  UPLOAD_REPOSITORY ?= /builds/source  UPLOAD_REPOSITORY ?= /builds/source
# Line 98  CURL   ?= $(shell if test -f /usr/bin/curl Line 86  CURL   ?= $(shell if test -f /usr/bin/curl
86  WGET    ?= $(shell if test -f /usr/bin/wget ; then echo "wget -nd -m" ; fi)  WGET    ?= $(shell if test -f /usr/bin/wget ; then echo "wget -nd -m" ; fi)
87  CLIENT  ?= $(if $(CURL),$(CURL),$(if $(WGET),$(WGET)))  CLIENT  ?= $(if $(CURL),$(CURL),$(if $(WGET),$(WGET)))
88  PLAGUE_CLIENT ?= $(shell which plague-client 2>/dev/null)  PLAGUE_CLIENT ?= $(shell which plague-client 2>/dev/null)
 BUILD_CLIENT ?= $(shell which koji 2>/dev/null)  
89    
90  # RPM with all the overrides in place; you can override this in your  # RPM with all the overrides in place
 # .cvspkgsrc also, to use a default rpm setup  
 # the rpm build command line  
91  ifndef RPM  ifndef RPM
92  RPM := $(shell if test -f /usr/bin/rpmbuild ; then echo rpmbuild ; else echo rpm ; fi)  RPM := $(shell if test -f /usr/bin/rpmbuild ; then echo rpmbuild ; else echo rpm ; fi)
93  endif  endif
# Line 133  $(shell cat sources 2>/dev/null | while Line 118  $(shell cat sources 2>/dev/null | while
118  endef  endef
119    
120  # list the possible targets for valid arches  # list the possible targets for valid arches
121  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
122    
123  # for the modules that do different "make prep" depending on what arch we build for  # for the modules that do different "make prep" depending on what arch we build for
124  PREP_ARCHES     = $(addprefix prep-,$(ARCHES))  PREP_ARCHES     = $(addprefix prep-,$(ARCHES))
125    
126  ## list all our bogus targets  ## list all our bogus targets
127  .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
128    
129  # The TARGETS define is meant for local module targets that should be  # The TARGETS define is meant for local module targets that should be
130  # made in addition to the SOURCEFILES whenever needed  # made in addition to the SOURCEFILES whenever needed
# Line 334  plague: build-check $(COMMON_DIR)/branch Line 319  plague: build-check $(COMMON_DIR)/branch
319          @if [ ! -x "$(PLAGUE_CLIENT)" ]; then echo "Must have plague-client installed - see http://fedoraproject.org/wiki/Extras/BuildSystemClientSetup"; exit 1; fi          @if [ ! -x "$(PLAGUE_CLIENT)" ]; then echo "Must have plague-client installed - see http://fedoraproject.org/wiki/Extras/BuildSystemClientSetup"; exit 1; fi
320          @$(PLAGUE_CLIENT) build $(NAME) $(TAG) $(TARGET)          @$(PLAGUE_CLIENT) build $(NAME) $(TAG) $(TARGET)
321    
 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)'  
   
322  build: plague  build: plague
323    
324  # "make new | less" to see what has changed since the last tag was assigned  # "make new | less" to see what has changed since the last tag was assigned


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed