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