801b24b
# Makefile for source rpm: coq
190eb24
# $Id: Makefile,v 1.1 2008/07/15 16:48:21 kevin Exp $
801b24b
NAME := coq
801b24b
SPECFILE = $(firstword $(wildcard *.spec))
801b24b
801b24b
define find-makefile-common
190eb24
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
801b24b
endef
801b24b
801b24b
MAKEFILE_COMMON := $(shell $(find-makefile-common))
801b24b
801b24b
ifeq ($(MAKEFILE_COMMON),)
801b24b
# attept a checkout
801b24b
define checkout-makefile-common
801b24b
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
801b24b
endef
801b24b
801b24b
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
801b24b
endif
801b24b
801b24b
include $(MAKEFILE_COMMON)