3bea9fa
# Makefile for source rpm: dcraw
369012e
# $Id: Makefile,v 1.1 2004/12/01 13:34:48 nphilipp Exp $
3bea9fa
NAME := dcraw
3bea9fa
SPECFILE = $(firstword $(wildcard *.spec))
3bea9fa
369012e
define find-makefile-common
369012e
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
369012e
endef
369012e
369012e
MAKEFILE_COMMON := $(shell $(find-makefile-common))
369012e
369012e
ifeq ($(MAKEFILE_COMMON),)
369012e
# attempt a checkout
369012e
define checkout-makefile-common
369012e
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
369012e
endef
369012e
369012e
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
369012e
endif
369012e
369012e
include $(MAKEFILE_COMMON)