cvsdist 8ccc63d
# Makefile for source rpm: gdm
f105fe2
# $Id: Makefile,v 1.1 2004/09/09 05:00:53 cvsdist Exp $
cvsdist 8ccc63d
NAME := gdm
cvsdist 8ccc63d
SPECFILE = $(firstword $(wildcard *.spec))
cvsdist 8ccc63d
f105fe2
define find-makefile-common
f105fe2
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
f105fe2
endef
f105fe2
f105fe2
MAKEFILE_COMMON := $(shell $(find-makefile-common))
f105fe2
f105fe2
ifeq ($(MAKEFILE_COMMON),)
f105fe2
# attempt a checkout
f105fe2
define checkout-makefile-common
f105fe2
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
f105fe2
endef
f105fe2
f105fe2
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
f105fe2
endif
f105fe2
f105fe2
include $(MAKEFILE_COMMON)