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