1846f29
# Makefile for source rpm: perl-Test-Base
1846f29
# $Id$
1846f29
NAME := perl-Test-Base
1846f29
SPECFILE = $(firstword $(wildcard *.spec))
1846f29
1846f29
define find-makefile-common
1846f29
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
1846f29
endef
1846f29
1846f29
MAKEFILE_COMMON := $(shell $(find-makefile-common))
1846f29
1846f29
ifeq ($(MAKEFILE_COMMON),)
1846f29
# attept a checkout
1846f29
define checkout-makefile-common
1846f29
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
1846f29
endef
1846f29
1846f29
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
1846f29
endif
1846f29
1846f29
include $(MAKEFILE_COMMON)