psss / rpms / libsemanage

Forked from rpms/libsemanage 5 years ago
Clone
d5b9e1a
# Makefile for source rpm: libsemanage
d5b9e1a
# $Id$
d5b9e1a
NAME := libsemanage
d5b9e1a
SPECFILE = $(firstword $(wildcard *.spec))
d5b9e1a
e2ce6e0
define find-makefile-common
4e9aa7a
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
e2ce6e0
endef
e2ce6e0
e2ce6e0
MAKEFILE_COMMON := $(shell $(find-makefile-common))
e2ce6e0
e2ce6e0
ifeq ($(MAKEFILE_COMMON),)
e2ce6e0
# attempt a checkout
e2ce6e0
define checkout-makefile-common
e2ce6e0
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
e2ce6e0
endef
e2ce6e0
e2ce6e0
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
e2ce6e0
endif
e2ce6e0
e2ce6e0
include $(MAKEFILE_COMMON)