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 5*99ba4d70SRussell Blaine# Common Development and Distribution License (the "License"). 6*99ba4d70SRussell Blaine# You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate# 87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate# and limitations under the License. 127c478bd9Sstevel@tonic-gate# 137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate# 197c478bd9Sstevel@tonic-gate# CDDL HEADER END 207c478bd9Sstevel@tonic-gate# 217c478bd9Sstevel@tonic-gate# 22*99ba4d70SRussell Blaine# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate# Use is subject to license terms. 247c478bd9Sstevel@tonic-gate# 257c478bd9Sstevel@tonic-gate# cmd/vgrind/Makefile 267c478bd9Sstevel@tonic-gate 277c478bd9Sstevel@tonic-gate# 287c478bd9Sstevel@tonic-gate# These are the objects associated with the overall vgrind command. 297c478bd9Sstevel@tonic-gate# 307c478bd9Sstevel@tonic-gateVFONTEDPR= vfontedpr 317c478bd9Sstevel@tonic-gateRETEST= retest 327c478bd9Sstevel@tonic-gateMACROS= tmac.vgrind 337c478bd9Sstevel@tonic-gateLANGDEFS= vgrindefs 347c478bd9Sstevel@tonic-gateKSHPROG= vgrind 357c478bd9Sstevel@tonic-gate 367c478bd9Sstevel@tonic-gate# 377c478bd9Sstevel@tonic-gate# These macros captures objects that ultimately will be installed in 387c478bd9Sstevel@tonic-gate# (respectively) /usr/bin, /usr/lib, and /usr/share/lib. 397c478bd9Sstevel@tonic-gate# 407c478bd9Sstevel@tonic-gate# Note also that retest is used strictly as a test program and is never 417c478bd9Sstevel@tonic-gate# installed. We omit it here, so that the NSE doesn't spend cycles 427c478bd9Sstevel@tonic-gate# on it when acquiring and reconciling. 437c478bd9Sstevel@tonic-gate# 447c478bd9Sstevel@tonic-gatePROG= $(KSHPROG) 457c478bd9Sstevel@tonic-gateLIBPROG= $(VFONTEDPR) $(LANGDEFS) 467c478bd9Sstevel@tonic-gateTMACPROG= $(MACROS) 477c478bd9Sstevel@tonic-gate 487c478bd9Sstevel@tonic-gateVFONTEDPROBJS= vfontedpr.o vgrindefs.o regexp.o 497c478bd9Sstevel@tonic-gateRETESTOBJS= retest.o regexp.o 507c478bd9Sstevel@tonic-gate 517c478bd9Sstevel@tonic-gateRETESTSRC= $(RETESTOBJS:%.o=%.c) 527c478bd9Sstevel@tonic-gate 537c478bd9Sstevel@tonic-gateOBJS= $(VFONTEDPROBJS) $(RETESTOBJS) 547c478bd9Sstevel@tonic-gateSRCS= $(OBJS:%.o=%.c) 557c478bd9Sstevel@tonic-gate 567c478bd9Sstevel@tonic-gate# 577c478bd9Sstevel@tonic-gate# We can get away simply with omitting TMACPROGS to protect 587c478bd9Sstevel@tonic-gate# tmac.vgrind, since it's the only entry in that macro. 597c478bd9Sstevel@tonic-gate# 607c478bd9Sstevel@tonic-gateCLOBBERFILES= $(LIBPROG) $(RETEST) 617c478bd9Sstevel@tonic-gate 627c478bd9Sstevel@tonic-gateinclude ../Makefile.cmd 637c478bd9Sstevel@tonic-gate 647c478bd9Sstevel@tonic-gate# 657c478bd9Sstevel@tonic-gate# Message catalog 667c478bd9Sstevel@tonic-gate# 677c478bd9Sstevel@tonic-gatePOFILES= $(OBJS:%.o=%.po) 687c478bd9Sstevel@tonic-gatePOFILE= vgrind.po 697c478bd9Sstevel@tonic-gatePOFILE_KSH= vgrind_ksh.po 707c478bd9Sstevel@tonic-gate 717c478bd9Sstevel@tonic-gate# 727c478bd9Sstevel@tonic-gate# Abbreviation for future use. 737c478bd9Sstevel@tonic-gate# 747c478bd9Sstevel@tonic-gateROOTTMAC= $(ROOT)/usr/share/lib/tmac 757c478bd9Sstevel@tonic-gate 767c478bd9Sstevel@tonic-gate# 777c478bd9Sstevel@tonic-gate# Override macro definitions from Makefile.cmd. Necessary because 787c478bd9Sstevel@tonic-gate# we're building targets for multiple destinations. 797c478bd9Sstevel@tonic-gate# 807c478bd9Sstevel@tonic-gateROOTLIBPROG= $(LIBPROG:%=$(ROOT)/usr/lib/%) 817c478bd9Sstevel@tonic-gateROOTTMACPROG= $(TMACPROG:%=$(ROOTTMAC)/%) 827c478bd9Sstevel@tonic-gate 837c478bd9Sstevel@tonic-gate# 847c478bd9Sstevel@tonic-gate# Conditional assignments pertinent to installation. 857c478bd9Sstevel@tonic-gate# 867c478bd9Sstevel@tonic-gate$(ROOTLIB)/$(LANGDEFS) := FILEMODE= $(LIBFILEMODE) 877c478bd9Sstevel@tonic-gate$(ROOTTMACPROG) := FILEMODE= 0644 887c478bd9Sstevel@tonic-gate 897c478bd9Sstevel@tonic-gate# 907c478bd9Sstevel@tonic-gate# The standard set of rules doesn't know about installing into 917c478bd9Sstevel@tonic-gate# subdirectories of /usr/share/lib, so we have to roll our own. 927c478bd9Sstevel@tonic-gate# 937c478bd9Sstevel@tonic-gate$(ROOTTMAC)/%: % 947c478bd9Sstevel@tonic-gate $(INS.file) 957c478bd9Sstevel@tonic-gate 967c478bd9Sstevel@tonic-gate.KEEP_STATE: 977c478bd9Sstevel@tonic-gate 987c478bd9Sstevel@tonic-gate# 997c478bd9Sstevel@tonic-gate# retest appears here only in source form; see comment above for PROG. 1007c478bd9Sstevel@tonic-gate# 1017c478bd9Sstevel@tonic-gateall: $(PROG) $(LIBPROG) $(TMACPROG) $(RETESTSRC) 1027c478bd9Sstevel@tonic-gate 1037c478bd9Sstevel@tonic-gate# 1047c478bd9Sstevel@tonic-gate# message catalog 1057c478bd9Sstevel@tonic-gate# 1067c478bd9Sstevel@tonic-gate$(POFILE): $(POFILES) $(POFILE_KSH) 1077c478bd9Sstevel@tonic-gate rm -f $@ 1087c478bd9Sstevel@tonic-gate cat $(POFILES) $(POFILE_KSH) > $@ 1097c478bd9Sstevel@tonic-gate 1107c478bd9Sstevel@tonic-gate$(VFONTEDPR): $(VFONTEDPROBJS) 1117c478bd9Sstevel@tonic-gate $(CC) -o $@ $(VFONTEDPROBJS) $(LDFLAGS) $(LDLIBS) 1127c478bd9Sstevel@tonic-gate $(POST_PROCESS) 1137c478bd9Sstevel@tonic-gate 1147c478bd9Sstevel@tonic-gate$(LANGDEFS): $(LANGDEFS).src 1157c478bd9Sstevel@tonic-gate $(CP) $? $@ 1167c478bd9Sstevel@tonic-gate 1177c478bd9Sstevel@tonic-gate$(RETEST): $(RETESTOBJS) 1187c478bd9Sstevel@tonic-gate $(CC) -o $@ $(RETESTOBJS) $(LDFLAGS) $(LDLIBS) 1197c478bd9Sstevel@tonic-gate $(POST_PROCESS) 1207c478bd9Sstevel@tonic-gate 1217c478bd9Sstevel@tonic-gate# 1227c478bd9Sstevel@tonic-gate# We add all as a dependent to make sure that the install pattern 1237c478bd9Sstevel@tonic-gate# matching rules see everything they should. (This is a safety net.) 1247c478bd9Sstevel@tonic-gate# 1257c478bd9Sstevel@tonic-gate# XXX: ROOTTMAC shouldn't appear as a dependent; it's here as a 1267c478bd9Sstevel@tonic-gate# bandaid(TM) until /usr/lib/tmac becomes a symlink to 1277c478bd9Sstevel@tonic-gate# /usr/share/lib/tmac. 1287c478bd9Sstevel@tonic-gate# 1297c478bd9Sstevel@tonic-gateinstall: all $(ROOTTMAC) $(ROOTPROG) $(ROOTLIBPROG) $(ROOTTMACPROG) 1307c478bd9Sstevel@tonic-gate 1317c478bd9Sstevel@tonic-gate# XXX: see above. 1327c478bd9Sstevel@tonic-gate$(ROOTTMAC): 1337c478bd9Sstevel@tonic-gate $(INS.dir) 1347c478bd9Sstevel@tonic-gate 1357c478bd9Sstevel@tonic-gateclean: 1367c478bd9Sstevel@tonic-gate $(RM) $(OBJS) 1377c478bd9Sstevel@tonic-gate 1387c478bd9Sstevel@tonic-gate# 1397c478bd9Sstevel@tonic-gate# Don't worry about linting retest. 1407c478bd9Sstevel@tonic-gate# 1417c478bd9Sstevel@tonic-gatelint:= SRCS = $(VFONTEDPROBJS:%.o=%.c) 1427c478bd9Sstevel@tonic-gatelint: lint_SRCS 1437c478bd9Sstevel@tonic-gate 1447c478bd9Sstevel@tonic-gateinclude ../Makefile.targ 145