Blame Makefile

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