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