xref: /illumos-gate/usr/src/cmd/refer/Makefile (revision 11a8fa6cb17403e630122ac19b39a323c6e64142)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
57c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only
67c478bd9Sstevel@tonic-gate# (the "License").  You may not use this file except in compliance
77c478bd9Sstevel@tonic-gate# with the License.
87c478bd9Sstevel@tonic-gate#
97c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
107c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
117c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
127c478bd9Sstevel@tonic-gate# and limitations under the License.
137c478bd9Sstevel@tonic-gate#
147c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
157c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
167c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
177c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
187c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
197c478bd9Sstevel@tonic-gate#
207c478bd9Sstevel@tonic-gate# CDDL HEADER END
217c478bd9Sstevel@tonic-gate#
227c478bd9Sstevel@tonic-gate#
23*11a8fa6cSceastha# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
247c478bd9Sstevel@tonic-gate# Use is subject to license terms.
257c478bd9Sstevel@tonic-gate#
267c478bd9Sstevel@tonic-gate# ident	"%Z%%M%	%I%	%E% SMI"
277c478bd9Sstevel@tonic-gate#
287c478bd9Sstevel@tonic-gate# Makefile for cmd/refer
297c478bd9Sstevel@tonic-gate#
307c478bd9Sstevel@tonic-gate
317c478bd9Sstevel@tonic-gateinclude		../Makefile.cmd
327c478bd9Sstevel@tonic-gate
337c478bd9Sstevel@tonic-gatePROG1 =		refer addbib lookbib sortbib
347c478bd9Sstevel@tonic-gatePROG2 =		roffbib indxbib
357c478bd9Sstevel@tonic-gatePROG3 =		mkey inv hunt
367c478bd9Sstevel@tonic-gatePROG =		$(PROG1) $(PROG2)
377c478bd9Sstevel@tonic-gate
387c478bd9Sstevel@tonic-gateOBJS =		addbib.o deliv2.o glue1.o glue2.o glue3.o glue4.o	\
397c478bd9Sstevel@tonic-gate		glue5.o hunt1.o hunt2.o hunt3.o hunt5.o hunt6.o		\
40*11a8fa6cSceastha		hunt7.o hunt8.o inv1.o inv2.o inv3.o		\
417c478bd9Sstevel@tonic-gate		inv5.o inv6.o lookbib.o mkey1.o mkey2.o mkey3.o		\
427c478bd9Sstevel@tonic-gate		refer..o refer0.o refer1.o refer2.o refer3.o refer4.o	\
437c478bd9Sstevel@tonic-gate		refer5.o refer6.o refer7.o refer8.o shell.o sortbib.o	\
447c478bd9Sstevel@tonic-gate		tick.o types.o
457c478bd9Sstevel@tonic-gate
467c478bd9Sstevel@tonic-gate#
477c478bd9Sstevel@tonic-gate# for messaging catalog
487c478bd9Sstevel@tonic-gate#
497c478bd9Sstevel@tonic-gatePOFILES= $(OBJS:%.o=%.po)
507c478bd9Sstevel@tonic-gatePOFILE= refer.po
517c478bd9Sstevel@tonic-gate
527c478bd9Sstevel@tonic-gateaddbib.po :=	XGETFLAGS += -a -x addbib.xcl
537c478bd9Sstevel@tonic-gate
547c478bd9Sstevel@tonic-gate
557c478bd9Sstevel@tonic-gateOTXTS =		tmac.bib
567c478bd9Sstevel@tonic-gate
577c478bd9Sstevel@tonic-gateREFDIR =	$(ROOTLIB)/refer
587c478bd9Sstevel@tonic-gateTMACDIR =	$(ROOTSHLIB)/tmac
597c478bd9Sstevel@tonic-gate#Don't re-install dir already installed by Targetdirs
607c478bd9Sstevel@tonic-gate#ROOTDIRS =	$(REFDIR) $(TMACDIR)
617c478bd9Sstevel@tonic-gateROOTDIRS =     $(REFDIR)
627c478bd9Sstevel@tonic-gate
637c478bd9Sstevel@tonic-gateSUBDIRS =	papers
647c478bd9Sstevel@tonic-gate
657c478bd9Sstevel@tonic-gateREFDIRPROG =	$(PROG3:%=$(REFDIR)/%)
667c478bd9Sstevel@tonic-gateIOTXTS =	$(OTXTS:%=$(TMACDIR)/%)
677c478bd9Sstevel@tonic-gate
687c478bd9Sstevel@tonic-gate$(IOTXTS):=	FILEMODE = 0644
697c478bd9Sstevel@tonic-gate
707c478bd9Sstevel@tonic-gateall:=		TARGET=	all
717c478bd9Sstevel@tonic-gateinstall:=	TARGET=	install
727c478bd9Sstevel@tonic-gateclean:=		TARGET=	clean
737c478bd9Sstevel@tonic-gateclobber:=	TARGET=	clobber
747c478bd9Sstevel@tonic-gate
757c478bd9Sstevel@tonic-gatemkey:=		POBJS=  mkey1.o mkey2.o mkey3.o deliv2.o
767c478bd9Sstevel@tonic-gateinv:=		POBJS= inv1.o inv2.o inv3.o inv5.o inv6.o deliv2.o
777c478bd9Sstevel@tonic-gatehunt:=		POBJS= hunt1.o hunt2.o hunt3.o hunt5.o hunt6.o		\
78*11a8fa6cSceastha			hunt7.o glue5.o refer3.o shell.o	\
797c478bd9Sstevel@tonic-gate			deliv2.o hunt8.o glue4.o tick.o
807c478bd9Sstevel@tonic-gaterefer:=		POBJS= glue1.o refer1.o refer2.o refer4.o refer5.o	\
817c478bd9Sstevel@tonic-gate			refer6.o mkey3.o refer7.o refer8.o hunt2.o	\
827c478bd9Sstevel@tonic-gate			hunt3.o deliv2.o hunt5.o hunt6.o hunt8.o	\
83*11a8fa6cSceastha			glue3.o hunt7.o glue2.o glue4.o		\
847c478bd9Sstevel@tonic-gate			glue5.o refer0.o shell.o
857c478bd9Sstevel@tonic-gateaddbib:=	POBJS= addbib.o
867c478bd9Sstevel@tonic-gatelookbib:=	POBJS= lookbib.o
877c478bd9Sstevel@tonic-gatesortbib:=	POBJS= sortbib.o
887c478bd9Sstevel@tonic-gate
897c478bd9Sstevel@tonic-gate.KEEP_STATE :
907c478bd9Sstevel@tonic-gate
917c478bd9Sstevel@tonic-gate.PARALLEL: $(OBJS)
927c478bd9Sstevel@tonic-gate
937c478bd9Sstevel@tonic-gateall:		$(PROG) $(PROG3) $(OTXTS) $(SUBDIRS)
947c478bd9Sstevel@tonic-gate
957c478bd9Sstevel@tonic-gate$(PROG1) $(PROG3): $$(POBJS)
967c478bd9Sstevel@tonic-gate		$(LINK.c) -o $@ $(POBJS) $(LDFLAGS) $(LDLIBS)
977c478bd9Sstevel@tonic-gate		$(POST_PROCESS)
987c478bd9Sstevel@tonic-gate
997c478bd9Sstevel@tonic-gate$(POFILE):      $(POFILES)
1007c478bd9Sstevel@tonic-gate	$(RM)	$@
1017c478bd9Sstevel@tonic-gate	cat     $(POFILES)      > $@
1027c478bd9Sstevel@tonic-gate
1037c478bd9Sstevel@tonic-gatetypes.po:
1047c478bd9Sstevel@tonic-gate	touch types.po
1057c478bd9Sstevel@tonic-gate
1067c478bd9Sstevel@tonic-gate
1077c478bd9Sstevel@tonic-gateinstall:	all .WAIT $(ROOTDIRS) \
1087c478bd9Sstevel@tonic-gate		$(ROOTPROG) $(REFDIRPROG) $(IOTXTS) $(SUBDIRS)
1097c478bd9Sstevel@tonic-gate
1107c478bd9Sstevel@tonic-gate$(REFDIR)/% :	%
1117c478bd9Sstevel@tonic-gate		$(INS.file)
1127c478bd9Sstevel@tonic-gate
1137c478bd9Sstevel@tonic-gate$(TMACDIR)/% :	%
1147c478bd9Sstevel@tonic-gate		$(INS.file)
1157c478bd9Sstevel@tonic-gate
1167c478bd9Sstevel@tonic-gateclean :		$(SUBDIRS)
1177c478bd9Sstevel@tonic-gate		$(RM) $(OBJS)
1187c478bd9Sstevel@tonic-gate
1197c478bd9Sstevel@tonic-gateclobber :	$(SUBDIRS) local_clobber
1207c478bd9Sstevel@tonic-gate
1217c478bd9Sstevel@tonic-gatelint:
1227c478bd9Sstevel@tonic-gate	$(LINT.c) mkey1.c mkey2.c mkey3.c deliv2.c $(LDLIBS)
1237c478bd9Sstevel@tonic-gate	$(LINT.c) inv1.c inv2.c inv3.c inv5.c inv6.c deliv2.c $(LDLIBS)
1247c478bd9Sstevel@tonic-gate	$(LINT.c) hunt1.c hunt2.c hunt3.c hunt5.c hunt6.c	\
125*11a8fa6cSceastha		hunt7.c glue5.c refer3.c shell.c	\
1267c478bd9Sstevel@tonic-gate		deliv2.c hunt8.c glue4.c tick.c $(LDLIBS)
1277c478bd9Sstevel@tonic-gate	$(LINT.c) glue1.c refer1.c refer2.c refer4.c refer5.c	\
1287c478bd9Sstevel@tonic-gate		refer6.c mkey3.c refer7.c refer8.c hunt2.c	\
1297c478bd9Sstevel@tonic-gate		hunt3.c deliv2.c hunt5.c hunt6.c hunt8.c	\
130*11a8fa6cSceastha		glue3.c hunt7.c glue2.c glue4.c		\
1317c478bd9Sstevel@tonic-gate		glue5.c refer0.c shell.c $(LDLIBS)
1327c478bd9Sstevel@tonic-gate	$(LINT.c) addbib.c $(LDLIBS)
1337c478bd9Sstevel@tonic-gate	$(LINT.c) lookbib.c $(LDLIBS)
1347c478bd9Sstevel@tonic-gate	$(LINT.c) sortbib.c $(LDLIBS)
1357c478bd9Sstevel@tonic-gate
1367c478bd9Sstevel@tonic-gatelocal_clobber:
1377c478bd9Sstevel@tonic-gate		$(RM) $(PROG) $(OBJS) $(CLOBBERFILES)
1387c478bd9Sstevel@tonic-gate
1397c478bd9Sstevel@tonic-gatestrip:
1407c478bd9Sstevel@tonic-gate
1417c478bd9Sstevel@tonic-gate$(SUBDIRS):	FRC
1427c478bd9Sstevel@tonic-gate		@cd $@; pwd; $(MAKE) $(TARGET)
1437c478bd9Sstevel@tonic-gate
1447c478bd9Sstevel@tonic-gate$(ROOTDIRS) :
1457c478bd9Sstevel@tonic-gate		$(INS.dir)
1467c478bd9Sstevel@tonic-gate
1477c478bd9Sstevel@tonic-gateFRC:
1487c478bd9Sstevel@tonic-gate
1497c478bd9Sstevel@tonic-gateinclude ../Makefile.targ
150