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