f54225f
# Makefile for source rpm: geeqie
f54225f
# $Id$
f54225f
NAME := geeqie
f54225f
SPECFILE = $(firstword $(wildcard *.spec))
f54225f
f54225f
define find-makefile-common
f54225f
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
f54225f
endef
f54225f
f54225f
MAKEFILE_COMMON := $(shell $(find-makefile-common))
f54225f
f54225f
ifeq ($(MAKEFILE_COMMON),)
f54225f
# attept a checkout
f54225f
define checkout-makefile-common
f54225f
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
f54225f
endef
f54225f
f54225f
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
f54225f
endif
f54225f
f54225f
include $(MAKEFILE_COMMON)