cvsextras b6536e
# Makefile for source rpm: aide
Bill Nottingham aa17b0
# $Id: Makefile,v 1.2 2004/11/24 03:09:37 gafton Exp $
cvsextras b6536e
NAME := aide
cvsextras b6536e
SPECFILE = $(firstword $(wildcard *.spec))
cvsextras b6536e
cvsextras b6536e
define find-makefile-common
Bill Nottingham aa17b0
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
cvsextras b6536e
endef
cvsextras b6536e
cvsextras b6536e
MAKEFILE_COMMON	:= $(shell $(find-makefile-common))
cvsextras b6536e
cvsextras b6536e
ifeq ($(MAKEFILE_COMMON),)
cvsextras b6536e
# attept a checkout
cvsextras b6536e
define checkout-makefile-common
gafton c2918a
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
cvsextras b6536e
endef
cvsextras b6536e
cvsextras b6536e
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
cvsextras b6536e
endif
cvsextras b6536e
cvsextras b6536e
include $(MAKEFILE_COMMON)