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