cvsdist 1981a37
# Makefile for source rpm: iscsi-initiator-utils
cvsdist 1981a37
# $Id$
cvsdist 1981a37
NAME := iscsi-initiator-utils
cvsdist 1981a37
SPECFILE = $(firstword $(wildcard *.spec))
cvsdist 1981a37
b770a18
define find-makefile-common
b770a18
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
b770a18
endef
b770a18
b770a18
MAKEFILE_COMMON := $(shell $(find-makefile-common))
b770a18
b770a18
ifeq ($(MAKEFILE_COMMON),)
b770a18
# attempt a checkout
b770a18
define checkout-makefile-common
b770a18
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
b770a18
endef
b770a18
b770a18
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
b770a18
endif
b770a18
b770a18
include $(MAKEFILE_COMMON)