mharris b1202ce
# Makefile for source rpm: libXres
db18a58
# $Id: Makefile,v 1.1 2005/08/26 21:36:59 mharris Exp $
mharris b1202ce
NAME := libXres
mharris b1202ce
SPECFILE = $(firstword $(wildcard *.spec))
mharris b1202ce
db18a58
define find-makefile-common
db18a58
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
db18a58
endef
db18a58
db18a58
MAKEFILE_COMMON := $(shell $(find-makefile-common))
db18a58
db18a58
ifeq ($(MAKEFILE_COMMON),)
db18a58
# attempt a checkout
db18a58
define checkout-makefile-common
db18a58
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
db18a58
endef
db18a58
db18a58
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
db18a58
endif
db18a58
db18a58
include $(MAKEFILE_COMMON)