55fc8de
# Makefile for source rpm: gcl
26847ed
# $Id: Makefile,v 1.1 2005/04/07 16:35:09 gemi Exp $
55fc8de
NAME := gcl
55fc8de
SPECFILE = $(firstword $(wildcard *.spec))
55fc8de
55fc8de
define find-makefile-common
26847ed
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
55fc8de
endef
55fc8de
55fc8de
MAKEFILE_COMMON := $(shell $(find-makefile-common))
55fc8de
55fc8de
ifeq ($(MAKEFILE_COMMON),)
55fc8de
# attept a checkout
55fc8de
define checkout-makefile-common
55fc8de
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
55fc8de
endef
55fc8de
55fc8de
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
55fc8de
endif
55fc8de
55fc8de
include $(MAKEFILE_COMMON)