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