cvsdist 5168b04
# Makefile for source rpm: netatalk
b20183a
# $Id: Makefile,v 1.1 2004/09/09 09:08:15 cvsdist Exp $
cvsdist 5168b04
NAME := netatalk
cvsdist 5168b04
SPECFILE = $(firstword $(wildcard *.spec))
cvsdist 5168b04
b20183a
define find-makefile-common
b20183a
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
b20183a
endef
b20183a
b20183a
MAKEFILE_COMMON := $(shell $(find-makefile-common))
b20183a
b20183a
ifeq ($(MAKEFILE_COMMON),)
b20183a
# attempt a checkout
b20183a
define checkout-makefile-common
b20183a
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
b20183a
endef
b20183a
b20183a
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
b20183a
endif
b20183a
b20183a
include $(MAKEFILE_COMMON)