cvsdist d87c452
# Makefile for source rpm: sysstat
3acaba2
# $Id: Makefile,v 1.2 2007/10/15 19:25:24 notting Exp $
cvsdist d87c452
NAME := sysstat
cvsdist d87c452
SPECFILE = $(firstword $(wildcard *.spec))
cvsdist d87c452
b00266e
define find-makefile-common
3acaba2
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
b00266e
endef
b00266e
b00266e
MAKEFILE_COMMON := $(shell $(find-makefile-common))
b00266e
b00266e
ifeq ($(MAKEFILE_COMMON),)
b00266e
# attempt a checkout
b00266e
define checkout-makefile-common
b00266e
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
b00266e
endef
b00266e
b00266e
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
b00266e
endif
b00266e
b00266e
include $(MAKEFILE_COMMON)