186bbea
# Makefile for source rpm: ibus-table
186bbea
# $Id$
186bbea
NAME := ibus-table
186bbea
SPECFILE = $(firstword $(wildcard *.spec))
186bbea
186bbea
define find-makefile-common
186bbea
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
186bbea
endef
186bbea
186bbea
MAKEFILE_COMMON := $(shell $(find-makefile-common))
186bbea
186bbea
ifeq ($(MAKEFILE_COMMON),)
186bbea
# attept a checkout
186bbea
define checkout-makefile-common
186bbea
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
186bbea
endef
186bbea
186bbea
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
186bbea
endif
186bbea
186bbea
include $(MAKEFILE_COMMON)