d3fc948
# Makefile for source rpm: virtuoso-opensource
7a82c5a
# $Id: Makefile,v 1.1 2009/07/26 20:07:12 kevin Exp $
d3fc948
NAME := virtuoso-opensource
d3fc948
SPECFILE = $(firstword $(wildcard *.spec))
d3fc948
d3fc948
define find-makefile-common
7a82c5a
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
d3fc948
endef
d3fc948
d3fc948
MAKEFILE_COMMON := $(shell $(find-makefile-common))
d3fc948
d3fc948
ifeq ($(MAKEFILE_COMMON),)
d3fc948
# attept a checkout
d3fc948
define checkout-makefile-common
d3fc948
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
d3fc948
endef
d3fc948
d3fc948
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
d3fc948
endif
d3fc948
d3fc948
include $(MAKEFILE_COMMON)