|
cvsdist |
32b7b0c |
# Makefile for source rpm: elfutils
|
|
cvsdist |
32b7b0c |
# $Id$
|
|
cvsdist |
32b7b0c |
NAME := elfutils
|
|
 |
9136b0f |
SPECFILE = elfutils.spec
|
|
cvsdist |
32b7b0c |
|
|
 |
8474812 |
define find-makefile-common
|
|
 |
8474812 |
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
|
|
 |
8474812 |
endef
|
|
 |
8474812 |
|
|
 |
8474812 |
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
|
 |
8474812 |
|
|
 |
8474812 |
ifeq ($(MAKEFILE_COMMON),)
|
|
 |
8474812 |
# attept a checkout
|
|
 |
8474812 |
define checkout-makefile-common
|
|
 |
8474812 |
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
|
|
 |
8474812 |
endef
|
|
 |
8474812 |
|
|
 |
8474812 |
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
|
 |
8474812 |
endif
|
|
 |
8474812 |
|
|
 |
8474812 |
include $(MAKEFILE_COMMON)
|
|
 |
5fa3867 |
|
|
 |
3c3d383 |
MONOTONE = mtn
|
|
 |
c579df6 |
|
|
 |
c579df6 |
elfutils-portability.patch: elfutils-$(VERSION).tar.gz
|
|
 |
c579df6 |
@rm -rf elfutils-master elfutils-portable
|
|
 |
7fc6b92 |
$(MONOTONE) checkout -b com.redhat.elfutils elfutils-master
|
|
 |
7fc6b92 |
$(MONOTONE) checkout -b com.redhat.elfutils.portable elfutils-portable
|
|
 |
6b412c1 |
cd elfutils-master; autoreconf -i; rm -rf autom4te.cache _MTN
|
|
 |
6b412c1 |
cd elfutils-portable; autoreconf -i; rm -rf autom4te.cache _MTN
|
|
 |
c579df6 |
diff -rpu elfutils-master elfutils-portable | \
|
|
 |
570047f |
filterdiff --remove-timestamps --strip=1 --addprefix=elfutils/ > $@.new
|
|
 |
5fa3867 |
mv $@.new $@
|
|
 |
a0b6935 |
|
|
 |
a0b6935 |
elfutils-portable.spec: elfutils.spec
|
|
 |
9f4e62e |
(echo '%define _with_compat 1'; sed 's/ check$$/& || :/' $<) > $@.new
|
|
 |
a0b6935 |
mv -f $@.new $@
|
|
 |
a0b6935 |
|
|
 |
3cda913 |
portable-r = 0.$(subst $(DIST),,$(RELEASE))
|
|
 |
3cda913 |
portable-vr = $(VERSION)-$(portable-r)
|
|
 |
7d6f194 |
portable.srpm = elfutils-$(portable-vr).src.rpm
|
|
 |
e96d240 |
$(portable.srpm): elfutils-portable.spec elfutils-portability.patch \
|
|
 |
e96d240 |
elfutils-$(VERSION).tar.gz
|
|
 |
a0b6935 |
$(RPM_WITH_DIRS) --nodeps -bs $<
|
|
 |
7d6f194 |
|
|
 |
3025beb |
portable-srpm: $(portable.srpm)
|
|
 |
3025beb |
|
|
 |
7d6f194 |
portable-dist = 3.0E-scratch
|
|
 |
3cda913 |
portable-build = \
|
|
 |
3cda913 |
$(redhat)/brewroot/packages/elfutils/$(VERSION)/$(portable-r)
|
|
 |
7d6f194 |
|
|
 |
a254d19 |
ifeq (,$(wildcard /mnt/redhat/brewroot/packages/elfutils))
|
|
 |
7d6f194 |
redhat = datadump.devel.redhat.com::redhat
|
|
 |
7d6f194 |
rsync-to = devserv.devel.redhat.com:dist/elfutils/devel/systemtap-dist/
|
|
 |
3cda913 |
build-dep = $(portable.srpm)
|
|
 |
7d6f194 |
else
|
|
 |
7d6f194 |
redhat = /mnt/redhat
|
|
 |
3cda913 |
$(portable-build): $(portable.srpm)
|
|
 |
36b69fb |
brew build $(BUILD_FLAGS) dist-$(portable-dist) $<
|
|
 |
7d6f194 |
rsync-to = $(public)
|
|
 |
3cda913 |
build-dep = $(portable-build)/src/$(portable.srpm)
|
|
 |
3cda913 |
portable-build: $(portable-build)
|
|
 |
96ce8ef |
$(build-dep): $(portable-build)
|
|
 |
7d6f194 |
endif
|
|
 |
7d6f194 |
|
|
 |
3cda913 |
dist-files = README.elfutils systemtap-elfutils.repo
|
|
 |
3cda913 |
rsync-files = --exclude=tests --exclude=data $(portable-build)/
|
|
 |
7d6f194 |
public = sources.redhat.com:/sourceware/ftp/anonftp/pub/systemtap/elfutils/
|
|
 |
7d6f194 |
|
|
 |
7d6f194 |
RSYNC = RSYNC_RSH=ssh rsync
|
|
 |
7d6f194 |
|
|
 |
3cda913 |
systemtap-dist: $(build-dep) $(dist-files)
|
|
 |
7d6f194 |
@mkdir -p $@
|
|
 |
f212e3b |
$(RSYNC) -a --delete --progress -v $(rsync-files) systemtap-dist/
|
|
 |
7d6f194 |
ln $(dist-files) systemtap-dist/
|
|
 |
3cda913 |
ln -v `rpm -qlp $<` systemtap-dist/
|
|
 |
7d6f194 |
|
|
 |
7d6f194 |
systemtap-dist-createrepo: systemtap-dist
|
|
 |
7d6f194 |
ifneq ($(wildcard /usr/bin/createrepo),)
|
|
 |
4293c85 |
createrepo -q `cd $<; /bin/pwd`
|
|
 |
7d6f194 |
endif
|
|
 |
7d6f194 |
|
|
 |
7d6f194 |
systemtap-sync: systemtap-dist-createrepo
|
|
 |
f212e3b |
$(RSYNC) -az --delete --progress -v systemtap-dist/ $(rsync-to)
|