1581cede6SMark J. Nelson# 2581cede6SMark J. Nelson# CDDL HEADER START 3581cede6SMark J. Nelson# 4581cede6SMark J. Nelson# The contents of this file are subject to the terms of the 5581cede6SMark J. Nelson# Common Development and Distribution License (the "License"). 6581cede6SMark J. Nelson# You may not use this file except in compliance with the License. 7581cede6SMark J. Nelson# 8581cede6SMark J. Nelson# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9581cede6SMark J. Nelson# or http://www.opensolaris.org/os/licensing. 10581cede6SMark J. Nelson# See the License for the specific language governing permissions 11581cede6SMark J. Nelson# and limitations under the License. 12581cede6SMark J. Nelson# 13581cede6SMark J. Nelson# When distributing Covered Code, include this CDDL HEADER in each 14581cede6SMark J. Nelson# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15581cede6SMark J. Nelson# If applicable, add the following below this CDDL HEADER, with the 16581cede6SMark J. Nelson# fields enclosed by brackets "[]" replaced with your own identifying 17581cede6SMark J. Nelson# information: Portions Copyright [yyyy] [name of copyright owner] 18581cede6SMark J. Nelson# 19581cede6SMark J. Nelson# CDDL HEADER END 20581cede6SMark J. Nelson# 21581cede6SMark J. Nelson 22581cede6SMark J. Nelson# 23581cede6SMark J. Nelson# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24581cede6SMark J. Nelson# Use is subject to license terms. 25581cede6SMark J. Nelson# 26581cede6SMark J. Nelson 27581cede6SMark J. Nelsoninclude ../Makefile.master 28581cede6SMark J. Nelson 29581cede6SMark J. NelsonROOTDIR=$(ROOT)/usr/lib/locale/C 30581cede6SMark J. NelsonROOTMSGDIR=$(ROOTDIR)/LC_MESSAGES 31581cede6SMark J. NelsonROOTTIMEDIR=$(ROOTDIR)/LC_TIME 32581cede6SMark J. Nelson 33581cede6SMark J. Nelson# 34581cede6SMark J. Nelson# These files either need no build rules, because they're under SCM 35581cede6SMark J. Nelson# in the current working directory, or they have explicit build rules 36581cede6SMark J. Nelson# that aren't handled by the $(MSGDIRFILES_REMOTE) rule below. 37581cede6SMark J. Nelson# 38581cede6SMark J. NelsonMSGDIRFILES_LOCAL= \ 39581cede6SMark J. Nelson SUNW_OST_LINFO \ 40581cede6SMark J. Nelson uxlibc.src 41581cede6SMark J. Nelson 42581cede6SMark J. Nelson# 43581cede6SMark J. Nelson# These files live somewhere else in the build tree (ie not in the 44581cede6SMark J. Nelson# directory usr/src/msg). Each entry here should be accompanied by an 45581cede6SMark J. Nelson# explicit action telling where the file lives. That action should 46581cede6SMark J. Nelson# consist only of a dependency, but no action--the action is supplied 47581cede6SMark J. Nelson# by the $(MSGDIRFILES_REMOTE) rule below. 48581cede6SMark J. Nelson# 49581cede6SMark J. NelsonMSGDIRFILES_REMOTE= \ 50581cede6SMark J. Nelson magic \ 51581cede6SMark J. Nelson mailx.help \ 52581cede6SMark J. Nelson more.help \ 53581cede6SMark J. Nelson priv_names 54581cede6SMark J. Nelson 55581cede6SMark J. NelsonMSGDIRFILES= $(MSGDIRFILES_LOCAL) $(MSGDIRFILES_REMOTE) 56581cede6SMark J. Nelson 57581cede6SMark J. NelsonROOTMSGDIRFILES=$(MSGDIRFILES:%=$(ROOTMSGDIR)/%) 58581cede6SMark J. Nelson 59581cede6SMark J. NelsonPO_LABEL=' The following lines are contents of ' 60581cede6SMark J. Nelson 61581cede6SMark J. Nelson.KEEP_STATE: 62581cede6SMark J. Nelson 63581cede6SMark J. Nelsonall: $(MSGDIRFILES) 64581cede6SMark J. Nelson 65581cede6SMark J. Nelsoninstall: all _msg 66581cede6SMark J. Nelson 67*b6805bf7SGordon Rossclobber: 68*b6805bf7SGordon Ross $(RM) $(MSGDIRFILES_REMOTE) 69*b6805bf7SGordon Ross 70581cede6SMark J. Nelson# 71581cede6SMark J. Nelson# The _msg target gathers the output of the top-level _msg target into 72581cede6SMark J. Nelson# text-domain-specific message files under the ROOTMSGDIR for packaging. 73581cede6SMark J. Nelson# It also processes time-message files in subdirectories of the LC_TIME 74581cede6SMark J. Nelson# directory and copies or creates other files needed by this package. 75581cede6SMark J. Nelson# 76581cede6SMark J. Nelson 77581cede6SMark J. Nelson$(ROOTTIMEDIR) $(ROOTMSGDIR): 78581cede6SMark J. Nelson $(INS.dir) 79581cede6SMark J. Nelson 80581cede6SMark J. Nelson$(ROOTMSGDIR)/%: $(ROOTMSGDIR) % 81581cede6SMark J. Nelson $(INS.file) 82581cede6SMark J. Nelson 83581cede6SMark J. Nelsonmagic: $(SRC)/cmd/file/magic 84581cede6SMark J. Nelson 85581cede6SMark J. Nelsonpriv_names: $(ROOT)/etc/security/priv_names 86581cede6SMark J. Nelson 87581cede6SMark J. Nelsonmailx.help: $(SRC)/cmd/mailx/misc/mailx.help 88581cede6SMark J. Nelson 89581cede6SMark J. Nelsonmore.help: $(SRC)/cmd/more/more.help 90581cede6SMark J. Nelson 91581cede6SMark J. Nelson$(MSGDIRFILES_REMOTE): 92581cede6SMark J. Nelson $(RM) $@; $(CP) $? $@ 93581cede6SMark J. Nelson 94581cede6SMark J. Nelson_msg: $(ROOTMSGDIR) .WAIT $(ROOTTIMEDIR) $(ROOTMSGDIRFILES) FRC 95581cede6SMark J. Nelson [ -d $(MSGROOT) ] || $(ECHO) "need to build _msg in $(SRC)" 96581cede6SMark J. Nelson (cd $(MSGROOT); \ 97581cede6SMark J. Nelson for d in SUNW*;\ 98581cede6SMark J. Nelson do \ 99581cede6SMark J. Nelson x="`$(ECHO) $$d/*.po`"; \ 100581cede6SMark J. Nelson y="$$d/"'*.po'; \ 101581cede6SMark J. Nelson $(RM) $(ROOTMSGDIR)/$$d.po; \ 102581cede6SMark J. Nelson if test "$$x" != "$$y"; then \ 103581cede6SMark J. Nelson for f in $$d/*.po; \ 104581cede6SMark J. Nelson do \ 105581cede6SMark J. Nelson $(ECHO) '#'$(PO_LABEL)$$f >> $(ROOTMSGDIR)/$$d.po; \ 106581cede6SMark J. Nelson $(SED) -e '/^# msg/d' -e '/^domain/d' $$f >> \ 107581cede6SMark J. Nelson $(ROOTMSGDIR)/$$d.po; \ 108581cede6SMark J. Nelson done; \ 109581cede6SMark J. Nelson $(CHMOD) $(FILEMODE) $(ROOTMSGDIR)/$$d.po; \ 110581cede6SMark J. Nelson fi; \ 111581cede6SMark J. Nelson x="`$(ECHO) $$d/*.msg`"; \ 112581cede6SMark J. Nelson y="$$d/"'*.msg'; \ 113581cede6SMark J. Nelson if test "$$x" != "$$y"; then \ 114581cede6SMark J. Nelson for f in $$d/*.msg; \ 115581cede6SMark J. Nelson do \ 116581cede6SMark J. Nelson x="`basename $$f`"; \ 117581cede6SMark J. Nelson $(RM) $(ROOTMSGDIR)/$$x; \ 118581cede6SMark J. Nelson $(CP) $$f $(ROOTMSGDIR); \ 119581cede6SMark J. Nelson $(CHMOD) $(FILEMODE) $(ROOTMSGDIR)/$$x; \ 120581cede6SMark J. Nelson done; \ 121581cede6SMark J. Nelson fi; \ 122581cede6SMark J. Nelson done) 123581cede6SMark J. Nelson (cd $(MSGROOT)/LC_TIME; \ 124581cede6SMark J. Nelson for d in SUNW*;\ 125581cede6SMark J. Nelson do \ 126581cede6SMark J. Nelson $(RM) $(ROOTTIMEDIR)/$$d.po; \ 127581cede6SMark J. Nelson for f in $$d/*.po; \ 128581cede6SMark J. Nelson do \ 129581cede6SMark J. Nelson $(ECHO) '#'$(PO_LABEL)$$f >> $(ROOTTIMEDIR)/$$d.po; \ 130581cede6SMark J. Nelson $(SED) -e '/^# msg/d' -e '/^domain/d' $$f >> \ 131581cede6SMark J. Nelson $(ROOTTIMEDIR)/$$d.po; \ 132581cede6SMark J. Nelson done; \ 133581cede6SMark J. Nelson $(CHMOD) $(FILEMODE) $(ROOTTIMEDIR)/$$d.po; \ 134581cede6SMark J. Nelson done) 135581cede6SMark J. Nelson 136581cede6SMark J. NelsonFRC: 137