bc46e4d
# Makefile for source rpm: perl-SystemC-Vregs
23cebb1
# $Id: Makefile,v 1.1 2009/02/24 20:48:13 kevin Exp $
bc46e4d
NAME := perl-SystemC-Vregs
bc46e4d
SPECFILE = $(firstword $(wildcard *.spec))
bc46e4d
bc46e4d
define find-makefile-common
23cebb1
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
bc46e4d
endef
bc46e4d
bc46e4d
MAKEFILE_COMMON := $(shell $(find-makefile-common))
bc46e4d
bc46e4d
ifeq ($(MAKEFILE_COMMON),)
bc46e4d
# attept a checkout
bc46e4d
define checkout-makefile-common
bc46e4d
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
bc46e4d
endef
bc46e4d
bc46e4d
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
bc46e4d
endif
bc46e4d
bc46e4d
include $(MAKEFILE_COMMON)