ff322fe
# Makefile for source rpm: unbound
ff322fe
# $Id$
ff322fe
NAME := unbound
ff322fe
SPECFILE = $(firstword $(wildcard *.spec))
ff322fe
ff322fe
define find-makefile-common
ff322fe
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
ff322fe
endef
ff322fe
ff322fe
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ff322fe
ff322fe
ifeq ($(MAKEFILE_COMMON),)
ff322fe
# attept a checkout
ff322fe
define checkout-makefile-common
ff322fe
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
ff322fe
endef
ff322fe
ff322fe
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
ff322fe
endif
ff322fe
ff322fe
include $(MAKEFILE_COMMON)