8bfe331
# Makefile for source rpm: php-pear-Cache-Lite
8bfe331
# $Id$
8bfe331
NAME := php-pear-Cache-Lite
8bfe331
SPECFILE = $(firstword $(wildcard *.spec))
8bfe331
8bfe331
define find-makefile-common
8bfe331
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
8bfe331
endef
8bfe331
8bfe331
MAKEFILE_COMMON := $(shell $(find-makefile-common))
8bfe331
8bfe331
ifeq ($(MAKEFILE_COMMON),)
8bfe331
# attept a checkout
8bfe331
define checkout-makefile-common
8bfe331
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
8bfe331
endef
8bfe331
8bfe331
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
8bfe331
endif
8bfe331
8bfe331
include $(MAKEFILE_COMMON)