d31e923
# Makefile for source rpm: rubygem-actionpack
e1bef72
# $Id: Makefile,v 1.1 2007/11/28 23:22:59 kevin Exp $
d31e923
NAME := rubygem-actionpack
d31e923
SPECFILE = $(firstword $(wildcard *.spec))
d31e923
d31e923
define find-makefile-common
e1bef72
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
d31e923
endef
d31e923
d31e923
MAKEFILE_COMMON := $(shell $(find-makefile-common))
d31e923
d31e923
ifeq ($(MAKEFILE_COMMON),)
d31e923
# attept a checkout
d31e923
define checkout-makefile-common
d31e923
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
d31e923
endef
d31e923
d31e923
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
d31e923
endif
d31e923
d31e923
include $(MAKEFILE_COMMON)