bdc5574
# Makefile for source rpm: 389-ds
425d14e
# $Id: Makefile,v 1.1 2009/07/17 20:54:32 ausil Exp $
bdc5574
NAME := 389-ds
bdc5574
SPECFILE = $(firstword $(wildcard *.spec))
bdc5574
bdc5574
define find-makefile-common
425d14e
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
bdc5574
endef
bdc5574
bdc5574
MAKEFILE_COMMON := $(shell $(find-makefile-common))
bdc5574
bdc5574
ifeq ($(MAKEFILE_COMMON),)
bdc5574
# attept a checkout
bdc5574
define checkout-makefile-common
bdc5574
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
bdc5574
endef
bdc5574
bdc5574
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
bdc5574
endif
bdc5574
bdc5574
include $(MAKEFILE_COMMON)