50a6fff
# Makefile for source rpm: llvm
5741fe2
# $Id: Makefile,v 1.1 2008/01/21 17:30:08 kevin Exp $
50a6fff
NAME := llvm
50a6fff
SPECFILE = $(firstword $(wildcard *.spec))
50a6fff
50a6fff
define find-makefile-common
5741fe2
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
50a6fff
endef
50a6fff
50a6fff
MAKEFILE_COMMON := $(shell $(find-makefile-common))
50a6fff
50a6fff
ifeq ($(MAKEFILE_COMMON),)
50a6fff
# attept a checkout
50a6fff
define checkout-makefile-common
50a6fff
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
50a6fff
endef
50a6fff
50a6fff
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
50a6fff
endif
50a6fff
50a6fff
include $(MAKEFILE_COMMON)