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