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.11 2008/03/12 04:42:51 slords Exp $ |
# $Id: Makefile.common,v 1.19 2012/08/03 16:54:13 slords Exp $ |
9 |
|
|
10 |
# Define the common dir. |
# Define the common dir. |
11 |
# This needs to happen first. |
# This needs to happen first. |
19 |
ifndef HEAD_BRANCH |
ifndef HEAD_BRANCH |
20 |
HEAD_BRANCH := devel |
HEAD_BRANCH := devel |
21 |
endif |
endif |
22 |
BRANCH:=$(shell [ -f branch ] && cat branch || echo $(HEAD_BRANCH)) |
BASEDIR := $(shell basename `pwd`) |
23 |
|
BRANCH := $(BASEDIR) |
24 |
BRANCHINFO = $(shell grep ^$(BRANCH): $(COMMON_DIR)/branches | cut -d: --output-delimiter=" " -f2-) |
BRANCHINFO = $(shell grep ^$(BRANCH): $(COMMON_DIR)/branches | cut -d: --output-delimiter=" " -f2-) |
25 |
TARGET := $(word 1, $(BRANCHINFO)) |
TARGET := $(word 1, $(BRANCHINFO)) |
26 |
DIST = $(word 2, $(BRANCHINFO)) |
DIST = $(word 2, $(BRANCHINFO)) |
27 |
DISTVAR = $(word 3, $(BRANCHINFO)) |
DISTVAR = $(word 3, $(BRANCHINFO)) |
28 |
DISTVAL = $(word 4, $(BRANCHINFO)) |
DISTVAL = $(word 4, $(BRANCHINFO)) |
29 |
|
DISTDEF = $(shell echo $(DIST) | sed -e s/^\\\.// ) |
30 |
SMEVAL = $(word 5, $(BRANCHINFO)) |
SMEVAL = $(word 5, $(BRANCHINFO)) |
31 |
DIST_DEFINES = --define "dist $(DIST)" --define "$(DISTVAR) $(DISTVAL)" --define "sme $(SMEVAL)" |
DIST_DEFINES = --define "dist $(DIST)" --define "$(DISTVAR) $(DISTVAL)" --define "$(DISTDEF) 1" --define "sme $(SMEVAL)" |
32 |
|
|
33 |
|
BUILD_FLAGS ?= $(KOJI_FLAGS) |
34 |
|
|
35 |
|
LOCALARCH := $(if $(shell grep -i '^BuildArch:.*noarch' $(SPECFILE)), noarch, $(shell uname -m)) |
36 |
|
|
37 |
## 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 |
38 |
ifndef WORKDIR |
ifndef WORKDIR |
46 |
BUILDDIR ?= $(WORKDIR) |
BUILDDIR ?= $(WORKDIR) |
47 |
RPMDIR ?= $(WORKDIR) |
RPMDIR ?= $(WORKDIR) |
48 |
MOCKDIR ?= $(WORKDIR) |
MOCKDIR ?= $(WORKDIR) |
49 |
MOCKCFG ?= smeserver-$(SMEVAL)-$(BUILDARCH)-core |
MOCKCFG ?= smeserver-$(SMEVAL)-$(BUILDARCH)-base |
50 |
## SOURCEDIR is special; it has to match the CVS checkout directory, |
## SOURCEDIR is special; it has to match the CVS checkout directory, |
51 |
## because the CVS checkout directory contains the patch files. So it basically |
## because the CVS checkout directory contains the patch files. So it basically |
52 |
## 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 |
54 |
ifndef SOURCEDIR |
ifndef SOURCEDIR |
55 |
SOURCEDIR := $(shell pwd) |
SOURCEDIR := $(shell pwd) |
56 |
endif |
endif |
57 |
|
ifndef SPECDIR |
58 |
|
SPECDIR := $(shell pwd) |
59 |
|
endif |
60 |
|
|
61 |
ifndef RPM_DEFINES |
ifndef RPM_DEFINES |
62 |
RPM_DEFINES = --define "_sourcedir $(SOURCEDIR)" \ |
RPM_DEFINES := --define "_sourcedir $(SOURCEDIR)" \ |
63 |
|
--define "_specdir $(SPECDIR)" \ |
64 |
--define "_builddir $(BUILDDIR)" \ |
--define "_builddir $(BUILDDIR)" \ |
65 |
--define "_srcrpmdir $(SRCRPMDIR)" \ |
--define "_srcrpmdir $(SRCRPMDIR)" \ |
66 |
--define "_rpmdir $(RPMDIR)" \ |
--define "_rpmdir $(RPMDIR)" \ |
69 |
|
|
70 |
# Initialize the variables that we need, but are not defined |
# Initialize the variables that we need, but are not defined |
71 |
# the version of the package |
# the version of the package |
72 |
|
VER_REL := $(shell rpm $(RPM_DEFINES) $(DIST_DEFINES) -q --qf "%{VERSION} %{RELEASE}\n" --specfile $(SPECFILE)| head -1) |
73 |
ifndef NAME |
ifndef NAME |
74 |
$(error "You can not run this Makefile without having NAME defined") |
$(error "You can not run this Makefile without having NAME defined") |
75 |
endif |
endif |
76 |
ifndef VERSION |
ifndef VERSION |
77 |
VERSION := $(shell rpm $(RPM_DEFINES) $(DIST_DEFINES) -q --qf "%{VERSION}\n" --specfile $(SPECFILE)| head -1) |
VERSION := $(word 1, $(VER_REL)) |
78 |
endif |
endif |
79 |
# the release of the package |
# the release of the package |
80 |
ifndef RELEASE |
ifndef RELEASE |
81 |
RELEASE := $(shell rpm $(RPM_DEFINES) $(DIST_DEFINES) -q --qf "%{RELEASE}\n" --specfile $(SPECFILE)| head -1) |
RELEASE := $(word 2, $(VER_REL)) |
82 |
endif |
endif |
83 |
# this is used in make patch, maybe make clean eventually. |
# this is used in make patch, maybe make clean eventually. |
84 |
# would be nicer to autodetermine from the spec file... |
# would be nicer to autodetermine from the spec file... |
87 |
# default target: just make sure we've got the sources |
# default target: just make sure we've got the sources |
88 |
all: sources |
all: sources |
89 |
|
|
90 |
|
# user specific configuration |
91 |
|
CVS_EXTRAS_RC := $(shell if test -f $(HOME)/.cvspkgsrc ; then echo $(HOME)/.cvspkgsrc ; fi) |
92 |
|
ifdef CVS_EXTRAS_RC |
93 |
|
include $(CVS_EXTRAS_RC) |
94 |
|
endif |
95 |
|
|
96 |
# The repository and the clients we use for the files |
# The repository and the clients we use for the files |
97 |
REPOSITORY ?= http://lordsfam.net/yum/builds/source |
REPOSITORY ?= http://buildsys.contribs.org/source |
98 |
UPLOAD_REPOSITORY ?= /builds/source |
UPLOAD_REPOSITORY ?= /build/builds/source |
99 |
|
|
100 |
# We define CURL and WGET in a way that makes if possible to have them |
# We define CURL and WGET in a way that makes if possible to have them |
101 |
# overwritten from the module's Makefiles. Then CLIENT picks CURL, otherwise WGET |
# overwritten from the module's Makefiles. Then CLIENT picks CURL, otherwise WGET |
103 |
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) |
104 |
CLIENT ?= $(if $(CURL),$(CURL),$(if $(WGET),$(WGET))) |
CLIENT ?= $(if $(CURL),$(CURL),$(if $(WGET),$(WGET))) |
105 |
PLAGUE_CLIENT ?= $(shell which plague-client 2>/dev/null) |
PLAGUE_CLIENT ?= $(shell which plague-client 2>/dev/null) |
106 |
|
BUILD_CLIENT ?= $(shell which koji 2>/dev/null) |
107 |
|
BODHI_CLIENT ?= $(shell which bodhi 2>/dev/null) |
108 |
|
|
109 |
# RPM with all the overrides in place |
# RPM with all the overrides in place; you can override this in your |
110 |
|
# .cvspkgsrc also, to use a default rpm setup |
111 |
|
# the rpm build command line |
112 |
ifndef RPM |
ifndef RPM |
113 |
RPM := $(shell if test -f /usr/bin/rpmbuild ; then echo rpmbuild ; else echo rpm ; fi) |
RPM := rpmbuild |
114 |
endif |
endif |
115 |
ifndef RPM_WITH_DIRS |
ifndef RPM_WITH_DIRS |
116 |
RPM_WITH_DIRS = $(RPM) $(RPM_DEFINES) |
RPM_WITH_DIRS = $(RPM) $(RPM_DEFINES) |
139 |
endef |
endef |
140 |
|
|
141 |
# list the possible targets for valid arches |
# list the possible targets for valid arches |
142 |
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 sparcv9v sparc64v i164 mac sh mips geode |
143 |
|
|
144 |
# 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 |
145 |
PREP_ARCHES = $(addprefix prep-,$(ARCHES)) |
PREP_ARCHES = $(addprefix prep-,$(ARCHES)) |
146 |
|
|
147 |
## list all our bogus targets |
## list all our bogus targets |
148 |
.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 |
.PHONY :: $(ARCHES) commit sources uploadsource upload export check build-check plague koji build cvsurl chain-build test-srpm srpm tag force-tag verrel new clean patch prep compile install install-short compile-short FORCE local scratch-build scratch-build-% |
149 |
|
|
150 |
# The TARGETS define is meant for local module targets that should be |
# The TARGETS define is meant for local module targets that should be |
151 |
# made in addition to the SOURCEFILES whenever needed |
# made in addition to the SOURCEFILES whenever needed |
165 |
break ; \ |
break ; \ |
166 |
fi ; \ |
fi ; \ |
167 |
done |
done |
168 |
|
@if [ -z "$(CLIENT)" ]; then echo "Can't download, need curl or wget installed." ; exit 1; fi |
169 |
@if [ ! -e "$@" ] ; then $(CLIENT) $(REPOSITORY)/$(get_sources_md5)/$@ ; fi |
@if [ ! -e "$@" ] ; then $(CLIENT) $(REPOSITORY)/$(get_sources_md5)/$@ ; fi |
170 |
@if [ ! -e "$@" ] ; then echo "Could not download source file: $@ does not exist" ; exit 1 ; fi |
@if [ ! -e "$@" ] ; then echo "Could not download source file: $@ does not exist" ; exit 1 ; fi |
171 |
@if test "$$(md5sum $@ | awk '{print $$1}')" != "$(get_sources_md5)" ; then \ |
@if test "$$(md5sum $@ | awk '{print $$1}')" != "$(get_sources_md5)" ; then \ |
247 |
|
|
248 |
# test build in mock |
# test build in mock |
249 |
mockbuild : srpm |
mockbuild : srpm |
250 |
mock $(MOCKARGS) -r $(MOCKCFG) --resultdir=$(MOCKDIR)/$(TAG) $(SRCRPMDIR)/$(NAME)-$(VERSION)-$(RELEASE).src.rpm |
mock $(MOCKARGS) -r $(MOCKCFG) --resultdir=$(MOCKDIR)/$(TAG) rebuild $(SRCRPMDIR)/$(NAME)-$(VERSION)-$(RELEASE).src.rpm |
251 |
|
|
252 |
|
# check the build with rpmlint |
253 |
|
lint: |
254 |
|
@test -e $(NAME)-$(VERSION)-$(RELEASE).src.rpm || (echo "run 'make local' first" ; exit 1 ) |
255 |
|
rpmlint $(NAME)-$(VERSION)-$(RELEASE).src.rpm $(LOCALARCH)/*-$(VERSION)-$(RELEASE).$(LOCALARCH).rpm |
256 |
|
|
257 |
# build for a particular arch |
# build for a particular arch |
258 |
$(ARCHES) : sources $(TARGETS) |
$(ARCHES) : sources $(TARGETS) |
259 |
$(RPM_WITH_DIRS) --target $@ -ba $(SPECFILE) 2>&1 | tee .build-$(VERSION)-$(RELEASE).log |
$(RPM_WITH_DIRS) --target $@ -ba $(SPECFILE) 2>&1 | tee .build-$(VERSION)-$(RELEASE).log ; exit $${PIPESTATUS[0]} |
|
@exit ${PIPESTATUS[0]} |
|
260 |
|
|
261 |
# empty target to force checking of md5sums in FULLSOURCEFILES |
# empty target to force checking of md5sums in FULLSOURCEFILES |
262 |
FORCE: |
FORCE: |
263 |
|
|
264 |
# build whatever's appropriate for the local architecture |
# build whatever's appropriate for the local architecture |
265 |
local: $(if $(shell grep -i '^BuildArch:.*noarch' $(SPECFILE)), noarch, $(shell uname -m)) |
local: $(LOCALARCH) |
266 |
|
|
267 |
# attempt to apply all the patches, optionally only for a particular arch |
# attempt to apply all the patches, optionally only for a particular arch |
268 |
ifdef PREPARCH |
ifdef PREPARCH |
280 |
compile: sources $(TARGETS) |
compile: sources $(TARGETS) |
281 |
$(RPM_WITH_DIRS) -bc $(SPECFILE) |
$(RPM_WITH_DIRS) -bc $(SPECFILE) |
282 |
|
|
283 |
|
install: sources $(TARGETS) |
284 |
|
$(RPM_WITH_DIRS) -bi $(SPECFILE) |
285 |
|
|
286 |
compile-short: sources $(TARGETS) |
compile-short: sources $(TARGETS) |
287 |
$(RPM_WITH_DIRS) --nodeps --short-circuit -bc $(SPECFILE) |
$(RPM_WITH_DIRS) --nodeps --short-circuit -bc $(SPECFILE) |
288 |
|
|
291 |
|
|
292 |
CVS_ROOT := $(shell if [ -f CVS/Root ] ; then cat CVS/Root ; fi) |
CVS_ROOT := $(shell if [ -f CVS/Root ] ; then cat CVS/Root ; fi) |
293 |
CVS_REPOSITORY := $(shell if [ -f CVS/Repository ] ; then cat CVS/Repository ; fi) |
CVS_REPOSITORY := $(shell if [ -f CVS/Repository ] ; then cat CVS/Repository ; fi) |
294 |
|
CVS_URL := cvs://shell.koozali.org/cvs/smeserver?$(CVS_REPOSITORY)\#$(TAG) |
295 |
|
|
296 |
## create a clean exported copy in $(TMPCVS) |
## create a clean exported copy in $(TMPCVS) |
297 |
export:: sources |
export:: sources |
322 |
done; |
done; |
323 |
|
|
324 |
## use this to build an srpm locally |
## use this to build an srpm locally |
325 |
|
ifneq (, $(filter sme7 sme8, $(BRANCH))) |
326 |
|
srpm: sources $(TARGETS) |
327 |
|
$(RPM_WITH_DIRS) $(DIST_DEFINES) --define _source_filedigest_algorithm=md5 --nodeps -bs $(SPECFILE) |
328 |
|
else |
329 |
srpm: sources $(TARGETS) |
srpm: sources $(TARGETS) |
330 |
$(RPM_WITH_DIRS) $(DIST_DEFINES) --nodeps -bs $(SPECFILE) |
$(RPM_WITH_DIRS) $(DIST_DEFINES) --nodeps -bs $(SPECFILE) |
331 |
|
endif |
332 |
|
|
333 |
test-srpm: srpm |
test-srpm: srpm |
334 |
|
|
345 |
force-tag: $(SPECFILE) $(COMMON_DIR)/branches |
force-tag: $(SPECFILE) $(COMMON_DIR)/branches |
346 |
@$(MAKE) tag TAG_OPTS="-F $(TAG_OPTS)" |
@$(MAKE) tag TAG_OPTS="-F $(TAG_OPTS)" |
347 |
|
|
348 |
|
define find-user |
349 |
|
if [ `cat CVS/Root |grep -c [^:]@` -ne 0 ]; then cat CVS/Root |cut -d @ -f 1 | sed 's/:.*://' ; else echo $(USER); fi |
350 |
|
endef |
351 |
|
USER := $(shell $(find-user)) |
352 |
|
|
353 |
|
oldbuild: $(COMMON_DIR)/branches |
354 |
|
@if [ -z "$(TARGET)" -a ! -d CVS ]; then echo "Must be in a branch subdirectory"; exit 1; fi |
355 |
|
|
356 |
|
@cvs status -v $(SPECFILE) 2>/dev/null | grep -q $(TAG); ret=$$? ;\ |
357 |
|
if [ $$ret -ne 0 ]; then echo "$(SPECFILE) not tagged with tag $(TAG)"; exit 1; fi |
358 |
|
|
359 |
|
@(pushd $(COMMON_DIR) >/dev/null ;\ |
360 |
|
rm -f tobuild ;\ |
361 |
|
cvs -Q update -C tobuild ;\ |
362 |
|
echo -e "$(USER)\t$(CVS_REPOSITORY)\t$(TAG)\t$(TARGET)" >> tobuild ;\ |
363 |
|
cvs commit -m "request build of $(CVS_REPOSITORY) $(TAG) for $(TARGET)" tobuild ;\ |
364 |
|
popd >/dev/null) |
365 |
|
|
366 |
build-check: $(SPECFILE) |
build-check: $(SPECFILE) |
367 |
@if [ -z "$(TARGET)" -o ! -d CVS ]; then echo "Must be in a branch subdirectory"; exit 1; fi |
@if [ -z "$(TARGET)" -o ! -d CVS ]; then echo "Must be in a branch subdirectory"; exit 1; fi |
368 |
@cvs -f status -v $(SPECFILE) 2>/dev/null | grep -q $(TAG); ret=$$? ;\ |
@cvs -f status -v $(SPECFILE) 2>/dev/null | grep -q $(TAG); ret=$$? ;\ |
370 |
|
|
371 |
plague: build-check $(COMMON_DIR)/branches |
plague: build-check $(COMMON_DIR)/branches |
372 |
@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 |
373 |
@$(PLAGUE_CLIENT) build $(NAME) $(TAG) $(TARGET) |
$(PLAGUE_CLIENT) build $(NAME) $(TAG) $(TARGET) |
374 |
|
|
375 |
|
koji: build-check $(COMMON_DIR)/branches |
376 |
|
@if [ ! -x "$(BUILD_CLIENT)" ]; then echo "Must have koji installed - see http://fedoraproject.org/wiki/BuildSystemClientSetup"; exit 1; fi |
377 |
|
$(BUILD_CLIENT) $(SECONDARY_CONFIG) build $(BUILD_FLAGS) $(TARGET) '$(CVS_URL)' |
378 |
|
|
379 |
|
ifneq (, $(filter devel, $(BRANCH))) |
380 |
|
build: koji |
381 |
|
else |
382 |
build: plague |
build: plague |
383 |
|
endif |
384 |
|
|
385 |
|
scratch-build: build-check |
386 |
|
@if [ ! -x "$(BUILD_CLIENT)" ]; then echo "Must have koji installed - see http://fedoraproject.org/wiki/BuildSystemClientSetup"; exit 1; fi |
387 |
|
$(BUILD_CLIENT) $(SECONDARY_CONFIG) build --scratch $(BUILD_FLAGS) $(TARGET) '$(CVS_URL)' |
388 |
|
|
389 |
|
|
390 |
|
scratch-build-%: build-check |
391 |
|
@if [ ! -x "$(BUILD_CLIENT)" ]; then echo "Must have koji installed - see http://fedoraproject.org/wiki/BuildSystemClientSetup"; exit 1; fi |
392 |
|
$(BUILD_CLIENT) $(SECONDARY_CONFIG) build --scratch --arch-override=$* $(BUILD_FLAGS) $(TARGET) '$(CVS_URL)' |
393 |
|
|
394 |
|
|
395 |
|
bodhi: build-check $(COMMON_DIR)/branches clog |
396 |
|
@if [ ! -x "$(BODHI_CLIENT)" ]; then echo "Must have bodhi-client installed"; exit 1; fi |
397 |
|
@echo -e "\ |
398 |
|
# [ $(NAME)-$(VERSION)-$(RELEASE) ]\n\ |
399 |
|
# type=[S|B|E] (S=security, B=bugfix, E=enhancement) (required)\n\ |
400 |
|
# request=[T|S] (T=testing, S=stable) (default: testing)\n\ |
401 |
|
# bug=123,456\n\ |
402 |
|
# all other text will be considered to be part of the update notes\n\ |
403 |
|
type=" > bodhi.template |
404 |
|
@grep -iZ '\[SME' clog | xargs -0n1 | sed -n -e 's,[^]]*\[SME[: ]*\([0-9]*\)\],\1 ,igp' | xargs | tr ' ' ',' > $(NAME).bugs |
405 |
|
@if [ `cat $(NAME).bugs` ]; then echo "bug=`cat $(NAME).bugs`" >> bodhi.template; fi |
406 |
|
@sed -e '/^#/d' < bodhi.template > bodhi.template.orig |
407 |
|
@if [ -z "$$EDITOR" ]; then vi bodhi.template; else $$EDITOR bodhi.template; fi |
408 |
|
@if [ -n "`sed -e '/^#/d' < bodhi.template | diff bodhi.template.orig -`" ]; then \ |
409 |
|
$(BODHI_CLIENT) -v --new --release $(subst -,,$(BRANCH)) \ |
410 |
|
--file bodhi.template $(NAME)-$(VERSION)-$(RELEASE) -u $(BODHI_USER); \ |
411 |
|
else \ |
412 |
|
echo "Bodhi update aborted!"; \ |
413 |
|
fi |
414 |
|
@rm -f bodhi.template{,.orig} $(NAME).bugs clog |
415 |
|
|
416 |
|
ifndef $(BODHI_USER) |
417 |
|
BODHI_USER=$(USER) |
418 |
|
endif |
419 |
|
|
420 |
|
ifneq (, $(filter sme7 sme8, $(BRANCH))) |
421 |
|
update: bodhi |
422 |
|
endif |
423 |
|
|
424 |
|
cvsurl: |
425 |
|
@echo '$(CVS_URL)' |
426 |
|
|
427 |
|
chain-build: build-check |
428 |
|
@if [ -z "$(CHAIN)" ]; then \ |
429 |
|
echo "Missing CHAIN variable, please specify the order of packages to" ; \ |
430 |
|
echo "chain build. For example: make chain-build CHAIN='foo bar'" ; \ |
431 |
|
exit 1 ; \ |
432 |
|
fi ; \ |
433 |
|
set -e ; \ |
434 |
|
subdir=`basename $$(pwd)` ; \ |
435 |
|
urls="" ; \ |
436 |
|
for component in $(CHAIN) ; do \ |
437 |
|
if [ "$$component" = "$(NAME)" ]; then \ |
438 |
|
echo "$(NAME) must not appear in CHAIN" ; \ |
439 |
|
exit 1 ; \ |
440 |
|
fi ; \ |
441 |
|
if [ "$$component" = ":" ]; then \ |
442 |
|
urls="$$urls :" ; \ |
443 |
|
continue ; \ |
444 |
|
elif [ -n "$$urls" -a -z "$(findstring :,$(CHAIN))" ]; then \ |
445 |
|
urls="$$urls :" ; \ |
446 |
|
fi ; \ |
447 |
|
rm -rf .tmp-$$$$ ; \ |
448 |
|
mkdir -p .tmp-$$$$ ; \ |
449 |
|
pushd .tmp-$$$$ > /dev/null ; \ |
450 |
|
cvs -f -Q -z 3 -d $(CVS_ROOT) co $$component ; \ |
451 |
|
urls="$$urls `make -s -C $$component/$$subdir cvsurl`" ; \ |
452 |
|
popd > /dev/null ; \ |
453 |
|
rm -rf .tmp-$$$$ ; \ |
454 |
|
done ; \ |
455 |
|
if [ -z "$(findstring :,$(CHAIN))" ]; then \ |
456 |
|
urls="$$urls :" ; \ |
457 |
|
fi ; \ |
458 |
|
urls="$$urls `make -s cvsurl`" ; \ |
459 |
|
$(BUILD_CLIENT) chain-build $(BUILD_FLAGS) $(TARGET) $$urls |
460 |
|
|
461 |
# "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 |
462 |
new: |
new: |
518 |
|
|
519 |
commit: clog |
commit: clog |
520 |
@cvs commit -F $? |
@cvs commit -F $? |
521 |
|
@rm -f clog |
522 |
|
|
523 |
help: |
help: |
524 |
@echo "Usage: make <target>" |
@echo "Usage: make <target>" |
531 |
@echo " local Local test rpmbuild binary" |
@echo " local Local test rpmbuild binary" |
532 |
@echo " prep Local test rpmbuild prep" |
@echo " prep Local test rpmbuild prep" |
533 |
@echo " compile Local test rpmbuild compile" |
@echo " compile Local test rpmbuild compile" |
534 |
|
@echo " install Local test rpmbuild install" |
535 |
@echo " compile-short Local test rpmbuild short-circuit compile" |
@echo " compile-short Local test rpmbuild short-circuit compile" |
536 |
@echo " install-short Local test rpmbuild short-circuit install" |
@echo " install-short Local test rpmbuild short-circuit install" |
537 |
|
@echo " lint Run rpmlint against local build output" |
538 |
@echo " export Create clean export in \"cvs-$(TAG)\"" |
@echo " export Create clean export in \"cvs-$(TAG)\"" |
539 |
@echo " check Check test srpm preps on all archs" |
@echo " check Check test srpm preps on all archs" |
540 |
@echo " srpm Create a srpm" |
@echo " srpm Create a srpm" |
541 |
@echo " tag Tag sources as \"$(TAG)\"" |
@echo " tag Tag sources as \"$(TAG)\"" |
542 |
@echo " build Request build of \"$(TAG)\" for $(TARGET)" |
@echo " build Request build of \"$(TAG)\" for $(TARGET)" |
543 |
|
@echo " chain-build Build current package in order with other packages" |
544 |
|
@echo " example: make chain-build CHAIN='libwidget libgizmo'" |
545 |
|
@echo " The current package is added to the end of the CHAIN list." |
546 |
|
@echo " Colons (:) can be used in the CHAIN parameter to define dependency groups." |
547 |
|
@echo " Packages in a single group will be built in parallel, and all packages" |
548 |
|
@echo " in a group must build successfully and populate the repository before" |
549 |
|
@echo " the next group will begin building." |
550 |
|
@echo " If no groups are defined, packages will be built sequentially." |
551 |
|
@echo " scratch-build Request scratch build of \"$(TAG)\" for $(TARGET)" |
552 |
|
@echo " scratch-build-<archs> Request scratch build of \"$(TAG)\" for $(TARGET) and archs <archs>" |
553 |
|
@echo " examples: make scratch-build-i386,ppc64" |
554 |
|
@echo " make scratch-build-x86_64" |
555 |
@echo " mockbuild Local test build using mock" |
@echo " mockbuild Local test build using mock" |
556 |
@echo " verrel Echo \"$(NAME)-$(VERSION)-$(RELEASE)\"" |
@echo " verrel Echo \"$(NAME)-$(VERSION)-$(RELEASE)\"" |
557 |
@echo " new Diff against last tag" |
@echo " new Diff against last tag" |
561 |
@echo " patch SUFFIX=<suff> Create and add a gendiff patch file" |
@echo " patch SUFFIX=<suff> Create and add a gendiff patch file" |
562 |
@echo " rediff SUFFIX=<suff> Recreates a gendiff patch file, retaining comments" |
@echo " rediff SUFFIX=<suff> Recreates a gendiff patch file, retaining comments" |
563 |
@echo " unused-patches Print list of patches not referenced by name in specfile" |
@echo " unused-patches Print list of patches not referenced by name in specfile" |
564 |
|
@echo " unused-fedora-patches Print Fedora patches not used by Patch and/or ApplyPatch directives" |
565 |
@echo " gimmespec Print the name of the specfile" |
@echo " gimmespec Print the name of the specfile" |
566 |
|
@echo " update Submit $(NAME)-$(VERSION)-$(RELEASE) as an update for $(BRANCH)" |
567 |
|
|
568 |
gimmespec: |
gimmespec: |
569 |
@echo "$(SPECFILE)" |
@echo "$(SPECFILE)" |
571 |
unused-patches: |
unused-patches: |
572 |
@for f in *.patch; do if [ -e $$f ]; then grep -q $$f $(SPECFILE) || echo $$f; fi; done |
@for f in *.patch; do if [ -e $$f ]; then grep -q $$f $(SPECFILE) || echo $$f; fi; done |
573 |
|
|
574 |
|
unused-fedora-patches: |
575 |
|
@for f in *.patch; do if [ -e $$f ]; then (egrep -q "^Patch[[:digit:]]+:[[:space:]]+$$f" $(SPECFILE) || echo "Unused: $$f") && egrep -q "^ApplyPatch[[:space:]]+$$f" $(SPECFILE) || echo "Unapplied: $$f"; fi; done |
576 |
|
|
577 |
##################### EXPERIMENTAL ########################## |
##################### EXPERIMENTAL ########################## |
578 |
# this stuff is very experimental in nature and should not be |
# this stuff is very experimental in nature and should not be |
579 |
# relied upon until these targets are moved above this line |
# relied upon until these targets are moved above this line |