f1a3fea
# Makefile for source rpm: libpfm
d9e840e
# $Id: Makefile,v 1.1 2004/09/24 14:13:08 wcohen Exp $
f1a3fea
NAME := libpfm
f1a3fea
SPECFILE = $(firstword $(wildcard *.spec))
f1a3fea
d9e840e
define find-makefile-common
d9e840e
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
d9e840e
endef
d9e840e
d9e840e
MAKEFILE_COMMON := $(shell $(find-makefile-common))
d9e840e
d9e840e
ifeq ($(MAKEFILE_COMMON),)
d9e840e
# attempt a checkout
d9e840e
define checkout-makefile-common
d9e840e
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
d9e840e
endef
d9e840e
d9e840e
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
d9e840e
endif
d9e840e
d9e840e
include $(MAKEFILE_COMMON)