cvsdist 49b320d
# Makefile for source rpm: bind
cvsdist 49b320d
# $Id$
cvsdist 49b320d
NAME := bind
cvsdist 49b320d
SPECFILE = $(firstword $(wildcard *.spec))
cvsdist 49b320d
69c70d5
define find-makefile-common
69c70d5
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
69c70d5
endef
69c70d5
69c70d5
MAKEFILE_COMMON := $(shell $(find-makefile-common))
69c70d5
69c70d5
ifeq ($(MAKEFILE_COMMON),)
69c70d5
# attempt a checkout
69c70d5
define checkout-makefile-common
69c70d5
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
69c70d5
endef
69c70d5
69c70d5
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
69c70d5
endif
69c70d5
69c70d5
include $(MAKEFILE_COMMON)