cvsdist 1bac3a3
# Makefile for source rpm: quota
ae7dfc9
# $Id: Makefile,v 1.2 2007/10/15 19:19:48 notting Exp $
cvsdist 1bac3a3
NAME := quota
cvsdist 1bac3a3
SPECFILE = $(firstword $(wildcard *.spec))
cvsdist 1bac3a3
e566f2a
define find-makefile-common
ae7dfc9
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
e566f2a
endef
e566f2a
e566f2a
MAKEFILE_COMMON := $(shell $(find-makefile-common))
e566f2a
e566f2a
ifeq ($(MAKEFILE_COMMON),)
e566f2a
# attempt a checkout
e566f2a
define checkout-makefile-common
e566f2a
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
e566f2a
endef
e566f2a
e566f2a
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
e566f2a
endif
e566f2a
e566f2a
include $(MAKEFILE_COMMON)