fa48b86
# Makefile for source rpm: python-virtinst
5140bed
# $Id: Makefile,v 1.1 2006/10/13 04:08:50 katzj Exp $
fa48b86
NAME := python-virtinst
fa48b86
SPECFILE = $(firstword $(wildcard *.spec))
fa48b86
5140bed
define find-makefile-common
5140bed
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
5140bed
endef
5140bed
5140bed
MAKEFILE_COMMON := $(shell $(find-makefile-common))
5140bed
5140bed
ifeq ($(MAKEFILE_COMMON),)
5140bed
# attempt a checkout
5140bed
define checkout-makefile-common
5140bed
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
5140bed
endef
5140bed
5140bed
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
5140bed
endif
5140bed
5140bed
include $(MAKEFILE_COMMON)