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