31cb7a4
# Makefile for source rpm: totem
31cb7a4
# $Id$
31cb7a4
NAME := totem
31cb7a4
SPECFILE = $(firstword $(wildcard *.spec))
31cb7a4
ba2600f
define find-makefile-common
ba2600f
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
ba2600f
endef
ba2600f
ba2600f
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ba2600f
ba2600f
ifeq ($(MAKEFILE_COMMON),)
ba2600f
# attempt a checkout
ba2600f
define checkout-makefile-common
ba2600f
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
ba2600f
endef
ba2600f
ba2600f
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
ba2600f
endif
ba2600f
ba2600f
include $(MAKEFILE_COMMON)