# 
# Mach Operating System
# Copyright (c) 1992 Carnegie Mellon University
# All Rights Reserved.
# 
# Permission to use, copy, modify and distribute this software and its
# documentation is hereby granted, provided that both the copyright
# notice and this permission notice appear in all copies of the
# software, derivative works or modified versions, and any portions
# thereof, and that both notices appear in supporting documentation.
# 
# CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
# CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
# ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
# 
# Carnegie Mellon requests users of this software to return to
# 
#  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
#  School of Computer Science
#  Carnegie Mellon University
#  Pittsburgh PA 15213-3890
# 
# any improvements or extensions that they make and grant Carnegie Mellon
# the rights to redistribute these changes.
# 
#
# HISTORY
# $Log:	Makefile-host-man,v $
# Revision 2.2  92/04/08  23:26:55  rpd
# 	Created.
# 	[92/04/01            rpd]
# 

# Makefile-host-man is used as Makefile-man,
# except that it is intended for host-machine man pages.

MAN1SRC = ${MAN1PAGES/.*/&.man}
MAN2SRC = ${MAN2PAGES/.*/&.man}
MAN3SRC = ${MAN3PAGES/.*/&.man}
MANSRC = ${MAN1SRC} ${MAN2SRC} ${MAN3SRC}

HOST_IMAN1TARGET = ${MAN1PAGES;.*;${HOST_INSTALLDIR}/man/man1/&.1}
HOST_IMAN2TARGET = ${MAN2PAGES;.*;${HOST_INSTALLDIR}/man/man2/&.2}
HOST_IMAN3TARGET = ${MAN3PAGES;.*;${HOST_INSTALLDIR}/man/man3/&.3}
HOST_IMANTARGET = ${HOST_IMAN1TARGET} ${HOST_IMAN2TARGET} ${HOST_IMAN3TARGET}

HOST_TMAN1TARGET = ${MAN1PAGES;.*;${HOST_TRELEASEDIR}/man/man1/&.1}
HOST_TMAN2TARGET = ${MAN2PAGES;.*;${HOST_TRELEASEDIR}/man/man2/&.2}
HOST_TMAN3TARGET = ${MAN3PAGES;.*;${HOST_TRELEASEDIR}/man/man3/&.3}
HOST_TMANTARGET = ${HOST_TMAN1TARGET} ${HOST_TMAN2TARGET} ${HOST_TMAN3TARGET}

# Top-level targets:
# If the Makefile wants to do more stuff, it can also have its own
# all/install/release/clean rules.

all :: ${MANSRC}

install :: ${HOST_IMANTARGET}

release :: ${HOST_TMANTARGET}

clean ::
	${RM} ${HOST_IMANTARGET}

# installation rules

${HOST_IMAN1TARGET} : $${@;.*/man/man1/(.*)\.1;\1.man}
	${RM} $@
	${CP} $? $@
	${CHMOD_MAN} $@

${HOST_IMAN2TARGET} : $${@;.*/man/man2/(.*)\.2;\1.man}
	${RM} $@
	${CP} $? $@
	${CHMOD_MAN} $@

${HOST_IMAN3TARGET} : $${@;.*/man/man3/(.*)\.3;\1.man}
	${RM} $@
	${CP} $? $@
	${CHMOD_MAN} $@

# release rules

${HOST_TMAN1TARGET} : $${@;.*/(man/man1/.*\.1);${HOST_FRELEASEDIR}/\1}
	${RM} $@
	${CP} $? $@

${HOST_TMAN2TARGET} : $${@;.*/(man/man2/.*\.2);${HOST_FRELEASEDIR}/\1}
	${RM} $@
	${CP} $? $@

${HOST_TMAN3TARGET} : $${@;.*/(man/man3/.*\.3);${HOST_FRELEASEDIR}/\1}
	${RM} $@
	${CP} $? $@
