b423592
# Makefile for source rpm: libffi
9c835cf
# $Id: Makefile,v 1.1 2008/02/15 17:24:59 kevin Exp $
b423592
NAME := libffi
b423592
SPECFILE = $(firstword $(wildcard *.spec))
b423592
b423592
define find-makefile-common
9c835cf
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
b423592
endef
b423592
b423592
MAKEFILE_COMMON := $(shell $(find-makefile-common))
b423592
b423592
ifeq ($(MAKEFILE_COMMON),)
b423592
# attept a checkout
b423592
define checkout-makefile-common
b423592
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
b423592
endef
b423592
b423592
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
b423592
endif
b423592
b423592
include $(MAKEFILE_COMMON)