d2586db
# Makefile for source rpm: mathgl
1d51a08
# $Id: Makefile,v 1.1 2009/09/14 05:04:20 kevin Exp $
d2586db
NAME := mathgl
d2586db
SPECFILE = $(firstword $(wildcard *.spec))
d2586db
d2586db
define find-makefile-common
1d51a08
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
d2586db
endef
d2586db
d2586db
MAKEFILE_COMMON := $(shell $(find-makefile-common))
d2586db
d2586db
ifeq ($(MAKEFILE_COMMON),)
d2586db
# attept a checkout
d2586db
define checkout-makefile-common
d2586db
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
d2586db
endef
d2586db
d2586db
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
d2586db
endif
d2586db
d2586db
include $(MAKEFILE_COMMON)