Kristian Høgsberg 7affcc0
# Makefile for source rpm: cairo
3285f74
# $Id: Makefile,v 1.1 2004/11/12 21:44:23 krh Exp $
Kristian Høgsberg 7affcc0
NAME := cairo
Kristian Høgsberg 7affcc0
SPECFILE = $(firstword $(wildcard *.spec))
Kristian Høgsberg 7affcc0
3285f74
define find-makefile-common
3285f74
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
3285f74
endef
3285f74
3285f74
MAKEFILE_COMMON := $(shell $(find-makefile-common))
3285f74
3285f74
ifeq ($(MAKEFILE_COMMON),)
3285f74
# attempt a checkout
3285f74
define checkout-makefile-common
3285f74
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
3285f74
endef
3285f74
3285f74
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
3285f74
endif
3285f74
3285f74
include $(MAKEFILE_COMMON)