1#ident "@(#)rules.man	1.11 18/08/14 "
2###########################################################################
3# Written 1997-2018 by J. Schilling
4###########################################################################
5#
6# Manual page building rules
7#
8###########################################################################
9# Copyright (c) J. Schilling
10###########################################################################
11# The contents of this file are subject to the terms of the
12# Common Development and Distribution License, Version 1.0 only
13# (the "License").  You may not use this file except in compliance
14# with the License.
15#
16# See the file CDDL.Schily.txt in this distribution for details.
17# A copy of the CDDL is also available via the Internet at
18# http://www.opensource.org/licenses/cddl1.txt
19#
20# When distributing Covered Code, include this CDDL HEADER in each
21# file and include the License file CDDL.Schily.txt from this distribution.
22###########################################################################
23include		$(SRCROOT)/$(RULESDIR)/man-$(MANSTYLE).def
24###########################################################################
25
26INSDIR=		$(MANBASE:%=%/)$(MANDIR)/$(MANSECT)
27SUBARCHDIR=	/$(MANDIR)
28TARGET=		$(TARGETMAN).$(MANSUFFIX)
29SRCFILE=	$(MANFILE)
30
31###########################################################################
32include		$(SRCROOT)/$(RULESDIR)/rules.htm
33
34
35###########################################################################
36# The rest is copied from rules.loc
37###########################################################################
38PTARGET=	$(ARCHDIR)/$(TARGET)
39###########################################################################
40#
41# We are doing a copy to $(ARCHDIR) to be able to have platform dependent
42# shell files in future.
43#
44###########################################################################
45_INSMODEI=	$(_UNIQ)$(INSMODE)
46__INSMODEI=	$(_INSMODEI:$(_UNIQ)=$(INSMODEF))
47INSMODEI=	$(__INSMODEI:$(_UNIQ)%=%)
48
49all man:	$(ARCHDIR) $(WAIT) $(PTARGET)
50
51install installman:	$(ARCHDIR) man
52
53installman:	man install
54
55$(PTARGET):	$(SRCFILE)
56		$(LOCALIZE) $(SRCFILE) $@
57
58#
59# gmake only. Other make implementations use a no-xxx/ prefix.
60# gmake calls prerequisites to the right of | as order-only-prerequisites
61# and does not evaluate the time stamp from such prerequisites.
62#
63$(GMAKE_ONLY)$(PTARGET): | $(ARCHDIR)
64
65$(ARCHDIR):
66		$(MKDIR) -p $@
67
68###########################################################################
69include		$(SRCROOT)/$(RULESDIR)/rules.clr
70include		$(SRCROOT)/$(RULESDIR)/rules.ins
71include		$(SRCROOT)/$(RULESDIR)/rules.tag
72include		$(SRCROOT)/$(RULESDIR)/rules.hlp
73include		$(SRCROOT)/$(RULESDIR)/dummy.dep
74###########################################################################
75