fabe2b9
# Makefile for source rpm: wmctrl
d82406f
# $Id: Makefile,v 1.1 2006/10/07 05:15:43 errr Exp $
fabe2b9
NAME := wmctrl
fabe2b9
SPECFILE = $(firstword $(wildcard *.spec))
fabe2b9
fabe2b9
define find-makefile-common
d82406f
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
fabe2b9
endef
fabe2b9
fabe2b9
MAKEFILE_COMMON := $(shell $(find-makefile-common))
fabe2b9
fabe2b9
ifeq ($(MAKEFILE_COMMON),)
fabe2b9
# attept a checkout
fabe2b9
define checkout-makefile-common
fabe2b9
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
fabe2b9
endef
fabe2b9
fabe2b9
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
fabe2b9
endif
fabe2b9
fabe2b9
include $(MAKEFILE_COMMON)