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.4 2007/11/02 22:32:27 slords Exp $ |
# $Id: Makefile.common,v 1.12 2008/03/28 14:38:42 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 |
DIST_DEFINES = --define "dist $(DIST)" --define "$(DISTVAR) $(DISTVAL)" |
DISTDEF = $(shell echo $(DIST) | sed -e s/^\\\.// ) |
30 |
|
SMEVAL = $(word 5, $(BRANCHINFO)) |
31 |
|
DIST_DEFINES = --define "dist $(DIST)" --define "$(DISTVAR) $(DISTVAL)" --define "$(DISTDEF) 1" --define "sme $(SMEVAL)" |
32 |
|
|
33 |
BUILD_FLAGS ?= $(shell echo $(KOJI_FLAGS)) |
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 |
ifeq ($(DISTVAR),epel) |
MOCKCFG ?= smeserver-$(SMEVAL)-$(BUILDARCH)-core |
|
DISTVAR := rhel |
|
|
MOCKCFG ?= fedora-$(DISTVAL)-$(BUILDARCH)-epel.cfg |
|
|
else |
|
|
MOCKCFG ?= fedora-$(DISTVAL)-$(BUILDARCH)-core.cfg |
|
|
endif |
|
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... |
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) |
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; you can override this in your |
# RPM with all the overrides in place; you can override this in your |
110 |
# .cvspkgsrc also, to use a default rpm setup |
# .cvspkgsrc also, to use a default rpm setup |
111 |
# the rpm build command line |
# 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) 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 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://smeserver.cvs.sourceforge.net:/cvsroot/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 |
340 |
force-tag: $(SPECFILE) $(COMMON_DIR)/branches |
force-tag: $(SPECFILE) $(COMMON_DIR)/branches |
341 |
@$(MAKE) tag TAG_OPTS="-F $(TAG_OPTS)" |
@$(MAKE) tag TAG_OPTS="-F $(TAG_OPTS)" |
342 |
|
|
343 |
|
define find-user |
344 |
|
if [ `cat CVS/Root |grep -c [^:]@` -ne 0 ]; then cat CVS/Root |cut -d @ -f 1 | sed 's/:.*://' ; else echo $(USER); fi |
345 |
|
endef |
346 |
|
USER := $(shell $(find-user)) |
347 |
|
|
348 |
|
oldbuild: $(COMMON_DIR)/branches |
349 |
|
@if [ -z "$(TARGET)" -a ! -d CVS ]; then echo "Must be in a branch subdirectory"; exit 1; fi |
350 |
|
|
351 |
|
@cvs status -v $(SPECFILE) 2>/dev/null | grep -q $(TAG); ret=$$? ;\ |
352 |
|
if [ $$ret -ne 0 ]; then echo "$(SPECFILE) not tagged with tag $(TAG)"; exit 1; fi |
353 |
|
|
354 |
|
@(pushd $(COMMON_DIR) >/dev/null ;\ |
355 |
|
rm -f tobuild ;\ |
356 |
|
cvs -Q update -C tobuild ;\ |
357 |
|
echo -e "$(USER)\t$(CVS_REPOSITORY)\t$(TAG)\t$(TARGET)" >> tobuild ;\ |
358 |
|
cvs commit -m "request build of $(CVS_REPOSITORY) $(TAG) for $(TARGET)" tobuild ;\ |
359 |
|
popd >/dev/null) |
360 |
|
|
361 |
build-check: $(SPECFILE) |
build-check: $(SPECFILE) |
362 |
@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 |
363 |
@cvs -f status -v $(SPECFILE) 2>/dev/null | grep -q $(TAG); ret=$$? ;\ |
@cvs -f status -v $(SPECFILE) 2>/dev/null | grep -q $(TAG); ret=$$? ;\ |
365 |
|
|
366 |
plague: build-check $(COMMON_DIR)/branches |
plague: build-check $(COMMON_DIR)/branches |
367 |
@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 |
368 |
@$(PLAGUE_CLIENT) build $(NAME) $(TAG) $(TARGET) |
$(PLAGUE_CLIENT) build $(NAME) $(TAG) $(TARGET) |
369 |
|
|
370 |
koji: build-check $(COMMON_DIR)/branches |
koji: build-check $(COMMON_DIR)/branches |
371 |
@if [ ! -x "$(BUILD_CLIENT)" ]; then echo "Must have koji installed - see http://fedoraproject.org/wiki/BuildSystemClientSetup"; exit 1; fi |
@if [ ! -x "$(BUILD_CLIENT)" ]; then echo "Must have koji installed - see http://fedoraproject.org/wiki/BuildSystemClientSetup"; exit 1; fi |
372 |
@$(BUILD_CLIENT) build $(BUILD_FLAGS) $(TARGET) 'cvs://smeserver.cvs.sourceforge.net/cvsroot/smeserver?$(CVS_REPOSITORY)#$(TAG)' |
$(BUILD_CLIENT) $(SECONDARY_CONFIG) build $(BUILD_FLAGS) $(TARGET) '$(CVS_URL)' |
373 |
|
|
374 |
|
ifneq (, $(filter devel, $(BRANCH))) |
375 |
|
build: koji |
376 |
|
else |
377 |
build: plague |
build: plague |
378 |
|
endif |
379 |
|
|
380 |
|
scratch-build: build-check |
381 |
|
@if [ ! -x "$(BUILD_CLIENT)" ]; then echo "Must have koji installed - see http://fedoraproject.org/wiki/BuildSystemClientSetup"; exit 1; fi |
382 |
|
$(BUILD_CLIENT) $(SECONDARY_CONFIG) build --scratch $(BUILD_FLAGS) $(TARGET) '$(CVS_URL)' |
383 |
|
|
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 --arch-override=$* $(BUILD_FLAGS) $(TARGET) '$(CVS_URL)' |
388 |
|
|
389 |
|
|
390 |
|
bodhi: build-check $(COMMON_DIR)/branches clog |
391 |
|
@if [ ! -x "$(BODHI_CLIENT)" ]; then echo "Must have bodhi-client installed"; exit 1; fi |
392 |
|
@echo -e "\ |
393 |
|
# [ $(NAME)-$(VERSION)-$(RELEASE) ]\n\ |
394 |
|
# type=[S|B|E] (S=security, B=bugfix, E=enhancement) (required)\n\ |
395 |
|
# request=[T|S] (T=testing, S=stable) (default: testing)\n\ |
396 |
|
# bug=123,456\n\ |
397 |
|
# all other text will be considered to be part of the update notes\n\ |
398 |
|
type=" > bodhi.template |
399 |
|
@grep -iZ '\[SME' clog | xargs -0n1 | sed -n -e 's,[^]]*\[SME[: ]*\([0-9]*\)\],\1 ,igp' | xargs | tr ' ' ',' > $(NAME).bugs |
400 |
|
@if [ `cat $(NAME).bugs` ]; then echo "bug=`cat $(NAME).bugs`" >> bodhi.template; fi |
401 |
|
@sed -e '/^#/d' < bodhi.template > bodhi.template.orig |
402 |
|
@if [ -z "$$EDITOR" ]; then vi bodhi.template; else $$EDITOR bodhi.template; fi |
403 |
|
@if [ -n "`sed -e '/^#/d' < bodhi.template | diff bodhi.template.orig -`" ]; then \ |
404 |
|
$(BODHI_CLIENT) -v --new --release $(subst -,,$(BRANCH)) \ |
405 |
|
--file bodhi.template $(NAME)-$(VERSION)-$(RELEASE) -u $(BODHI_USER); \ |
406 |
|
else \ |
407 |
|
echo "Bodhi update aborted!"; \ |
408 |
|
fi |
409 |
|
@rm -f bodhi.template{,.orig} $(NAME).bugs clog |
410 |
|
|
411 |
|
ifndef $(BODHI_USER) |
412 |
|
BODHI_USER=$(USER) |
413 |
|
endif |
414 |
|
|
415 |
|
ifneq (, $(filter sme7 sme8, $(BRANCH))) |
416 |
|
update: bodhi |
417 |
|
endif |
418 |
|
|
419 |
|
cvsurl: |
420 |
|
@echo '$(CVS_URL)' |
421 |
|
|
422 |
|
chain-build: build-check |
423 |
|
@if [ -z "$(CHAIN)" ]; then \ |
424 |
|
echo "Missing CHAIN variable, please specify the order of packages to" ; \ |
425 |
|
echo "chain build. For example: make chain-build CHAIN='foo bar'" ; \ |
426 |
|
exit 1 ; \ |
427 |
|
fi ; \ |
428 |
|
set -e ; \ |
429 |
|
subdir=`basename $$(pwd)` ; \ |
430 |
|
urls="" ; \ |
431 |
|
for component in $(CHAIN) ; do \ |
432 |
|
if [ "$$component" = "$(NAME)" ]; then \ |
433 |
|
echo "$(NAME) must not appear in CHAIN" ; \ |
434 |
|
exit 1 ; \ |
435 |
|
fi ; \ |
436 |
|
if [ "$$component" = ":" ]; then \ |
437 |
|
urls="$$urls :" ; \ |
438 |
|
continue ; \ |
439 |
|
elif [ -n "$$urls" -a -z "$(findstring :,$(CHAIN))" ]; then \ |
440 |
|
urls="$$urls :" ; \ |
441 |
|
fi ; \ |
442 |
|
rm -rf .tmp-$$$$ ; \ |
443 |
|
mkdir -p .tmp-$$$$ ; \ |
444 |
|
pushd .tmp-$$$$ > /dev/null ; \ |
445 |
|
cvs -f -Q -z 3 -d $(CVS_ROOT) co $$component ; \ |
446 |
|
urls="$$urls `make -s -C $$component/$$subdir cvsurl`" ; \ |
447 |
|
popd > /dev/null ; \ |
448 |
|
rm -rf .tmp-$$$$ ; \ |
449 |
|
done ; \ |
450 |
|
if [ -z "$(findstring :,$(CHAIN))" ]; then \ |
451 |
|
urls="$$urls :" ; \ |
452 |
|
fi ; \ |
453 |
|
urls="$$urls `make -s cvsurl`" ; \ |
454 |
|
$(BUILD_CLIENT) chain-build $(BUILD_FLAGS) $(TARGET) $$urls |
455 |
|
|
456 |
# "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 |
457 |
new: |
new: |
511 |
clog: $(SPECFILE) |
clog: $(SPECFILE) |
512 |
@sed -n '/^%changelog/,/^$$/{/^%/d;/^$$/d;s/%%/%/g;p}' $(SPECFILE) | tee $@ |
@sed -n '/^%changelog/,/^$$/{/^%/d;/^$$/d;s/%%/%/g;p}' $(SPECFILE) | tee $@ |
513 |
|
|
514 |
|
commit: clog |
515 |
|
@cvs commit -F $? |
516 |
|
@rm -f clog |
517 |
|
|
518 |
help: |
help: |
519 |
@echo "Usage: make <target>" |
@echo "Usage: make <target>" |
520 |
@echo "Available targets are:" |
@echo "Available targets are:" |
526 |
@echo " local Local test rpmbuild binary" |
@echo " local Local test rpmbuild binary" |
527 |
@echo " prep Local test rpmbuild prep" |
@echo " prep Local test rpmbuild prep" |
528 |
@echo " compile Local test rpmbuild compile" |
@echo " compile Local test rpmbuild compile" |
529 |
|
@echo " install Local test rpmbuild install" |
530 |
@echo " compile-short Local test rpmbuild short-circuit compile" |
@echo " compile-short Local test rpmbuild short-circuit compile" |
531 |
@echo " install-short Local test rpmbuild short-circuit install" |
@echo " install-short Local test rpmbuild short-circuit install" |
532 |
|
@echo " lint Run rpmlint against local build output" |
533 |
@echo " export Create clean export in \"cvs-$(TAG)\"" |
@echo " export Create clean export in \"cvs-$(TAG)\"" |
534 |
@echo " check Check test srpm preps on all archs" |
@echo " check Check test srpm preps on all archs" |
535 |
@echo " srpm Create a srpm" |
@echo " srpm Create a srpm" |
536 |
@echo " tag Tag sources as \"$(TAG)\"" |
@echo " tag Tag sources as \"$(TAG)\"" |
537 |
@echo " build Request build of \"$(TAG)\" for $(TARGET)" |
@echo " build Request build of \"$(TAG)\" for $(TARGET)" |
538 |
|
@echo " chain-build Build current package in order with other packages" |
539 |
|
@echo " example: make chain-build CHAIN='libwidget libgizmo'" |
540 |
|
@echo " The current package is added to the end of the CHAIN list." |
541 |
|
@echo " Colons (:) can be used in the CHAIN parameter to define dependency groups." |
542 |
|
@echo " Packages in a single group will be built in parallel, and all packages" |
543 |
|
@echo " in a group must build successfully and populate the repository before" |
544 |
|
@echo " the next group will begin building." |
545 |
|
@echo " If no groups are defined, packages will be built sequentially." |
546 |
|
@echo " scratch-build Request scratch build of \"$(TAG)\" for $(TARGET)" |
547 |
|
@echo " scratch-build-<archs> Request scratch build of \"$(TAG)\" for $(TARGET) and archs <archs>" |
548 |
|
@echo " examples: make scratch-build-i386,ppc64" |
549 |
|
@echo " make scratch-build-x86_64" |
550 |
@echo " mockbuild Local test build using mock" |
@echo " mockbuild Local test build using mock" |
551 |
@echo " verrel Echo \"$(NAME)-$(VERSION)-$(RELEASE)\"" |
@echo " verrel Echo \"$(NAME)-$(VERSION)-$(RELEASE)\"" |
552 |
@echo " new Diff against last tag" |
@echo " new Diff against last tag" |
553 |
@echo " clog Make a clog file containing top changelog entry" |
@echo " clog Make a clog file containing top changelog entry" |
554 |
|
@echo " commit Commit to CVS using the clog file as the log message" |
555 |
@echo " clean Remove srcs ($(SOURCEFILES)), export dir (cvs-$(TAG)) and srpm ($(NAME)-$(VERSION)-$(RELEASE).src.rpm)" |
@echo " clean Remove srcs ($(SOURCEFILES)), export dir (cvs-$(TAG)) and srpm ($(NAME)-$(VERSION)-$(RELEASE).src.rpm)" |
556 |
@echo " patch SUFFIX=<suff> Create and add a gendiff patch file" |
@echo " patch SUFFIX=<suff> Create and add a gendiff patch file" |
557 |
@echo " rediff SUFFIX=<suff> Recreates a gendiff patch file, retaining comments" |
@echo " rediff SUFFIX=<suff> Recreates a gendiff patch file, retaining comments" |
558 |
@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" |
559 |
|
@echo " unused-fedora-patches Print Fedora patches not used by Patch and/or ApplyPatch directives" |
560 |
@echo " gimmespec Print the name of the specfile" |
@echo " gimmespec Print the name of the specfile" |
561 |
|
@echo " update Submit $(NAME)-$(VERSION)-$(RELEASE) as an update for $(BRANCH)" |
562 |
|
|
563 |
gimmespec: |
gimmespec: |
564 |
@echo "$(SPECFILE)" |
@echo "$(SPECFILE)" |
566 |
unused-patches: |
unused-patches: |
567 |
@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 |
568 |
|
|
569 |
|
unused-fedora-patches: |
570 |
|
@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 |
571 |
|
|
572 |
##################### EXPERIMENTAL ########################## |
##################### EXPERIMENTAL ########################## |
573 |
# this stuff is very experimental in nature and should not be |
# this stuff is very experimental in nature and should not be |
574 |
# relied upon until these targets are moved above this line |
# relied upon until these targets are moved above this line |