peterdelevoryas / rpms / qemu

Forked from rpms/qemu 2 years ago
Clone

Blame Makefile

David Woodhouse 4298bc
# Makefile for source rpm: qemu
David Woodhouse 4298bc
# $Id$
David Woodhouse 4298bc
NAME := qemu
David Woodhouse 4298bc
SPECFILE = $(firstword $(wildcard *.spec))
David Woodhouse 4298bc
David Woodhouse 4298bc
define find-makefile-common
Bill Nottingham 076be9
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
David Woodhouse 4298bc
endef
David Woodhouse 4298bc
David Woodhouse 4298bc
MAKEFILE_COMMON := $(shell $(find-makefile-common))
David Woodhouse 4298bc
David Woodhouse 4298bc
ifeq ($(MAKEFILE_COMMON),)
David Woodhouse 4298bc
# attept a checkout
David Woodhouse 4298bc
define checkout-makefile-common
David Woodhouse 4298bc
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
David Woodhouse 4298bc
endef
David Woodhouse 4298bc
David Woodhouse 4298bc
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
David Woodhouse 4298bc
endif
David Woodhouse 4298bc
David Woodhouse 4298bc
include $(MAKEFILE_COMMON)