#!/bin/make -f
# @(#)guide/Makefile	1.5 9/6/92 04:39:28
# Makefile for the smail design documentation
#
#    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
#    Copyright (C) 1992  Ronald S. Karr
# 
# See the file COPYING, distributed with smail, for restriction
# and warranty information.

SHELL=/bin/sh
MAKE=make
GET=sccs get
AR=ar
LINT=lint
CLEAN=sccs clean
MK=${MAKE} -${MAKEFLAGS} SHELL=${SHELL}
SRC_PREFIX=

ROOT=..
GUIDES=admin
MISC=Makefile
SRC=${MISC}

all:

sources: ${SRC}
	@for i in ${GUIDES}; do \
		echo "Get sources under ${SRC_PREFIX}$$i ..."; \
		(cd $$i; ${MK} SRC_PREFIX=${SRC_PREFIX}$$i/ sources); \
	 done

${SRC}:
	${GET} $@

names:
	@for i in ${SRC}; do echo ${SRC_PREFIX}$$i; done
	@for i in ${GUIDES}; do \
		(cd $$i; ${MK} SRC_PREFIX=${SRC_PREFIX}$$i/ names); \
	 done

install:
	@for i in ${GUIDES}; do \
		echo "Install targets under ${SRC_PREFIX}$$i ..."; \
		(cd $$i; ${MK} SRC_PREFIX=${SRC_PREFIX}$$i/ install); \
	 done

depend:
	@for i in ${GUIDES}; do \
		echo "Make dependencies under ${SRC_PREFIX}$$i ..."; \
		(cd $$i; make SRC_PREFIX=${SRC_PREFIX}$$i/ depend); \
	 done

clean:
	@for i in ${GUIDES}; do \
		echo "Clean under ${SRC_PREFIX}$$i ..."; \
		(cd $$i; make SRC_PREFIX=${SRC_PREFIX}$$i/ clean); \
	 done

clobber:
	@for i in ${GUIDES}; do \
		echo "Clobber under ${SRC_PREFIX}$$i ..."; \
		(cd $$i; make SRC_PREFIX=${SRC_PREFIX}$$i/ clobber); \
	 done

nuke:
	-${CLEAN}
	-${GET} Makefile
	@for i in ${GUIDES}; do \
		echo "Nuke under ${SRC_PREFIX}$$i ..."; \
		(cd $$i; make SRC_PREFIX=${SRC_PREFIX}$$i/ nuke); \
	done
