xref: /illumos-gate/usr/src/cmd/ast/msgcc/Makefile (revision b30d1939)
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#
255661bb76SJohn Levon# Copyright (c) 2018, Joyent, Inc.
26*b30d1939SAndy Fiddaman# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
27da2e3ebdSchin
28*b30d1939SAndy FiddamanSHELL= /usr/bin/ksh93
29da2e3ebdSchin
30da2e3ebdSchininclude ../../Makefile.cmd
31da2e3ebdSchin
32da2e3ebdSchin.KEEP_STATE:
33da2e3ebdSchin
34da2e3ebdSchin# Set common AST build flags (e.g., needed to support the math stuff).
35*b30d1939SAndy Fiddamaninclude ../Makefile.ast
36*b30d1939SAndy Fiddaman
37*b30d1939SAndy FiddamanASTSRC= $(C_AST)/src/cmd/msgcc
38da2e3ebdSchin
39da2e3ebdSchin# build rules
40*b30d1939SAndy FiddamanCPPFLAGS= \
41da2e3ebdSchin        $(DTEXTDOM) $(DTS_ERRNO) \
42da2e3ebdSchin        -I$(ROOT)/usr/include/ast \
4334f9b3eeSRoland Mainz	-I$(ROOT)/usr/include \
44da2e3ebdSchin	-D_PACKAGE_ast \
45da2e3ebdSchin	'-DUSAGE_LICENSE=\
46*b30d1939SAndy Fiddaman	    "[-author?Glenn Fowler <gsf@research.att.com>]"\
47*b30d1939SAndy Fiddaman	    "[-copyright?Copyright (c) 2000-2012 AT&T Intellectual Property]"\
48*b30d1939SAndy Fiddaman	    "[-license?http://www.eclipse.org/org/documents/epl-v10.html]" \
49*b30d1939SAndy Fiddaman	    "[--catalog?msgcc]"'
50da2e3ebdSchin
51*b30d1939SAndy FiddamanCFLAGS += $(ASTCFLAGS)
52da2e3ebdSchin
537014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses
547014882cSRichard LoweCERRWARN += -_gcc=-Wno-empty-body
55d3b5f563SJohn LevonCERRWARN += $(CNOWARN_UNINIT)
567014882cSRichard Lowe
575661bb76SJohn Levon# not linted
585661bb76SJohn LevonSMATCH=off
595661bb76SJohn Levon
60da2e3ebdSchinLDLIBS += -last
61da2e3ebdSchinmsgcpp   := LDLIBS += -lpp
62da2e3ebdSchin
63*b30d1939SAndy FiddamanCPROG= msgcvt msggen msgget msgcpp
64*b30d1939SAndy FiddamanPROG= msgcc $(CPROG)
65*b30d1939SAndy Fiddaman
66*b30d1939SAndy Fiddamanall: $(PROG)
67*b30d1939SAndy Fiddaman
687c2fbfb3SApril Chin# This target should use "shcomp" in the future
69*b30d1939SAndy Fiddamanmsgcc:	$(ASTSRC)/msgcc.sh
70da2e3ebdSchin	rm -f msgcc ; \
717c2fbfb3SApril Chin	{ \
72da2e3ebdSchin		print "#!/usr/bin/ksh93" ; \
73da2e3ebdSchin		print "export PATH=/usr/ast/bin:/usr/xpg6/bin:/usr/xpg4/bin:/usr/bin:\$${PATH}" ; \
74da2e3ebdSchin		print "builtin date" ; \
75*b30d1939SAndy Fiddaman		cat "$(ASTSRC)/msgcc.sh" ; \
767c2fbfb3SApril Chin	} >msgcc ; \
77da2e3ebdSchin	chmod a+rx msgcc
78da2e3ebdSchin
79da2e3ebdSchinROOTCMDDIR=$(ROOT)/usr/ast/bin
80da2e3ebdSchin
81*b30d1939SAndy Fiddamaninstall: all $(ROOTCMD)
82*b30d1939SAndy Fiddamancheck clean install_h _feature:
83da2e3ebdSchin
84*b30d1939SAndy Fiddamaninclude ../../Makefile.targ
85*b30d1939SAndy FiddamanPOFILE= msgcpp.po
86da2e3ebdSchin
87*b30d1939SAndy Fiddaman# Create dummy file since AST/ksh/msgcc doesn't use *.po files
88*b30d1939SAndy Fiddamanmsgcpp.po:
89*b30d1939SAndy Fiddaman	$(RM) $@
90*b30d1939SAndy Fiddaman	$(TOUCH) $(@)
91da2e3ebdSchin
92*b30d1939SAndy Fiddaman$(CPROG):
93*b30d1939SAndy Fiddaman	$(LINK.c) -o $@ $(ASTSRC)/$@.c $(LDLIBS)
94*b30d1939SAndy Fiddaman	$(POST_PROCESS)
95da2e3ebdSchin
96*b30d1939SAndy FiddamanFRC:
97*b30d1939SAndy Fiddaman.PARALLEL: $(PROG)
98