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