Makefile revision b6805bf78d2bbbeeaea8909a05623587b42d58b3
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# CDDL HEADER START
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# The contents of this file are subject to the terms of the
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Common Development and Distribution License (the "License").
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# You may not use this file except in compliance with the License.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# or http://www.opensolaris.org/os/licensing.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# See the License for the specific language governing permissions
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# and limitations under the License.
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# When distributing Covered Code, include this CDDL HEADER in each
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# If applicable, add the following below this CDDL HEADER, with the
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# fields enclosed by brackets "[]" replaced with your own identifying
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# information: Portions Copyright [yyyy] [name of copyright owner]
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# CDDL HEADER END
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Use is subject to license terms.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweinclude ../Makefile.master
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweROOTDIR=$(ROOT)/usr/lib/locale/C
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweROOTMSGDIR=$(ROOTDIR)/LC_MESSAGES
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweROOTTIMEDIR=$(ROOTDIR)/LC_TIME
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# These files either need no build rules, because they're under SCM
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# in the current working directory, or they have explicit build rules
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# that aren't handled by the $(MSGDIRFILES_REMOTE) rule below.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweMSGDIRFILES_LOCAL= \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe SUNW_OST_LINFO \
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov uxlibc.src
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov#
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# These files live somewhere else in the build tree (ie not in the
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# directory usr/src/msg). Each entry here should be accompanied by an
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# explicit action telling where the file lives. That action should
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# consist only of a dependency, but no action--the action is supplied
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov# by the $(MSGDIRFILES_REMOTE) rule below.
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov#
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri PankovMSGDIRFILES_REMOTE= \
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov magic \
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov mailx.help \
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov more.help \
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov priv_names
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri PankovMSGDIRFILES= $(MSGDIRFILES_LOCAL) $(MSGDIRFILES_REMOTE)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweROOTMSGDIRFILES=$(MSGDIRFILES:%=$(ROOTMSGDIR)/%)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri PankovPO_LABEL=' The following lines are contents of '
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
a9478106a12424322498e53cf7cd75bd8a4d6004Yuri Pankov.KEEP_STATE:
all: $(MSGDIRFILES)
install: all _msg
clobber:
$(RM) $(MSGDIRFILES_REMOTE)
#
# The _msg target gathers the output of the top-level _msg target into
# text-domain-specific message files under the ROOTMSGDIR for packaging.
# It also processes time-message files in subdirectories of the LC_TIME
# directory and copies or creates other files needed by this package.
#
$(ROOTTIMEDIR) $(ROOTMSGDIR):
$(INS.dir)
$(ROOTMSGDIR)/%: $(ROOTMSGDIR) %
$(INS.file)
magic: $(SRC)/cmd/file/magic
priv_names: $(ROOT)/etc/security/priv_names
mailx.help: $(SRC)/cmd/mailx/misc/mailx.help
more.help: $(SRC)/cmd/more/more.help
$(MSGDIRFILES_REMOTE):
$(RM) $@; $(CP) $? $@
_msg: $(ROOTMSGDIR) .WAIT $(ROOTTIMEDIR) $(ROOTMSGDIRFILES) FRC
[ -d $(MSGROOT) ] || $(ECHO) "need to build _msg in $(SRC)"
(cd $(MSGROOT); \
for d in SUNW*;\
do \
x="`$(ECHO) $$d/*.po`"; \
y="$$d/"'*.po'; \
$(RM) $(ROOTMSGDIR)/$$d.po; \
if test "$$x" != "$$y"; then \
for f in $$d/*.po; \
do \
$(ECHO) '#'$(PO_LABEL)$$f >> $(ROOTMSGDIR)/$$d.po; \
$(SED) -e '/^# msg/d' -e '/^domain/d' $$f >> \
$(ROOTMSGDIR)/$$d.po; \
done; \
$(CHMOD) $(FILEMODE) $(ROOTMSGDIR)/$$d.po; \
fi; \
x="`$(ECHO) $$d/*.msg`"; \
y="$$d/"'*.msg'; \
if test "$$x" != "$$y"; then \
for f in $$d/*.msg; \
do \
x="`basename $$f`"; \
$(RM) $(ROOTMSGDIR)/$$x; \
$(CP) $$f $(ROOTMSGDIR); \
$(CHMOD) $(FILEMODE) $(ROOTMSGDIR)/$$x; \
done; \
fi; \
done)
(cd $(MSGROOT)/LC_TIME; \
for d in SUNW*;\
do \
$(RM) $(ROOTTIMEDIR)/$$d.po; \
for f in $$d/*.po; \
do \
$(ECHO) '#'$(PO_LABEL)$$f >> $(ROOTTIMEDIR)/$$d.po; \
$(SED) -e '/^# msg/d' -e '/^domain/d' $$f >> \
$(ROOTTIMEDIR)/$$d.po; \
done; \
$(CHMOD) $(FILEMODE) $(ROOTTIMEDIR)/$$d.po; \
done)
FRC: