cvsdist 29bedab
# Makefile for source rpm: xchat
a381ea7
# $Id: Makefile,v 1.1 2004/09/09 14:33:13 cvsdist Exp $
cvsdist 29bedab
NAME := xchat
cvsdist 29bedab
SPECFILE = $(firstword $(wildcard *.spec))
cvsdist 29bedab
a381ea7
define find-makefile-common
a381ea7
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
a381ea7
endef
a381ea7
a381ea7
MAKEFILE_COMMON := $(shell $(find-makefile-common))
a381ea7
a381ea7
ifeq ($(MAKEFILE_COMMON),)
a381ea7
# attempt a checkout
a381ea7
define checkout-makefile-common
a381ea7
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
a381ea7
endef
a381ea7
a381ea7
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
a381ea7
endif
a381ea7
a381ea7
include $(MAKEFILE_COMMON)