elfutils/Makefile

98 lines
3.0 KiB
Makefile
Raw Normal View History

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
2008-12-31 22:12:44 +00:00
UPSTREAM_FILES = $(NAME)-$(VERSION).tar.bz2
2008-04-09 21:51:31 +00:00
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-08-27 19:37:47 +00:00
ifneq (,$(CURL))
2008-04-09 21:51:31 +00:00
CURL += -k
2008-08-27 19:33:20 +00:00
endif
2008-04-09 21:51:31 +00:00
branch-portability = portable
elfutils-base = elfutils-$(VERSION)
elfutils-base = master
2008-05-13 00:44:12 +00:00
elfutils-%.patch: elfutils-$(VERSION).tar.bz2 Makefile
2008-04-09 21:51:31 +00:00
@rm -rf elfutils-master elfutils-$*
git archive --prefix=elfutils-master/ $(elfutils-base) \
| tar xf -
git archive --prefix=elfutils-$*/ $(firstword $(branch-$*) $*) \
| tar xf -
cd elfutils-master; autoreconf -i; rm -rf autom4te.cache
cd elfutils-$*; autoreconf -i; rm -rf autom4te.cache
2008-04-09 21:51:31 +00:00
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
(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)
portable.srpm = elfutils-$(portable-vr).src.rpm
2005-12-08 01:48:13 +00:00
$(portable.srpm): elfutils-portable.spec elfutils-portability.patch \
2008-12-31 22:12:44 +00:00
elfutils-$(VERSION).tar.bz2
2005-07-29 20:18:25 +00:00
$(RPM_WITH_DIRS) --nodeps -bs $<
2005-12-07 20:11:06 +00:00
portable-srpm: $(portable.srpm)
portable-dist = 3.0E-scratch
2006-10-10 19:24:29 +00:00
portable-build = \
$(redhat)/brewroot/packages/elfutils/$(VERSION)/$(portable-r)
2007-02-06 00:32:24 +00:00
ifeq (,$(wildcard /mnt/redhat/brewroot/packages/elfutils))
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)
else
redhat = /mnt/redhat
2006-10-10 19:24:29 +00:00
$(portable-build): $(portable.srpm)
brew build $(BUILD_FLAGS) dist-$(portable-dist) $<
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)
endif
2006-10-10 19:24:29 +00:00
dist-files = README.elfutils systemtap-elfutils.repo
rsync-files = --exclude=tests --exclude=data $(portable-build)/
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)
@mkdir -p $@
2005-08-24 22:25:46 +00:00
$(RSYNC) -a --delete --progress -v $(rsync-files) systemtap-dist/
ln $(dist-files) systemtap-dist/
2006-10-10 19:24:29 +00:00
ln -v `rpm -qlp $<` systemtap-dist/
systemtap-dist-createrepo: systemtap-dist
ifneq ($(wildcard /usr/bin/createrepo),)
createrepo -q `cd $<; /bin/pwd`
endif
systemtap-sync: systemtap-dist-createrepo
2005-08-24 22:25:46 +00:00
$(RSYNC) -az --delete --progress -v systemtap-dist/ $(rsync-to)