f3dee88
# Makefile for source rpm: teckit
438b7ce
# $Id: Makefile,v 1.1 2007/07/16 18:24:04 kevin Exp $
f3dee88
NAME := teckit
f3dee88
SPECFILE = $(firstword $(wildcard *.spec))
f3dee88
f3dee88
define find-makefile-common
438b7ce
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
f3dee88
endef
f3dee88
f3dee88
MAKEFILE_COMMON := $(shell $(find-makefile-common))
f3dee88
f3dee88
ifeq ($(MAKEFILE_COMMON),)
f3dee88
# attept a checkout
f3dee88
define checkout-makefile-common
f3dee88
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
f3dee88
endef
f3dee88
f3dee88
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
f3dee88
endif
f3dee88
f3dee88
include $(MAKEFILE_COMMON)