581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson# CDDL HEADER START
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson# The contents of this file are subject to the terms of the
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson# Common Development and Distribution License (the "License").
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson# You may not use this file except in compliance with the License.
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson# See the License for the specific language governing permissions
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson# and limitations under the License.
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson# When distributing Covered Code, include this CDDL HEADER in each
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson# If applicable, add the following below this CDDL HEADER, with the
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson# fields enclosed by brackets "[]" replaced with your own identifying
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson# information: Portions Copyright [yyyy] [name of copyright owner]
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson# CDDL HEADER END
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson# Use is subject to license terms.
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson# These files either need no build rules, because they're under SCM
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson# in the current working directory, or they have explicit build rules
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson# that aren't handled by the $(MSGDIRFILES_REMOTE) rule below.
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson# These files live somewhere else in the build tree (ie not in the
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson# directory usr/src/msg). Each entry here should be accompanied by an
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson# explicit action telling where the file lives. That action should
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson# consist only of a dependency, but no action--the action is supplied
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson# by the $(MSGDIRFILES_REMOTE) rule below.
581cede61ac9c14d8d4ea452562a567189eead78Mark J. NelsonMSGDIRFILES= $(MSGDIRFILES_LOCAL) $(MSGDIRFILES_REMOTE)
581cede61ac9c14d8d4ea452562a567189eead78Mark J. NelsonROOTMSGDIRFILES=$(MSGDIRFILES:%=$(ROOTMSGDIR)/%)
581cede61ac9c14d8d4ea452562a567189eead78Mark J. NelsonPO_LABEL=' The following lines are contents of '
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson# The _msg target gathers the output of the top-level _msg target into
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson# text-domain-specific message files under the ROOTMSGDIR for packaging.
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson# It also processes time-message files in subdirectories of the LC_TIME
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson# directory and copies or creates other files needed by this package.
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson_msg: $(ROOTMSGDIR) .WAIT $(ROOTTIMEDIR) $(ROOTMSGDIRFILES) FRC
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson [ -d $(MSGROOT) ] || $(ECHO) "need to build _msg in $(SRC)"
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson for f in $$d/*.po; \
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson $(ECHO) '#'$(PO_LABEL)$$f >> $(ROOTMSGDIR)/$$d.po; \
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson $(SED) -e '/^# msg/d' -e '/^domain/d' $$f >> \
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson for f in $$d/*.msg; \
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson for f in $$d/*.po; \
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson $(ECHO) '#'$(PO_LABEL)$$f >> $(ROOTTIMEDIR)/$$d.po; \
581cede61ac9c14d8d4ea452562a567189eead78Mark J. Nelson $(SED) -e '/^# msg/d' -e '/^domain/d' $$f >> \