1# 2# CDDL HEADER START 3# 4# The contents of this file are subject to the terms of the 5# Common Development and Distribution License (the "License"). 6# You may not use this file except in compliance with the License. 7# 8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9# or http://www.opensolaris.org/os/licensing. 10# See the License for the specific language governing permissions 11# and limitations under the License. 12# 13# When distributing Covered Code, include this CDDL HEADER in each 14# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15# If applicable, add the following below this CDDL HEADER, with the 16# fields enclosed by brackets "[]" replaced with your own identifying 17# information: Portions Copyright [yyyy] [name of copyright owner] 18# 19# CDDL HEADER END 20# 21# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 22# Use is subject to license terms. 23# 24# Makefile for cmd/man/src 25# 26 27include ../../Makefile.cmd 28 29BINPROG = man 30LIBPROG = getNAME 31LIBSHELL = makewhatis 32LNKPROG = catman apropos whatis 33SGMLUTILDIR = util 34 35PROG = $(BINPROG) $(LIBPROG) 36 37SRCS = man.c getNAME.c 38 39SHSRCS = makewhatis.sh 40 41OBJS = $(SRCS:%.c=%.o) 42 43 44CLOBBERFILES += $(LNKPROG) $(LIBSHELL) 45 46ROOTPROG = $(BINPROG:%=$(ROOTBIN)/%) 47ROOTLIBPROG = $(LIBPROG:%=$(ROOTLIB)/%) 48ROOTLIBSHELL = $(LIBSHELL:%=$(ROOTLIB)/%) 49ROOTLNKPROG = $(LNKPROG:%=$(ROOTBIN)/%) 50 51# for messaging catalog files 52POFILE= src.po 53POFILES= $(SRCS:%.c=%.po) 54 55.KEEP_STATE : 56 57all : $(PROG) $(LIBSHELL) $(LNKPROG) buildsubs 58 59makewhatis : $$@.sh 60 cat $@.sh > $@ 61 62buildsubs : 63 cd $(SGMLUTILDIR); pwd; $(MAKE) all 64 65install : all $(ROOTPROG) $(ROOTLIBPROG) \ 66 $(ROOTLIBSHELL) $(ROOTLNKPROG) installsubs 67 68installsubs : 69 cd $(SGMLUTILDIR); pwd; $(MAKE) install 70 71$(ROOTLNKPROG) : $(ROOTBIN)/man 72 -$(RM) $@; $(LN) $(ROOTBIN)/man $@ 73 74$(LNKPROG) : man 75 -$(RM) $@; $(LN) man $@ 76 77catalog: $(POFILE) 78 79$(POFILE): $(POFILES) 80 $(RM) $@ 81 cat $(POFILES) > $@ 82 83 84clean : sgml_clean 85 86sgml_clean : 87 cd $(SGMLUTILDIR); pwd; $(MAKE) clean 88 89clobber : sgml_clobber 90 91sgml_clobber : 92 cd $(SGMLUTILDIR); pwd; $(MAKE) clobber 93 94strip : 95 $(STRIP) $(PROG) 96 97lint : lint_SRCS 98 99include ../../Makefile.targ 100