xref: /titanic_52/usr/src/cmd/ast/msgcc/Makefile (revision 906afcb89d0412cc073b95c2d701a804a8cdb62c)
1da2e3ebdSchin#
2da2e3ebdSchin# CDDL HEADER START
3da2e3ebdSchin#
4da2e3ebdSchin# The contents of this file are subject to the terms of the
5da2e3ebdSchin# Common Development and Distribution License (the "License").
6da2e3ebdSchin# You may not use this file except in compliance with the License.
7da2e3ebdSchin#
8da2e3ebdSchin# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9da2e3ebdSchin# or http://www.opensolaris.org/os/licensing.
10da2e3ebdSchin# See the License for the specific language governing permissions
11da2e3ebdSchin# and limitations under the License.
12da2e3ebdSchin#
13da2e3ebdSchin# When distributing Covered Code, include this CDDL HEADER in each
14da2e3ebdSchin# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15da2e3ebdSchin# If applicable, add the following below this CDDL HEADER, with the
16da2e3ebdSchin# fields enclosed by brackets "[]" replaced with your own identifying
17da2e3ebdSchin# information: Portions Copyright [yyyy] [name of copyright owner]
18da2e3ebdSchin#
19da2e3ebdSchin# CDDL HEADER END
20da2e3ebdSchin#
21da2e3ebdSchin#
2234f9b3eeSRoland Mainz# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23da2e3ebdSchin# Use is subject to license terms.
24da2e3ebdSchin#
25*906afcb8SAndy Fiddaman# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
26da2e3ebdSchin
277c2fbfb3SApril ChinSHELL= /usr/bin/ksh93
28da2e3ebdSchin
29da2e3ebdSchininclude ../../Makefile.cmd
30da2e3ebdSchin
31da2e3ebdSchin.KEEP_STATE:
32da2e3ebdSchin
33da2e3ebdSchin# Set common AST build flags (e.g., needed to support the math stuff).
34*906afcb8SAndy Fiddamaninclude ../Makefile.ast
35*906afcb8SAndy Fiddaman
36*906afcb8SAndy FiddamanASTSRC= $(C_AST)/src/cmd/msgcc
37da2e3ebdSchin
38da2e3ebdSchin# build rules
39da2e3ebdSchinCPPFLAGS= \
40da2e3ebdSchin        $(DTEXTDOM) $(DTS_ERRNO) \
41da2e3ebdSchin        -I$(ROOT)/usr/include/ast \
4234f9b3eeSRoland Mainz	-I$(ROOT)/usr/include \
43da2e3ebdSchin	-D_PACKAGE_ast \
44da2e3ebdSchin	'-DUSAGE_LICENSE=\
45da2e3ebdSchin	    "[-author?Glenn Fowler <gsf@research.att.com>]"\
46*906afcb8SAndy Fiddaman	    "[-copyright?Copyright (c) 2000-2012 AT&T Intellectual Property]"\
47*906afcb8SAndy Fiddaman	    "[-license?http://www.eclipse.org/org/documents/epl-v10.html]" \
48da2e3ebdSchin	    "[--catalog?msgcc]"'
49da2e3ebdSchin
50*906afcb8SAndy FiddamanCFLAGS += $(ASTCFLAGS)
51da2e3ebdSchin
527014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses
537014882cSRichard LoweCERRWARN += -_gcc=-Wno-empty-body
547014882cSRichard LoweCERRWARN += -_gcc=-Wno-uninitialized
557014882cSRichard Lowe
56da2e3ebdSchinLDLIBS += -last
57da2e3ebdSchinmsgcpp   := LDLIBS += -lpp
58da2e3ebdSchin
59*906afcb8SAndy FiddamanCPROG= msgcvt msggen msgget msgcpp
60*906afcb8SAndy FiddamanPROG= msgcc $(CPROG)
61*906afcb8SAndy Fiddaman
62*906afcb8SAndy Fiddamanall: $(PROG)
63*906afcb8SAndy Fiddaman
647c2fbfb3SApril Chin# This target should use "shcomp" in the future
65*906afcb8SAndy Fiddamanmsgcc:	$(ASTSRC)/msgcc.sh
66da2e3ebdSchin	rm -f msgcc ; \
677c2fbfb3SApril Chin	{ \
68da2e3ebdSchin		print "#!/usr/bin/ksh93" ; \
69da2e3ebdSchin		print "export PATH=/usr/ast/bin:/usr/xpg6/bin:/usr/xpg4/bin:/usr/bin:\$${PATH}" ; \
70da2e3ebdSchin		print "builtin date" ; \
71*906afcb8SAndy Fiddaman		cat "$(ASTSRC)/msgcc.sh" ; \
727c2fbfb3SApril Chin	} >msgcc ; \
73da2e3ebdSchin	chmod a+rx msgcc
74da2e3ebdSchin
75da2e3ebdSchinROOTCMDDIR=$(ROOT)/usr/ast/bin
76da2e3ebdSchin
77da2e3ebdSchininstall: all $(ROOTCMD)
78*906afcb8SAndy Fiddamancheck clean install_h _feature:
79da2e3ebdSchin
80da2e3ebdSchininclude ../../Makefile.targ
81*906afcb8SAndy FiddamanPOFILE= msgcpp.po
82*906afcb8SAndy Fiddaman
83*906afcb8SAndy Fiddaman# Create dummy file since AST/ksh/msgcc doesn't use *.po files
84*906afcb8SAndy Fiddamanmsgcpp.po:
85*906afcb8SAndy Fiddaman	$(RM) $@
86*906afcb8SAndy Fiddaman	$(TOUCH) $(@)
87*906afcb8SAndy Fiddaman
88*906afcb8SAndy Fiddaman$(CPROG):
89*906afcb8SAndy Fiddaman	$(LINK.c) -o $@ $(ASTSRC)/$@.c $(LDLIBS)
90*906afcb8SAndy Fiddaman	$(POST_PROCESS)
91*906afcb8SAndy Fiddaman
92*906afcb8SAndy FiddamanFRC:
93*906afcb8SAndy Fiddaman.PARALLEL: $(PROG)
94