cvsdist 7d36ef
# Makefile for source rpm: libxklavier
38da52
# $Id: Makefile,v 1.2 2007/10/15 19:05:32 notting Exp $
cvsdist 7d36ef
NAME := libxklavier
cvsdist 7d36ef
SPECFILE = $(firstword $(wildcard *.spec))
cvsdist 7d36ef
ce5501
define find-makefile-common
38da52
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
ce5501
endef
ce5501
ce5501
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ce5501
ce5501
ifeq ($(MAKEFILE_COMMON),)
ce5501
# attempt a checkout
ce5501
define checkout-makefile-common
ce5501
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
ce5501
endef
ce5501
ce5501
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
ce5501
endif
ce5501
ce5501
include $(MAKEFILE_COMMON)