1*581cede6SMark J. Nelson# 2*581cede6SMark J. Nelson# CDDL HEADER START 3*581cede6SMark J. Nelson# 4*581cede6SMark J. Nelson# The contents of this file are subject to the terms of the 5*581cede6SMark J. Nelson# Common Development and Distribution License (the "License"). 6*581cede6SMark J. Nelson# You may not use this file except in compliance with the License. 7*581cede6SMark J. Nelson# 8*581cede6SMark J. Nelson# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*581cede6SMark J. Nelson# or http://www.opensolaris.org/os/licensing. 10*581cede6SMark J. Nelson# See the License for the specific language governing permissions 11*581cede6SMark J. Nelson# and limitations under the License. 12*581cede6SMark J. Nelson# 13*581cede6SMark J. Nelson# When distributing Covered Code, include this CDDL HEADER in each 14*581cede6SMark J. Nelson# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*581cede6SMark J. Nelson# If applicable, add the following below this CDDL HEADER, with the 16*581cede6SMark J. Nelson# fields enclosed by brackets "[]" replaced with your own identifying 17*581cede6SMark J. Nelson# information: Portions Copyright [yyyy] [name of copyright owner] 18*581cede6SMark J. Nelson# 19*581cede6SMark J. Nelson# CDDL HEADER END 20*581cede6SMark J. Nelson# 21*581cede6SMark J. Nelson 22*581cede6SMark J. Nelson# 23*581cede6SMark J. Nelson# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24*581cede6SMark J. Nelson# Use is subject to license terms. 25*581cede6SMark J. Nelson# 26*581cede6SMark J. Nelson 27*581cede6SMark J. Nelsoninclude ../Makefile.master 28*581cede6SMark J. Nelson 29*581cede6SMark J. NelsonROOTDIR=$(ROOT)/usr/lib/locale/C 30*581cede6SMark J. NelsonROOTMSGDIR=$(ROOTDIR)/LC_MESSAGES 31*581cede6SMark J. NelsonROOTTIMEDIR=$(ROOTDIR)/LC_TIME 32*581cede6SMark J. Nelson 33*581cede6SMark J. Nelson# 34*581cede6SMark J. Nelson# These files either need no build rules, because they're under SCM 35*581cede6SMark J. Nelson# in the current working directory, or they have explicit build rules 36*581cede6SMark J. Nelson# that aren't handled by the $(MSGDIRFILES_REMOTE) rule below. 37*581cede6SMark J. Nelson# 38*581cede6SMark J. NelsonMSGDIRFILES_LOCAL= \ 39*581cede6SMark J. Nelson SUNW_OST_LINFO \ 40*581cede6SMark J. Nelson uxlibc.src 41*581cede6SMark J. Nelson 42*581cede6SMark J. Nelson# 43*581cede6SMark J. Nelson# These files live somewhere else in the build tree (ie not in the 44*581cede6SMark J. Nelson# directory usr/src/msg). Each entry here should be accompanied by an 45*581cede6SMark J. Nelson# explicit action telling where the file lives. That action should 46*581cede6SMark J. Nelson# consist only of a dependency, but no action--the action is supplied 47*581cede6SMark J. Nelson# by the $(MSGDIRFILES_REMOTE) rule below. 48*581cede6SMark J. Nelson# 49*581cede6SMark J. NelsonMSGDIRFILES_REMOTE= \ 50*581cede6SMark J. Nelson magic \ 51*581cede6SMark J. Nelson mailx.help \ 52*581cede6SMark J. Nelson more.help \ 53*581cede6SMark J. Nelson priv_names 54*581cede6SMark J. Nelson 55*581cede6SMark J. NelsonMSGDIRFILES= $(MSGDIRFILES_LOCAL) $(MSGDIRFILES_REMOTE) 56*581cede6SMark J. Nelson 57*581cede6SMark J. NelsonROOTMSGDIRFILES=$(MSGDIRFILES:%=$(ROOTMSGDIR)/%) 58*581cede6SMark J. Nelson 59*581cede6SMark J. NelsonPO_LABEL=' The following lines are contents of ' 60*581cede6SMark J. Nelson 61*581cede6SMark J. Nelson.KEEP_STATE: 62*581cede6SMark J. Nelson 63*581cede6SMark J. Nelsonall: $(MSGDIRFILES) 64*581cede6SMark J. Nelson 65*581cede6SMark J. Nelsoninstall: all _msg 66*581cede6SMark J. Nelson 67*581cede6SMark J. Nelson# 68*581cede6SMark J. Nelson# The _msg target gathers the output of the top-level _msg target into 69*581cede6SMark J. Nelson# text-domain-specific message files under the ROOTMSGDIR for packaging. 70*581cede6SMark J. Nelson# It also processes time-message files in subdirectories of the LC_TIME 71*581cede6SMark J. Nelson# directory and copies or creates other files needed by this package. 72*581cede6SMark J. Nelson# 73*581cede6SMark J. Nelson 74*581cede6SMark J. Nelson$(ROOTTIMEDIR) $(ROOTMSGDIR): 75*581cede6SMark J. Nelson $(INS.dir) 76*581cede6SMark J. Nelson 77*581cede6SMark J. Nelson$(ROOTMSGDIR)/%: $(ROOTMSGDIR) % 78*581cede6SMark J. Nelson $(INS.file) 79*581cede6SMark J. Nelson 80*581cede6SMark J. Nelsonmagic: $(SRC)/cmd/file/magic 81*581cede6SMark J. Nelson 82*581cede6SMark J. Nelsonpriv_names: $(ROOT)/etc/security/priv_names 83*581cede6SMark J. Nelson 84*581cede6SMark J. Nelsonmailx.help: $(SRC)/cmd/mailx/misc/mailx.help 85*581cede6SMark J. Nelson 86*581cede6SMark J. Nelsonmore.help: $(SRC)/cmd/more/more.help 87*581cede6SMark J. Nelson 88*581cede6SMark J. Nelson$(MSGDIRFILES_REMOTE): 89*581cede6SMark J. Nelson $(RM) $@; $(CP) $? $@ 90*581cede6SMark J. Nelson 91*581cede6SMark J. Nelson_msg: $(ROOTMSGDIR) .WAIT $(ROOTTIMEDIR) $(ROOTMSGDIRFILES) FRC 92*581cede6SMark J. Nelson [ -d $(MSGROOT) ] || $(ECHO) "need to build _msg in $(SRC)" 93*581cede6SMark J. Nelson (cd $(MSGROOT); \ 94*581cede6SMark J. Nelson for d in SUNW*;\ 95*581cede6SMark J. Nelson do \ 96*581cede6SMark J. Nelson x="`$(ECHO) $$d/*.po`"; \ 97*581cede6SMark J. Nelson y="$$d/"'*.po'; \ 98*581cede6SMark J. Nelson $(RM) $(ROOTMSGDIR)/$$d.po; \ 99*581cede6SMark J. Nelson if test "$$x" != "$$y"; then \ 100*581cede6SMark J. Nelson for f in $$d/*.po; \ 101*581cede6SMark J. Nelson do \ 102*581cede6SMark J. Nelson $(ECHO) '#'$(PO_LABEL)$$f >> $(ROOTMSGDIR)/$$d.po; \ 103*581cede6SMark J. Nelson $(SED) -e '/^# msg/d' -e '/^domain/d' $$f >> \ 104*581cede6SMark J. Nelson $(ROOTMSGDIR)/$$d.po; \ 105*581cede6SMark J. Nelson done; \ 106*581cede6SMark J. Nelson $(CHMOD) $(FILEMODE) $(ROOTMSGDIR)/$$d.po; \ 107*581cede6SMark J. Nelson fi; \ 108*581cede6SMark J. Nelson x="`$(ECHO) $$d/*.msg`"; \ 109*581cede6SMark J. Nelson y="$$d/"'*.msg'; \ 110*581cede6SMark J. Nelson if test "$$x" != "$$y"; then \ 111*581cede6SMark J. Nelson for f in $$d/*.msg; \ 112*581cede6SMark J. Nelson do \ 113*581cede6SMark J. Nelson x="`basename $$f`"; \ 114*581cede6SMark J. Nelson $(RM) $(ROOTMSGDIR)/$$x; \ 115*581cede6SMark J. Nelson $(CP) $$f $(ROOTMSGDIR); \ 116*581cede6SMark J. Nelson $(CHMOD) $(FILEMODE) $(ROOTMSGDIR)/$$x; \ 117*581cede6SMark J. Nelson done; \ 118*581cede6SMark J. Nelson fi; \ 119*581cede6SMark J. Nelson done) 120*581cede6SMark J. Nelson (cd $(MSGROOT)/LC_TIME; \ 121*581cede6SMark J. Nelson for d in SUNW*;\ 122*581cede6SMark J. Nelson do \ 123*581cede6SMark J. Nelson $(RM) $(ROOTTIMEDIR)/$$d.po; \ 124*581cede6SMark J. Nelson for f in $$d/*.po; \ 125*581cede6SMark J. Nelson do \ 126*581cede6SMark J. Nelson $(ECHO) '#'$(PO_LABEL)$$f >> $(ROOTTIMEDIR)/$$d.po; \ 127*581cede6SMark J. Nelson $(SED) -e '/^# msg/d' -e '/^domain/d' $$f >> \ 128*581cede6SMark J. Nelson $(ROOTTIMEDIR)/$$d.po; \ 129*581cede6SMark J. Nelson done; \ 130*581cede6SMark J. Nelson $(CHMOD) $(FILEMODE) $(ROOTTIMEDIR)/$$d.po; \ 131*581cede6SMark J. Nelson done) 132*581cede6SMark J. Nelson 133*581cede6SMark J. NelsonFRC: 134