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