cvsdist 66cd71c
# Makefile for source rpm: subversion
12fd845
# $Id: Makefile,v 1.3 2004/09/30 10:49:48 jorton Exp $
cvsdist 66cd71c
NAME := subversion
cvsdist 66cd71c
SPECFILE = $(firstword $(wildcard *.spec))
723479b
UPSTREAM_CHECKS := asc
cvsdist 66cd71c
12fd845
define find-makefile-common
12fd845
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
12fd845
endef
12fd845
12fd845
MAKEFILE_COMMON := $(shell $(find-makefile-common))
12fd845
12fd845
ifeq ($(MAKEFILE_COMMON),)
12fd845
# attempt a checkout
12fd845
define checkout-makefile-common
12fd845
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
12fd845
endef
12fd845
12fd845
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
12fd845
endif
12fd845
12fd845
include $(MAKEFILE_COMMON)