#	BSDI Makefile,v 2.3 1995/11/29 23:05:16 torek Exp

# Install G++ headers.

INCDIR=	/usr/include/g++

# A "special" header: _G_config.h defines system types.
# Rather than extracting the system types from the system headers,
# we simply use the system headers.
LIBBSD=	${.CURDIR}/../libg++
LIBBSD_H=_G_config.h

# libio
.include "../Makefile.libio"

# libstdc++
# We have to list these headers individually as they have no suffix.
LIBCXX=	${.CURDIR}/../D/libstdc++
LIBCXX_H=cassert cctype cerrno cfloat ciso646 climits clocale cmath \
	complex csetjmp csignal cstdarg cstddef cstdio cstdlib cstring \
	ctime cwchar cwctype new stddef string exception stdexcept typeinfo \
	algorithm deque list map queue set stack vector utility functional \
	iterator memory numeric

# libg++
LIBGXX=	${.CURDIR}/../D/libg++/src

# librx
LIBRX=	${.CURDIR}/../D/librx
LIBRX_H=rx.h

# gen *P files
GEN=	${.CURDIR}/../D/libg++/src/gen

# gen

all clean cleandir depend lint obj tags:

install:
	@-[ -d ${DESTDIR}${INCDIR} ] || mkdir -p ${DESTDIR}${INCDIR}
	@-[ -d ${DESTDIR}${INCDIR}/std ] || mkdir -p ${DESTDIR}${INCDIR}/std
	@-[ -d ${DESTDIR}${INCDIR}/stl ] || mkdir -p ${DESTDIR}${INCDIR}/stl
	@echo -n installing
	@-cd ${LIBBSD}; for i in ${LIBBSD_H}; do \
	    echo -n " $$i"; \
	    cmp -s $$i ${DESTDIR}${INCDIR}/$$i 2>/dev/null || \
	    install -c -o ${BINOWN} -g ${BINGRP} -m 444 $$i \
		${DESTDIR}${INCDIR}/$$i; \
	done
	@-cd ${LIBCXX}; for i in ${LIBCXX_H} *.h std/*.* stl/*.h; do \
	    echo -n " $$i"; \
	    cmp -s $$i ${DESTDIR}${INCDIR}/$$i 2>/dev/null || \
	    install -c -o ${BINOWN} -g ${BINGRP} -m 444 $$i \
		${DESTDIR}${INCDIR}/$$i; \
	done
	@-cd ${LIBIO}; for i in ${LIBIO_H}; do \
	    echo -n " $$i"; \
	    cmp -s $$i ${DESTDIR}${INCDIR}/$$i 2>/dev/null || \
	    install -c -o ${BINOWN} -g ${BINGRP} -m 444 $$i \
		${DESTDIR}${INCDIR}/$$i; \
	done
	@-cd ${LIBGXX}; for i in *.h; do \
	    echo -n " $$i"; \
	    cmp -s $$i ${DESTDIR}${INCDIR}/$$i 2>/dev/null || \
	    install -c -o ${BINOWN} -g ${BINGRP} -m 444 $$i \
		${DESTDIR}${INCDIR}/$$i; \
	done
	@-cd ${LIBRX}; for i in ${LIBRX_H}; do \
	    echo -n " $$i"; \
	    cmp -s $$i ${DESTDIR}${INCDIR}/$$i 2>/dev/null || \
	    install -c -o ${BINOWN} -g ${BINGRP} -m 444 $$i \
		${DESTDIR}${INCDIR}/$$i; \
	done
	@echo; echo installing gen
	@-[ -d ${DESTDIR}${INCDIR}/gen ] || mkdir ${DESTDIR}${INCDIR}/gen
	@-cd ${GEN}; for j in *.*P; do \
	    cmp -s $$j ${DESTDIR}${INCDIR}/gen/$$j 2>/dev/null || \
	    install -c -o ${BINOWN} -g ${BINGRP} -m 444 $$j \
		${DESTDIR}${INCDIR}/gen/$$j; \
	done

.include <bsd.prog.mk>
