cvsdist 889d620
# Makefile for source rpm: freeradius
34e6eab
# $Id: Makefile,v 1.1 2004/09/09 04:51:34 cvsdist Exp $
cvsdist 889d620
NAME := freeradius
cvsdist 889d620
SPECFILE = $(firstword $(wildcard *.spec))
cvsdist 889d620
34e6eab
define find-makefile-common
34e6eab
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
34e6eab
endef
34e6eab
34e6eab
MAKEFILE_COMMON := $(shell $(find-makefile-common))
34e6eab
34e6eab
ifeq ($(MAKEFILE_COMMON),)
34e6eab
# attempt a checkout
34e6eab
define checkout-makefile-common
34e6eab
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
34e6eab
endef
34e6eab
34e6eab
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
34e6eab
endif
34e6eab
34e6eab
include $(MAKEFILE_COMMON)