a519ea3
# Makefile for source rpm: ale
767b9db
# $Id: Makefile,v 1.1 2008/06/02 03:31:07 kevin Exp $
a519ea3
NAME := ale
a519ea3
SPECFILE = $(firstword $(wildcard *.spec))
a519ea3
a519ea3
define find-makefile-common
767b9db
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
a519ea3
endef
a519ea3
a519ea3
MAKEFILE_COMMON := $(shell $(find-makefile-common))
a519ea3
a519ea3
ifeq ($(MAKEFILE_COMMON),)
a519ea3
# attept a checkout
a519ea3
define checkout-makefile-common
a519ea3
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
a519ea3
endef
a519ea3
a519ea3
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
a519ea3
endif
a519ea3
a519ea3
include $(MAKEFILE_COMMON)