elfutils/Makefile

64 lines
1.9 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
2009-01-24 01:16:36 +00:00
all:
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 $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
2007-05-03 22:49:17 +00:00
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
2009-01-24 01:16:36 +00:00
patches := $(patsubst %,elfutils-%.patch,robustify portability)
all: $(patches)
2008-04-09 21:51:31 +00:00
branch-portability = portable
2009-01-24 01:16:36 +00:00
2009-09-21 17:44:00 +00:00
git-%/configure: .git/refs/heads/* Makefile
2009-01-24 01:16:36 +00:00
@rm -rf $(@D)
git archive --prefix=$(@D)/ $(firstword $(branch-$*) $*) | tar xf -
cd $(@D) && autoreconf -i && rm -rf autom4te.cache
2008-04-09 21:51:31 +00:00
2009-09-21 17:44:00 +00:00
elfutils-%.patch: git-%/configure
branch=$(firstword $(branch-$*) $*); \
master=`git merge-base origin/master $$branch` && \
master=`git describe --tags --always $$master` && \
(set -x; $(MAKE) git-$$master/configure) && \
(set -x; diff --exclude='.gitignore' -Nrpu git-$$master $(<D)) | \
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
2009-01-24 01:16:36 +00:00
$(portable.srpm): elfutils-portable.spec $(patches) \
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)