b129b1e
# Makefile for source rpm: 3proxy
14ac989
# $Id: Makefile,v 1.1 2009/08/26 22:17:25 kevin Exp $
b129b1e
NAME := 3proxy
b129b1e
SPECFILE = $(firstword $(wildcard *.spec))
b129b1e
b129b1e
define find-makefile-common
14ac989
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
b129b1e
endef
b129b1e
b129b1e
MAKEFILE_COMMON := $(shell $(find-makefile-common))
b129b1e
b129b1e
ifeq ($(MAKEFILE_COMMON),)
b129b1e
# attept a checkout
b129b1e
define checkout-makefile-common
b129b1e
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
b129b1e
endef
b129b1e
b129b1e
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
b129b1e
endif
b129b1e
b129b1e
include $(MAKEFILE_COMMON)