# $Id: Makefile.am.common,v 1.1 2001/06/05 20:17:46 shadow Exp $

INCLUDES+=-I$(top_builddir)/include 

SYSNAME=@SYSNAME@

CP = cp

LEXLIB = @LEXLIB@

COMPILE_ET = $(top_builddir)/comerr/compile_et

.et.h:
	$(COMPILE_ET) $<
.et.c:
	$(COMPILE_ET) $<

buildinclude = $(top_builddir)/include

all-local: install-build-headers

install-build-headers:: $(include_HEADERS) $(build_HEADERZ) $(rxbuild_HEADERZ= $(afsbuild_HEADERZ)
	@foo='$(include_HEADERS) $(build_HEADERZ)'; \
	for f in $$foo; do \
		f=`basename $$f`; \
		if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
		else file="$$f"; fi; \
		if cmp -s  $$file $(buildinclude)/$$f 2> /dev/null ; then \
		: ; else \
			echo " $(CP) $$file $(buildinclude)/$$f"; \
			$(CP) $$file $(buildinclude)/$$f; \
		fi ; \
	done
	@foo='$(afsbuild_HEADERZ)'; \
	for f in $$foo; do \
		f=`basename $$f`; \
		if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
		else file="$$f"; fi; \
		if cmp -s  $$file $(buildinclude)/afs/$$f 2> /dev/null ; then \
		: ; else \
			echo " $(CP) $$file $(buildinclude)/afs/$$f"; \
			$(CP) $$file $(buildinclude)/afs/$$f; \
		fi ; \
	done
	@foo='$(rxinclude_HEADERZ)'; \
	for f in $$foo; do \
		f=`basename $$f`; \
		if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
		else file="$$f"; fi; \
		if cmp -s  $$file $(buildinclude)/rx/$$f 2> /dev/null ; then \
		: ; else \
			echo " $(CP) $$file $(buildinclude)/rx/$$f"; \
			$(CP) $$file $(buildinclude)/rx/$$f; \
		fi ; \
	done
