|
cvsdist |
32b7b0 |
# Makefile for source rpm: elfutils
|
|
cvsdist |
32b7b0 |
# $Id$
|
|
cvsdist |
32b7b0 |
NAME := elfutils
|
|
roland |
9136b0 |
SPECFILE = elfutils.spec
|
|
cvsdist |
32b7b0 |
|
|
roland |
5c16b0 |
all:
|
|
roland |
5c16b0 |
|
|
roland |
fa1a8e |
UPSTREAM_CHECKS := sig
|
|
roland |
28fe4d |
UPSTREAM_FILES = $(NAME)-$(VERSION).tar.bz2
|
|
roland |
fa1a8e |
upstream:;
|
|
roland |
fa1a8e |
|
|
roland |
847481 |
define find-makefile-common
|
|
Bill Nottingham |
5f896c |
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
|
roland |
847481 |
endef
|
|
roland |
847481 |
|
|
roland |
847481 |
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
|
roland |
847481 |
|
|
roland |
847481 |
ifeq ($(MAKEFILE_COMMON),)
|
|
roland |
847481 |
# attept a checkout
|
|
roland |
847481 |
define checkout-makefile-common
|
|
roland |
847481 |
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
|
|
roland |
847481 |
endef
|
|
roland |
847481 |
|
|
roland |
847481 |
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
|
roland |
847481 |
endif
|
|
roland |
847481 |
|
|
roland |
847481 |
include $(MAKEFILE_COMMON)
|
|
roland |
5fa386 |
|
|
roland |
d3f439 |
ifneq (,$(CURL))
|
|
roland |
fa1a8e |
CURL += -k
|
|
roland |
d2249a |
endif
|
|
roland |
fa1a8e |
|
|
roland |
5c16b0 |
patches := $(patsubst %,elfutils-%.patch,robustify portability)
|
|
roland |
5c16b0 |
all: $(patches)
|
|
roland |
5c16b0 |
|
|
roland |
fa1a8e |
branch-portability = portable
|
|
roland |
5c16b0 |
|
|
roland |
e4d1f5 |
git-%/configure: .git/refs/heads/* Makefile
|
|
roland |
5c16b0 |
@rm -rf $(@D)
|
|
roland |
5c16b0 |
git archive --prefix=$(@D)/ $(firstword $(branch-$*) $*) | tar xf -
|
|
roland |
5c16b0 |
cd $(@D) && autoreconf -i && rm -rf autom4te.cache
|
|
roland |
fa1a8e |
|
|
roland |
e4d1f5 |
elfutils-%.patch: git-%/configure
|
|
roland |
e4d1f5 |
branch=$(firstword $(branch-$*) $*); \
|
|
roland |
e4d1f5 |
master=`git merge-base origin/master $$branch` && \
|
|
roland |
e4d1f5 |
master=`git describe --tags --always $$master` && \
|
|
roland |
e4d1f5 |
(set -x; $(MAKE) git-$$master/configure) && \
|
|
roland |
e4d1f5 |
(set -x; diff --exclude='.gitignore' -Nrpu git-$$master $(
|
|
roland |
570047 |
filterdiff --remove-timestamps --strip=1 --addprefix=elfutils/ > $@.new
|
|
roland |
5fa386 |
mv $@.new $@
|
|
roland |
a0b693 |
|
|
roland |
a0b693 |
elfutils-portable.spec: elfutils.spec
|
|
roland |
9f4e62 |
(echo '%define _with_compat 1'; sed 's/ check$$/& || :/' $<) > $@.new
|
|
roland |
a0b693 |
mv -f $@.new $@
|
|
roland |
a0b693 |
|
|
roland |
3cda91 |
portable-r = 0.$(subst $(DIST),,$(RELEASE))
|
|
roland |
3cda91 |
portable-vr = $(VERSION)-$(portable-r)
|
|
roland |
7d6f19 |
portable.srpm = elfutils-$(portable-vr).src.rpm
|
|
roland |
5c16b0 |
$(portable.srpm): elfutils-portable.spec $(patches) \
|
|
roland |
28fe4d |
elfutils-$(VERSION).tar.bz2
|
|
roland |
a0b693 |
$(RPM_WITH_DIRS) --nodeps -bs $<
|
|
roland |
7d6f19 |
|
|
roland |
3025be |
portable-srpm: $(portable.srpm)
|