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. |
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 |
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 |
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 |
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 |
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 |
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 |