2004-09-09 04:28:54 +00:00
|
|
|
# Makefile for source rpm: elfutils
|
|
|
|
# $Id$
|
|
|
|
NAME := elfutils
|
2005-07-29 20:24:01 +00:00
|
|
|
SPECFILE = elfutils.spec
|
2004-09-09 04:28:54 +00:00
|
|
|
|
2008-04-09 21:51:31 +00:00
|
|
|
UPSTREAM_CHECKS := sig
|
|
|
|
UPSTREAM_FILES = $(NAME)-$(VERSION).tar.gz
|
|
|
|
upstream:;
|
|
|
|
|
2007-05-03 22:49:17 +00:00
|
|
|
define find-makefile-common
|
|
|
|
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
|
|
|
endef
|
|
|
|
|
|
|
|
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
|
|
|
|
|
|
|
ifeq ($(MAKEFILE_COMMON),)
|
|
|
|
# attept a checkout
|
|
|
|
define checkout-makefile-common
|
|
|
|
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
|
|
|
endef
|
|
|
|
|
|
|
|
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
|
|
|
endif
|
|
|
|
|
|
|
|
include $(MAKEFILE_COMMON)
|
2005-05-08 22:43:51 +00:00
|
|
|
|
2008-04-09 21:51:31 +00:00
|
|
|
CURL += -k
|
|
|
|
|
2006-06-15 08:32:06 +00:00
|
|
|
MONOTONE = mtn
|
2005-06-09 22:29:12 +00:00
|
|
|
|
2008-04-09 21:51:31 +00:00
|
|
|
branch-portability = portable
|
|
|
|
|
2008-05-13 00:44:12 +00:00
|
|
|
elfutils-base = t:elfutils-$(VERSION)
|
|
|
|
|
2008-04-09 21:51:31 +00:00
|
|
|
elfutils-%.patch: elfutils-$(VERSION).tar.gz Makefile
|
|
|
|
@rm -rf elfutils-master elfutils-$*
|
|
|
|
# $(MONOTONE) checkout -b com.redhat.elfutils elfutils-master
|
|
|
|
$(MONOTONE) checkout -b com.redhat.elfutils \
|
2008-05-13 00:44:12 +00:00
|
|
|
-r $(elfutils-base) elfutils-master
|
2008-04-09 21:51:31 +00:00
|
|
|
$(MONOTONE) checkout \
|
|
|
|
-b com.redhat.elfutils.$(firstword $(branch-$*) $*) \
|
|
|
|
elfutils-$*
|
2007-04-19 16:28:12 +00:00
|
|
|
cd elfutils-master; autoreconf -i; rm -rf autom4te.cache _MTN
|
2008-04-09 21:51:31 +00:00
|
|
|
cd elfutils-$*; autoreconf -i; rm -rf autom4te.cache _MTN
|
|
|
|
diff -Nrpu elfutils-master elfutils-$* | \
|
2005-05-10 05:57:44 +00:00
|
|
|
filterdiff --remove-timestamps --strip=1 --addprefix=elfutils/ > $@.new
|
2005-05-08 22:43:51 +00:00
|
|
|
mv $@.new $@
|
2005-07-29 20:18:25 +00:00
|
|
|
|
|
|
|
elfutils-portable.spec: elfutils.spec
|
2007-04-20 19:25:46 +00:00
|
|
|
(echo '%define _with_compat 1'; sed 's/ check$$/& || :/' $<) > $@.new
|
2005-07-29 20:18:25 +00:00
|
|
|
mv -f $@.new $@
|
|
|
|
|
2006-10-10 19:24:29 +00:00
|
|
|
portable-r = 0.$(subst $(DIST),,$(RELEASE))
|
|
|
|
portable-vr = $(VERSION)-$(portable-r)
|
2005-08-10 07:15:24 +00:00
|
|
|
portable.srpm = elfutils-$(portable-vr).src.rpm
|
2005-12-08 01:48:13 +00:00
|
|
|
$(portable.srpm): elfutils-portable.spec elfutils-portability.patch \
|
|
|
|
elfutils-$(VERSION).tar.gz
|
2005-07-29 20:18:25 +00:00
|
|
|
$(RPM_WITH_DIRS) --nodeps -bs $<
|
2005-08-10 07:15:24 +00:00
|
|
|
|
2005-12-07 20:11:06 +00:00
|
|
|
portable-srpm: $(portable.srpm)
|
|
|
|
|
2005-08-10 07:15:24 +00:00
|
|
|
portable-dist = 3.0E-scratch
|
2006-10-10 19:24:29 +00:00
|
|
|
portable-build = \
|
|
|
|
$(redhat)/brewroot/packages/elfutils/$(VERSION)/$(portable-r)
|
2005-08-10 07:15:24 +00:00
|
|
|
|
2007-02-06 00:32:24 +00:00
|
|
|
ifeq (,$(wildcard /mnt/redhat/brewroot/packages/elfutils))
|
2005-08-10 07:15:24 +00:00
|
|
|
redhat = datadump.devel.redhat.com::redhat
|
|
|
|
rsync-to = devserv.devel.redhat.com:dist/elfutils/devel/systemtap-dist/
|
2006-10-10 19:24:29 +00:00
|
|
|
build-dep = $(portable.srpm)
|
2005-08-10 07:15:24 +00:00
|
|
|
else
|
|
|
|
redhat = /mnt/redhat
|
2006-10-10 19:24:29 +00:00
|
|
|
$(portable-build): $(portable.srpm)
|
2007-06-08 21:26:44 +00:00
|
|
|
brew build $(BUILD_FLAGS) dist-$(portable-dist) $<
|
2005-08-10 07:15:24 +00:00
|
|
|
rsync-to = $(public)
|
2006-10-10 19:24:29 +00:00
|
|
|
build-dep = $(portable-build)/src/$(portable.srpm)
|
|
|
|
portable-build: $(portable-build)
|
2007-01-11 08:51:15 +00:00
|
|
|
$(build-dep): $(portable-build)
|
2005-08-10 07:15:24 +00:00
|
|
|
endif
|
|
|
|
|
2006-10-10 19:24:29 +00:00
|
|
|
dist-files = README.elfutils systemtap-elfutils.repo
|
|
|
|
rsync-files = --exclude=tests --exclude=data $(portable-build)/
|
2005-08-10 07:15:24 +00:00
|
|
|
public = sources.redhat.com:/sourceware/ftp/anonftp/pub/systemtap/elfutils/
|
|
|
|
|
|
|
|
RSYNC = RSYNC_RSH=ssh rsync
|
|
|
|
|
2006-10-10 19:24:29 +00:00
|
|
|
systemtap-dist: $(build-dep) $(dist-files)
|
2005-08-10 07:15:24 +00:00
|
|
|
@mkdir -p $@
|
2005-08-24 22:25:46 +00:00
|
|
|
$(RSYNC) -a --delete --progress -v $(rsync-files) systemtap-dist/
|
2005-08-10 07:15:24 +00:00
|
|
|
ln $(dist-files) systemtap-dist/
|
2006-10-10 19:24:29 +00:00
|
|
|
ln -v `rpm -qlp $<` systemtap-dist/
|
2005-08-10 07:15:24 +00:00
|
|
|
|
|
|
|
systemtap-dist-createrepo: systemtap-dist
|
|
|
|
ifneq ($(wildcard /usr/bin/createrepo),)
|
2006-08-15 06:50:37 +00:00
|
|
|
createrepo -q `cd $<; /bin/pwd`
|
2005-08-10 07:15:24 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
systemtap-sync: systemtap-dist-createrepo
|
2005-08-24 22:25:46 +00:00
|
|
|
$(RSYNC) -az --delete --progress -v systemtap-dist/ $(rsync-to)
|