cvsdist 9f5377c
# Makefile for source rpm: log4j
cvsdist 9f5377c
# $Id$
cvsdist 9f5377c
NAME := log4j
cvsdist 9f5377c
SPECFILE = $(firstword $(wildcard *.spec))
cvsdist 9f5377c
ca331f4
define find-makefile-common
1b76f7e
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
ca331f4
endef
ca331f4
ca331f4
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ca331f4
ca331f4
ifeq ($(MAKEFILE_COMMON),)
ca331f4
# attempt a checkout
ca331f4
define checkout-makefile-common
ca331f4
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
ca331f4
endef
ca331f4
ca331f4
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
ca331f4
endif
ca331f4
ca331f4
include $(MAKEFILE_COMMON)