cvsdist d4d6629
# Makefile for source rpm: iptstate
4b7c2ce
# $Id: Makefile,v 1.2 2007/10/15 18:53:24 notting Exp $
cvsdist d4d6629
NAME := iptstate
cvsdist d4d6629
SPECFILE = $(firstword $(wildcard *.spec))
cvsdist d4d6629
0e37b2f
define find-makefile-common
4b7c2ce
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
0e37b2f
endef
0e37b2f
0e37b2f
MAKEFILE_COMMON := $(shell $(find-makefile-common))
0e37b2f
0e37b2f
ifeq ($(MAKEFILE_COMMON),)
0e37b2f
# attempt a checkout
0e37b2f
define checkout-makefile-common
0e37b2f
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
0e37b2f
endef
0e37b2f
0e37b2f
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
0e37b2f
endif
0e37b2f
0e37b2f
include $(MAKEFILE_COMMON)