cvsdist 641638c
# Makefile for source rpm: flex
fa263c5
# $Id: Makefile,v 1.1 2004/09/09 04:46:04 cvsdist Exp $
cvsdist 641638c
NAME := flex
cvsdist 641638c
SPECFILE = $(firstword $(wildcard *.spec))
cvsdist 641638c
fa263c5
define find-makefile-common
fa263c5
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
fa263c5
endef
fa263c5
fa263c5
MAKEFILE_COMMON := $(shell $(find-makefile-common))
fa263c5
fa263c5
ifeq ($(MAKEFILE_COMMON),)
fa263c5
# attempt a checkout
fa263c5
define checkout-makefile-common
fa263c5
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
fa263c5
endef
fa263c5
fa263c5
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
fa263c5
endif
fa263c5
fa263c5
include $(MAKEFILE_COMMON)